Skip to content

Instantly share code, notes, and snippets.

View redjade's full-sized avatar

redjade redjade

View GitHub Profile
@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:

@redjade
redjade / test-mc.go
Last active May 30, 2018 07:32
GOMAXPROCS
package main
import (
"fmt"
"log"
"net/http"
"time"
"runtime"
)
@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 / 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 / first_fork.log
Created June 14, 2018 18:30
first fork but stabilized
1460156ms thread-0 producer_plugin.cpp:290 on_incoming_block ] Received block f5914919219d8587... #744347 @ 2018-06-14T18:24:20.000 signed by eoscannonchn [trxs: 0, lib: 744018, conf: 0, latency: 156 ms]
1460824ms thread-0 producer_plugin.cpp:290 on_incoming_block ] Received block e6d756b818c409e8... #744346 @ 2018-06-14T18:24:19.500 signed by eoscannonchn [trxs: 1, lib: 744018, conf: 0, latency: 1324 ms]
1460826ms thread-0 producer_plugin.cpp:290 on_incoming_block ] Received block df446fccc94902a6... #744347 @ 2018-06-14T18:24:20.000 signed by eoscannonchn [trxs: 0, lib: 744018, conf: 0, latency: 826 ms]
1460829ms thread-0 controller.cpp:880 maybe_switch_forks ] switching forks from 000b5b9bf5914919219d85870b615dee7bd76aefecafb4fe47c7bf57bddfc3a1 (block number 744347) to 000b5b9c1c38c6e9e7952a2e2748827625cc03e64f74a325489dee48e7e83147 (block number 744348)
1460845ms thread-0 controller.cpp:925 maybe_switch_forks ] successfully switched fork to ne
@redjade
redjade / activated.log
Created June 14, 2018 18:33
activated.log
3461266ms thread-0 controller.cpp:753 start_block ] promoting proposed schedule (set in block 739449) to pending; current block: 739450 lib: 739449 schedule: {"version":2,"producers":[{"producer_name":"argentinaeos","block_signing_key":"EOS7jq4FHrFrtCXxpRQ39dBeDMa5AjM4VaRbqBECkSa5aZnizJzrx"},{"producer_name":"bitfinexeos1","block_signing_key":"EOS6sgKjHUFtY1XxxQaMDwfxBac6nDBibVzZHb8LFMVmvSjcCdDhE"},{"producer_name":"cypherglasss","block_signing_key":"EOS5rTrUiqvgu7YCVyKCeQ1QXA7Uo94FZhq7zKcNPqbrCP5u5fQXo"},{"producer_name":"eos42freedom","block_signing_key":"EOS4tw7vH62TcVtMgm2tjXzn9hTuHEBbGPUK2eos42ssY7ip4LTzu"},{"producer_name":"eosasia11111","block_signing_key":"EOS76gG6ATpqfVf5KrVjh3f4JAa4EKzAwWabTucNQ4Xv2TmVAj9bN"},{"producer_name":"eosauthority","block_signing_key":"EOS4va3CTmAcAAXsT26T3EBWqYHgQLshyxsozYRgxWm9tjmy17pVV"},{"producer_name":"eosbeijingbp","block_signing_key":"EOS5dGpcEhwB4VEhhXEcqtZs9EQj5HeetuXDnsAGVHMXHAFdMjbdj"},{"producer_name":"eoscafeblock","block_signing_key":"EO
@redjade
redjade / latency_minus.log
Created June 14, 2018 19:00
latency minus
3581118ms thread-0 producer_plugin.cpp:290 on_incoming_block ] Received block 8bdb2a8507e2b2c4... #748403 @ 2018-06-14T18:59:41.000 signed by eosauthority [trxs: 0, lib: 748068, conf: 0, latency: 118 ms]
3581618ms thread-0 producer_plugin.cpp:290 on_incoming_block ] Received block 7d09518ea1522047... #748404 @ 2018-06-14T18:59:41.500 signed by eosauthority [trxs: 0, lib: 748068, conf: 0, latency: 118 ms]
3582088ms thread-0 producer_plugin.cpp:290 on_incoming_block ] Received block 65213c8e1cb12097... #748405 @ 2018-06-14T18:59:42.000 signed by eosbeijingbp [trxs: 0, lib: 748080, conf: 240, latency: 88 ms]
3582476ms thread-0 producer_plugin.cpp:290 on_incoming_block ] Received block a6c08548b1888bc5... #748406 @ 2018-06-14T18:59:42.500 signed by eosbeijingbp [trxs: 0, lib: 748080, conf: 0, latency: -23 ms]
3583011ms thread-0 producer_plugin.cpp:290 on_incoming_block ] Received block 12e805df974e5458... #748407 @ 2018-06-14T18:59:43.000 signed by eosbeijing
@redjade
redjade / cleos_propose_usage.md
Last active June 19, 2018 17:03
msig_requested_permissions for system contract upgrade
Usage: ./cleos multisig propose [OPTIONS] proposal_name requested_permissions trx_permissions contract action data [proposer] [proposal_expiration]

Positionals:
  proposal_name TEXT          proposal name (string) (required)
  requested_permissions TEXT  The JSON string or filename defining requested permissions (required)
  trx_permissions TEXT        The JSON string or filename defining transaction permissions (required)
  contract TEXT               contract to wich deferred transaction should be delivered (required)
  action TEXT                 action of deferred transaction (required)
  data TEXT                   The JSON string or filename defining the action to propose (required)
@redjade
redjade / producerping.md
Last active June 27, 2018 14:26
producerping sketch

프로듀서핑 소개

꼼꼼하게 블록 프로듀싱 노드를 준비해서 프로듀서로 등록했으나 당선 상태가 아닌 당신. 헐, 그런데 BP로 당선된 후보들 중에서 블록을 만들지 못한 후보도 있었네요.

프로듀서핑에 참여해서 내가 준비한 블록 프로듀싱 노드가 매우 작동하고 있다고 보여줍시다!

프로듀서핑이 해결하려는 의문들

  • "Standby BP가 된 후보들이 당선 상태가 되었을 때 제대로 블록을 만들 수 있을까?"
  • "Active BP와 Standby BP 모두가 긴급 상황이 발생했을 때 연락이 될까? 그런 운영 연습을 하고 있을까?"