Skip to content

Instantly share code, notes, and snippets.

View redjade's full-sized avatar

redjade redjade

View GitHub Profile
@redjade
redjade / block_samples.txt
Created May 27, 2021 07:50
block samples
inspecting block height: 342897
farmer_reward_ph 0x9d8c6b83a5a6da09e479c4fbeb9f92636187f90b4d48e14b2ee266360d05d36d
pool_reward_ph 0x9d8c6b83a5a6da09e479c4fbeb9f92636187f90b4d48e14b2ee266360d05d36d
farmer_reward_addr xch1nkxxhqa95mdqnerecna7h8ujvdsc07gtf4ywzjewufnrvrg96dks8dk78c
pool_reward_addr xch1nkxxhqa95mdqnerecna7h8ujvdsc07gtf4ywzjewufnrvrg96dks8dk78c
plot_pub_key 0x841cd8515dd82caa9d8818afe096013d845b234ce8f8231e39e9d77d77ba5d115508145691dfe5dc16dfa8db5fb79a14
pool_pub_key 0x8066a7041f55607ff2a5704244228612821da06e778d0e6b22fb0ee88b1b2a6be782d01a8cb6406c275ea409f437c181
pool_contract_puzzle_hash None
{
"aggregated_signature": "0xa8650e19f972455f34c508fa758e007890728cd44e72da7589c2234a9ef767c068ee4f83ed0c3fc29545e192b442a48f0e6f48073beb140cad821e3a0072a0aaaca09cbb4c0fb46de1bd98469d3d431be5e88c8bdf10371e65230613afcce7a5",
@redjade
redjade / PoS_test_winning_ratio.py
Last active May 19, 2021 08:05
proof of space winning percentage check
import hashlib
'''
r = hashlib.sha256('hello'.encode())
print(r.digest())
'''
def _expected_plot_size(k):
"""
Given the plot size parameter k (which is between 32 and 59), computes the
@redjade
redjade / jax_test.py
Last active January 26, 2024 14:50
jax setup and test
'''
install with gpu support
see https://github.com/google/jax#pip-installation
PYTHON_VERSION=cp37 # alternatives: cp35, cp36, cp37, cp38
CUDA_VERSION=cuda100 # alternatives: cuda90, cuda92, cuda100, cuda101 (check with nvcc --version)
PLATFORM=linux_x86_64 # alternatives: linux_x86_64
BASE_URL='https://storage.googleapis.com/jax-releases'
@redjade
redjade / boost.rb
Last active February 13, 2019 12:16
boost1_67 for brew resolving "boost: "cxx11" is not a recognized standard". Only `needs :cxx11` is commented. Original boost url : https://raw.githubusercontent.com/Homebrew/homebrew-core/f946d12e295c8a27519b73cc810d06593270a07f/Formula/boost.rb
class Boost < Formula
desc "Collection of portable C++ source libraries"
homepage "https://www.boost.org/"
revision 1
head "https://github.com/boostorg/boost.git"
stable do
url "https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2"
sha256 "2684c972994ee57fc5632e03bf044746f6eb45d4920c343937a465fd67a5adba"
@redjade
redjade / producerping.md
Last active June 27, 2018 14:26
producerping sketch

프로듀서핑 소개

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

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

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

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