Skip to content

Instantly share code, notes, and snippets.

View keroro520's full-sized avatar
🏠
Working from home

Kero keroro520

🏠
Working from home
View GitHub Profile
@keroro520
keroro520 / hash_type_not_1.md
Created January 13, 2022 09:04
hash_type_not_1

Thu 13 Jan 2022 09:01:51 AM UTC

举例 tx type.hash_type = 0, type.code_hash count
tx, index=1 0x326a37323dbb6e37f9cf5011e69f5d5c6f3dd1c944e80f679338a7aecfbfc1be 10
tx, index=1 0x6fb198a4ef2cc0fa63c2ef7596c169452323d8ce678bdb3f75c77dc1eac2f47f 21
tx, index=0 0x8b9cf1c536c2590282c2896ca34778590a3784b7daeafa241fe98e170a743ee0 4
tx, index=1 0xcc6254c87f582f1741f2137639707190a70081e065e9cb
/ip4/101.20.237.133/tcp/1027/p2p/QmPeX31x35jV6hgQhUFoHGeHBs1MNX93GVVjn7s4ntBa3P
/ip4/101.20.237.133/tcp/1030/p2p/QmPeX31x35jV6hgQhUFoHGeHBs1MNX93GVVjn7s4ntBa3P
/ip4/101.20.237.133/tcp/1031/p2p/QmPeX31x35jV6hgQhUFoHGeHBs1MNX93GVVjn7s4ntBa3P
/ip4/101.20.237.133/tcp/59537/p2p/QmPeX31x35jV6hgQhUFoHGeHBs1MNX93GVVjn7s4ntBa3P
/ip4/103.149.249.103/tcp/44623/p2p/QmWHKcVke4UeVv5ut6b4bmEpKwsxD4X47WtR9C2Q5RVV96
/ip4/103.97.201.38/tcp/50220/p2p/QmWHKcVke4UeVv5ut6b4bmEpKwsxD4X47WtR9C2Q5RVV96
/ip4/103.97.201.38/tcp/60902/p2p/QmWHKcVke4UeVv5ut6b4bmEpKwsxD4X47WtR9C2Q5RVV96
/ip4/103.97.201.38/tcp/9722/p2p/QmWHKcVke4UeVv5ut6b4bmEpKwsxD4X47WtR9C2Q5RVV96
/ip4/106.55.5.200/tcp/8115/p2p/QmNokn2967QTpsrun7vsbvszP5PB3K6BETNxytLUDskybC
/ip4/112.124.64.189/tcp/8115/p2p/QmPVFmsYsDfFpnKGscT94XWFhKriCQvwKVp1GLxi5fdxHn
name = "ckb_staging"
[genesis]
version = 0
parent_hash = "0x0000000000000000000000000000000000000000000000000000000000000000"
timestamp = 1564207200792
compact_target = 0x1f010000
uncles_hash = "0x0000000000000000000000000000000000000000000000000000000000000000"
nonce = "0x0"
# Config generated by `ckb init --chain staging`
data_dir = "data"
[chain]
# Choose the kind of chains to run, possible values:
# - { file = "specs/dev.toml" }
# - { bundled = "specs/testnet.toml" }
# - { bundled = "specs/mainnet.toml" }
spec = { file = "ckb-spec-staging.toml" }
# Config generated by `ckb init --chain staging`
data_dir = "data"
[chain]
# Choose the kind of chains to run, possible values:
# - { file = "specs/dev.toml" }
# - { bundled = "specs/testnet.toml" }
# - { bundled = "specs/mainnet.toml" }
spec = { file = "ckb-spec-staging.toml" }
@keroro520
keroro520 / commit-invalid.log
Created August 11, 2021 13:13
error: Error { kind: Block, inner: Commit(Invalid) }
2021-08-11 06:30:12.343 +00:00 ckb-global-runtime ERROR ckb_tx_pool::process resolve transactions when build block template, tip_number: 4519, tip_hash: Byte32(0xd8f7d8ca752c3b8a645a658278c829125a64a95424b061a9413ab9b1e72ba67d), error: Unknown(OutPoint(0x1311432d6153604df33beda417936a8551a0648aa8b4908a5ec057c4f318c5242d000000))
2021-08-11 06:30:12.343 +00:00 ckb-global-runtime ERROR ckb_tx_pool::process resolve transactions when build block template, tip_number: 4519, tip_hash: Byte32(0xd8f7d8ca752c3b8a645a658278c829125a64a95424b061a9413ab9b1e72ba67d), error: Unknown(OutPoint(0xd13201c16e714ef15b5297fb6939ffa9e5382cd47006cde3f9496064af93972234000000))
2021-08-11 06:30:12.343 +00:00 ckb-global-runtime ERROR ckb_tx_pool::process resolve transactions when build block template, tip_number: 4519, tip_hash: Byte32(0xd8f7d8ca752c3b8a645a658278c829125a64a95424b061a9413ab9b1e72ba67d), error: Unknown(OutPoint(0x6abbccb3af40a178c8bd25de9212a06751e976e0434886254dd9dd4c3db9009825000000))
2021-08-11 06:30:12.343 +00:00
@keroro520
keroro520 / ckb-spec-wano.toml
Created January 13, 2021 06:30
ckb-spec-wano.toml
name = "ckb_privnet_pow_dummy"
[genesis]
version = 0
parent_hash = "0x0000000000000000000000000000000000000000000000000000000000000000"
timestamp = 0
compact_target = 0x20ffffff # difficulty = 1
uncles_hash = "0x0000000000000000000000000000000000000000000000000000000000000000"
nonce = "0x0"
@keroro520
keroro520 / q3-q4.okr.md
Last active September 10, 2020 10:07
Q3/Q4 OKR

Q3

  • KR1: Improve programmability and readability of integration-test.

    • Extract common behaviors. Our test cases are always complicated, usually because they act complicated steps to construct the testing context or check the status of the things. Extracting those common behaviors is a way to reduce complexity. Our vision is, with fewer codes and documents, that a new programmer takes less effort to read and write test cases.
      • Mining
      • Block construction
      • Transaction construction
      • Chain construction
  • Chain/block/transaction status checking
@keroro520
keroro520 / multi-blocks
Last active June 17, 2020 04:01
Format: `{ peer : { block_number : latency }}`
This file has been truncated, but you can view the full file.
2020-06-17 03:12:53.790 +00:00 NetworkRuntime INFO ckb-net-monitor laatency: {29: [], 9: [], 46: [], 51: [], 73: [], 61: [], 10: [], 5: [], 66: [], 17: [], 22: [], 54: [], 57: [], 16: [], 14: [], 35: [], 32: [], 28: [], 8: [], 68: [], 18: [], 45: [], 71: [], 26: [], 38: [], 56: [], 53: [], 77: [], 62: [], 11: [], 21: [], 48: [], 37: [], 39: [], 30: [], 64: [], 65: [], 49: [], 4: [], 25: [], 27: [], 84: [], 55: [], 63: [], 58: [], 6: [], 59: [], 34: [], 52: [], 3: [], 24: [], 47: [], 78: [], 79: [], 44: [], 60: [], 12: [], 70: [], 19: [], 15: [], 31: [], 33: [], 23: [], 40: [], 43: [], 76: [], 42: [], 41: [], 74: [], 7: [], 2: [], 36: [], 72: [], 1: []}
2020-06-17 03:13:13.793 +00:00 NetworkRuntime INFO ckb-net-monitor laatency: {11: [(2097044, 46), (2097045, 91)], 38: [(2097044, 110), (2097045, 217)], 8: [(2097044, 4), (2097045, 5)], 31: [(2097044, 120), (2097045, 242)], 44: [(2097044, 129), (2097045, 257)], 34: [(2097044, 433), (2097045, 532)], 87: [], 29: [(2097044, 104), (2097045, 206)], 42: [(2097044, 1