Skip to content

Instantly share code, notes, and snippets.

View redjade's full-sized avatar

redjade redjade

View GitHub Profile
@redjade
redjade / issues.md
Created June 9, 2018 12:33
Increasing limit of cpu/net bandwidth without more staking

Saw weird behavior. Limit of cpu/net bandwidth is increasing without more staking.

tested on eos-mainnet v1.0.2.1 which is almost identical to eosio v1.0.2.

See below.

$ date;./cleos.sh get account eoseoultesta
2018. 06. 09. (토) 21:04:21 KST
permissions:
@redjade
redjade / diff on nodeos v1.0.2 for issue #3976
Last active June 9, 2018 14:04
diff on nodeos v1.0.2 for issue #3976
diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp
index 0a07bb4c5..e8c665366 100644
--- a/plugins/chain_plugin/chain_plugin.cpp
+++ b/plugins/chain_plugin/chain_plugin.cpp
@@ -1024,7 +1024,7 @@ read_only::get_account_results read_only::get_account( const get_account_params&
if ( it != idx.end() ) {
vector<char> data;
copy_inline_row(*it, data);
- result.self_delegated_bandwidth = abis.binary_to_variant( "self_delegated_bandwidth", data );
+ result.self_delegated_bandwidth = abis.binary_to_variant( "delegated_bandwidth", data );
@redjade
redjade / on_ramcost.md
Last active November 23, 2018 14:14
on_ramcost.md

Intro

Please remind that this gist is for documenting and understanding what is going on current ram cost approaches and its consequences technically.

Ideal state after eosio resignation below:

  • EOS token stat
    • max_supply : 10000000000
    • supply : 1000000000
  • RAM Bancor state
@redjade
redjade / diff
Last active June 6, 2018 20:52
diff for adding mitigatebiosramcost on EOSIO master (commit id 379cb1a9e2a6557221d946eef4c5c83ddd156799, Tue Jun 5 18:00:26 2018 -0500)
diff --git a/contracts/eosio.system/delegate_bandwidth.cpp b/contracts/eosio.system/delegate_bandwidth.cpp
index 14b355f71..0d13c9fe7 100644
--- a/contracts/eosio.system/delegate_bandwidth.cpp
+++ b/contracts/eosio.system/delegate_bandwidth.cpp
@@ -189,6 +189,15 @@ namespace eosiosystem {
}
}
+ void system_contract::mitigatebiosramcost( account_name boot, asset quant ) {
+ require_auth(boot);
@redjade
redjade / test-mc.go
Last active May 30, 2018 07:32
GOMAXPROCS
package main
import (
"fmt"
"log"
"net/http"
"time"
"runtime"
)
@redjade
redjade / bancor_test.cpp
Created May 25, 2018 14:14
bancor_test.cpp
#include <iostream>
#include <cmath>
#include <iomanip>
#include <limits>
using namespace std;
class Connector {
public:
long double balance;
@redjade
redjade / keybase.md
Created May 24, 2018 03:08
keybase.md

Keybase proof

I hereby claim:

  • I am redjade on github.
  • I am resvera (https://keybase.io/resvera) on keybase.
  • I have a public key ASBjzNIyOMabuHMGF5mvMn8NBrkbCBuA3nrdwjZNNYKslgo

To claim this, I am signing this object: