Skip to content

Instantly share code, notes, and snippets.

@ryanorendorff
Last active May 5, 2024 15:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanorendorff/2d3745a66e0d62eca8ea2506ccbc9882 to your computer and use it in GitHub Desktop.
Save ryanorendorff/2d3745a66e0d62eca8ea2506ccbc9882 to your computer and use it in GitHub Desktop.
reth and lighthouse devnet attempted setup

In this procedure, we are attempting to set up a devnet, which is a blockchain completely local to your machine. Below is the attempted procedure to get it up and running.

In general, believe this is the structure we want:

graph TB;
    reth1[reth execution client]
    lighthouse1[Lighthouse consensus client]
    reth2[reth execution client]
    lighthouse2[Lighthouse consensus client]
    
    reth1 <--> reth2
    lighthouse1 <--> lighthouse2

    subgraph node1 [Node 1]
        direction LR
        lighthouse1 <--> reth1
    end
    
    subgraph node2 [Node 2]
        direction LR
        lighthouse2 <--> reth2
    end

The files in this folder are mostly copies of https://github.com/ethpandaops/withdrawals-testnet/tree/master/zhejiang-testnet/custom_config_data, but the chain ID is changed to 123456.

Attempted procedure

All commands are run from this directory.

  1. Generate two database files for each node (since each one locks the database they need to have separate ones). Use the genesis.json file at the bottom of the wiki:

    reth init --chain genesis.json --db node1
    reth init --chain genesis.json --db node2
    
  2. Enable 127.0.0.2 as a loopback device so that more that one address can serve from localhost.

    sudo ifconfig lo0 alias 127.0.0.2
    
  3. Run the first node using the following commands. Note I am unsure if the debug.tip is needed, but it warns you if you don't add it. If you are using the above genesis file, this tip should be d8f5a1b47c842e0e14c62205adaf926e4f1df17c6245fd1e7fbc6a41375eb72e

RUST_LOG=info,sync::stages=trace,downloaders=trace,debug reth node \
  --chain genesis.json     \
  --db node1               \
  -vvvvv                   \ # Print out all the info for now
  -d                       \ # Disable peer discovery since the nodes would otherwise conflict for a port.
  --http.addr 127.0.0.1    \ # All set to 127.0.0.1 for consistency.
  --ws.addr 127.0.0.1.     \   
  --authrpc.addr 127.0.0.1 \
  --discovery.port 30303   \ # This is the default port, just specified explicitly
  --port 30303             \
  --http                   \ # enable http rpc server
  --debug.tip d8f5a1b47c842e0e14c62205adaf926e4f1df17c6245fd1e7fbc6a41375eb72e

You should get output that looks like this:

2023-03-22T22:20:58.633015Z  INFO Loading saved peers file=/Users/ryan/Library/Application Support/reth/net/known-peers.json
2023-03-22T22:20:58.642174Z  INFO Connected to P2P network peer_id=0x0dd7bdceac2862305129078e70a317d89e260d73d8ee7d316c7938e0ae85f3ebeaf96da259ec5c9c37219c694ac47de516c2ba70f652c291ac14b0c02017c834 local_addr=0.0.0.0:30303
2023-03-22T22:20:58.642187Z  INFO Test transaction pool initialized

The peer ID you will need to connect to this node is 0dd7bdceac2862305129078e70a317d89e260d73d8ee7d316c7938e0ae85f3ebeaf96da259ec5c9c37219c694ac47de516c2ba70f652c291ac14b0c02017c834. Call this $NODE1_ID

IMPORTANT: this will generate a jwt.hex file in the reth configuration directory (see notes below). Copy this file to another location so that you can use it to run a consensus client on top of the first node. On a Mac you can do this

cp ~/Library/Application\ Support/reth/jwtsecret/jwt.hex jwt1.hex
  1. Start the second node:
RUST_LOG=info,sync::stages=trace,downloaders=trace,debug reth node \
  --chain genesis.json     \
  --db node2               \
  -vvvvv                   \
  -d                       \
  --http.addr 127.0.0.2    \ # All set to 127.0.0.2 for consistency. Note the different IP address here
  --ws.addr 127.0.0.2      \
  --authrpc.addr 127.0.0.2 \
  --discovery.port 30304   \ # note the different discovery port from above to prevent an os open error.
  --port 30304             \
  --http                   \ # enable http rpc server
  --trusted-peers enode://$NODE1_ID@127.0.0.1:30303 \ # Info on the first node to pair to. 
  --debug.tip d8f5a1b47c842e0e14c62205adaf926e4f1df17c6245fd1e7fbc6a41375eb72e

If it works, the first node should print out:

2023-03-22T22:26:03.774975Z  INFO Session established remote_addr=127.0.0.1:56095 peer_id=0x2fb7d090fab1dbd96e56aa9243845073c7fea44a1d5c6712bf8ee3f93abfc14f4218981112cd4fa66ba619c00f2e64effd29cedd9600147c11fe82089221f3a5 total_active=1
2023-03-22T22:26:03.775033Z  INFO Peer connected connected_peers=1 peer_id=0x2fb7…f3a5 best_block=0xd8f5…b72e

while the second node will print out

2023-03-22T22:26:03.774989Z  INFO Session established remote_addr=127.0.0.1:30303 peer_id=0x0dd7bdceac2862305129078e70a317d89e260d73d8ee7d316c7938e0ae85f3ebeaf96da259ec5c9c37219c694ac47de516c2ba70f652c291ac14b0c02017c834 total_active=1
2023-03-22T22:26:03.775034Z  INFO Peer connected connected_peers=1 peer_id=0x0dd7…c834 best_block=0xd8f5…b72e

Currently it does nothing after peering, and at some point one peer will send a disconnect request to the other.

2023-03-22T17:46:37.168583Z  WARN Peer disconnected. connected_peers=0 peer_id=0xbb76…9c81 reason=None
2023-03-22T17:46:38.166856Z  INFO Session established remote_addr=127.0.0.1:30303 peer_id=0xbb76309b57c4bc20433a390511659870e0d532e6549d5caef19f9b17e0bead09208fa83a1f696138fecf5d55ae7cc5cc7e4b76a3f8e7cf64c56abe05bbef9c81 total_active=1
2023-03-22T17:46:38.166947Z  INFO Peer connected connected_peers=1 peer_id=0xbb76…9c81 best_block=0x8275…97ec
2023-03-22T17:46:38.167189Z ERROR failed to receive message err=P2PStreamError(Disconnected(DisconnectRequested)) remote_peer_id=0xbb76309b57c4bc20433a390511659870e0d532e6549d5caef19f9b17e0bead09208fa83a1f696138fecf5d55ae7cc5cc7e4b76a3f8e7cf64c56abe05bbef9c81
2023-03-22T17:46:38.167361Z  WARN Peer disconnected. connected_peers=0 peer_id=0xbb76…9c81 reason=Disconnect requested
2023-03-22T17:46:56.161540Z  INFO Status connected_peers=0 stage=None checkpoint=0

IMPORTANT: this will generate a jwt.hex file in the reth configuration directory (see notes below), overwriting the jwt.hex from the first node. Copy this file to another location so that you can use it to run a consensus client on top of the second node. If you are on a mac you can do this

cp ~/Library/Application\ Support/reth/jwtsecret/jwt.hex jwt2.hex
  1. You can attempt to connect lighthouse (a consensus client) to node 1 using the following
lighthouse \
    --testnet-dir="." \
    bn \
    --datadir=lighthouse-datadir \
    --eth1 \
    --http \
    --http-allow-sync-stalled \
    --execution-endpoints=http://127.0.0.1:8551 \
    --enr-udp-port=9000 \
    --enr-tcp-port=9000 \
    --discovery-port=9000 \
    --jwt-secrets=jwt1.hex

This will connect lighthouse to node1 in some capacity, although the consensis client will continue repeating the message

Mar 22 22:30:53.213 ERRO Failed to update eth1 deposit cache     error: GetDepositLogsFailed("eth_getLogs call failed ServerMessage { code: -32601, message: \"Method not found\" }"), service: beacon
Mar 22 22:30:53.214 INFO Waiting for more deposits               valid_deposits: None, total_deposits: 0, min_genesis_active_validators: 58000, service: beacon
  1. ???

  2. Profit!

Things to do

The above setup is doing two things:

  1. Atttempting to set up a complete node (with a consensus client and an execution client)
  2. Attempting to peer two execution clients so that the two complete nodes can peer later.

We need to investigate the following.

  1. Determine who to run cast against. I believe this is the reth execution client.
  2. Get a single complete node working.
  3. Get multiple complete nodes talking to each other.

Notes

  1. When a reth node starts, it generates a jwt secret key that the consensus client needs to be able to pair. It is generated in one of the following locations:

    • Linux: $XDG_DATA_HOME/reth/jwtsecret/jwt.hex or $HOME/.local/share/reth/jwtsecret/jwt.hex
    • Windows: {FOLDERID_RoamingAppData}/reth/jwtsecret/jwt.hex
    • macOS: $HOME/Library/Application Support/reth/jwtsecret/jwt.hex

    This file is overwritten every time reth node is run! So if you need the jwt secret, copy it to another location.

  2. The RPC auth layer default port in reth is 8551, which matches the defaults expected by the lighthouse consensus client.

  3. You can get even more verbose output from reth by setting the RUST_LOG environmental variable. In their docs, they use RUST_LOG=info,sync::stages=trace,downloaders=trace

Guides

# Extends the mainnet preset
PRESET_BASE: 'mainnet'
CONFIG_NAME: testnet # needs to exist because of Prysm. Otherwise it conflicts with mainnet genesis
# Genesis
# ---------------------------------------------------------------
# `2**14` (= 16,384)
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 58000
# Feb-01-2023 15:00:00 PM UTC
# This is an invalid valid and should be updated when you create the genesis
MIN_GENESIS_TIME: 1675263480
GENESIS_FORK_VERSION: 0x00000069
GENESIS_DELAY: 120
# Forking
# ---------------------------------------------------------------
# Some forks are disabled for now:
# - These may be re-assigned to another fork-version later
# - Temporarily set to max uint64 value: 2**64 - 1
# Altair
ALTAIR_FORK_VERSION: 0x00000070
ALTAIR_FORK_EPOCH: 0
# Merge
BELLATRIX_FORK_VERSION: 0x00000071
BELLATRIX_FORK_EPOCH: 0
TERMINAL_TOTAL_DIFFICULTY: 0
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615
# Capella
CAPELLA_FORK_VERSION: 0x00000072
CAPELLA_FORK_EPOCH: 1350
# EIP4844
EIP4844_FORK_VERSION: 0x00000073
EIP4844_FORK_EPOCH: 18446744073709551615
# Time parameters
# ---------------------------------------------------------------
# 12 seconds
SECONDS_PER_SLOT: 12
# 14 (estimate from Eth1 mainnet)
SECONDS_PER_ETH1_BLOCK: 14
# 2**8 (= 256) epochs ~27 hours
MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256
# 2**8 (= 256) epochs ~27 hours
SHARD_COMMITTEE_PERIOD: 256
# 2**11 (= 2,048) Eth1 blocks ~8 hours
ETH1_FOLLOW_DISTANCE: 2048
# Validator cycle
# ---------------------------------------------------------------
# 2**2 (= 4)
INACTIVITY_SCORE_BIAS: 4
# 2**4 (= 16)
INACTIVITY_SCORE_RECOVERY_RATE: 16
# 2**4 * 10**9 (= 16,000,000,000) Gwei
EJECTION_BALANCE: 16000000000
# 2**2 (= 4)
MIN_PER_EPOCH_CHURN_LIMIT: 4
# 2**16 (= 65,536)
CHURN_LIMIT_QUOTIENT: 65536
# Fork choice
# ---------------------------------------------------------------
# 40%
PROPOSER_SCORE_BOOST: 40
# Deposit contract
# ---------------------------------------------------------------
DEPOSIT_CHAIN_ID: 32381
DEPOSIT_NETWORK_ID: 32382
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
{
"config": {
"chainId": 123456,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"mergeForkBlock": 0,
"terminalTotalDifficulty": 0,
"shanghaiTime": 1675782000
},
"alloc": {
"0x4242424242424242424242424242424242424242": {
"balance": "0",
"code": "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100a4578063621fd130146101ba578063c5f2892f14610244575b600080fd5b34801561005057600080fd5b506100906004803603602081101561006757600080fd5b50357fffffffff000000000000000000000000000000000000000000000000000000001661026b565b604080519115158252519081900360200190f35b6101b8600480360360808110156100ba57600080fd5b8101906020810181356401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91939092909160208101903564010000000081111561012757600080fd5b82018360208201111561013957600080fd5b8035906020019184600183028401116401000000008311171561015b57600080fd5b91939092909160208101903564010000000081111561017957600080fd5b82018360208201111561018b57600080fd5b803590602001918460018302840111640100000000831117156101ad57600080fd5b919350915035610304565b005b3480156101c657600080fd5b506101cf6110b5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102095781810151838201526020016101f1565b50505050905090810190601f1680156102365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561025057600080fd5b506102596110c7565b60408051918252519081900360200190f35b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a70000000000000000000000000000000000000000000000000000000014806102fe57507fffffffff0000000000000000000000000000000000000000000000000000000082167f8564090700000000000000000000000000000000000000000000000000000000145b92915050565b6030861461035d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806118056026913960400191505060405180910390fd5b602084146103b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061179c6036913960400191505060405180910390fd5b6060821461040f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806118786029913960400191505060405180910390fd5b670de0b6b3a7640000341015610470576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806118526026913960400191505060405180910390fd5b633b9aca003406156104cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806117d26033913960400191505060405180910390fd5b633b9aca00340467ffffffffffffffff811115610535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061182b6027913960400191505060405180910390fd5b6060610540826114ba565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a6105756020546114ba565b6040805160a0808252810189905290819060208201908201606083016080840160c085018e8e80828437600083820152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690910187810386528c815260200190508c8c808284376000838201819052601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690920188810386528c5181528c51602091820193918e019250908190849084905b83811015610648578181015183820152602001610630565b50505050905090810190601f1680156106755780820380516001836020036101000a031916815260200191505b5086810383528881526020018989808284376000838201819052601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169092018881038452895181528951602091820193918b019250908190849084905b838110156106ef5781810151838201526020016106d7565b50505050905090810190601f16801561071c5780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b604051602001808484808284377fffffffffffffffffffffffffffffffff0000000000000000000000000000000090941691909301908152604080517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0818403018152601090920190819052815191955093508392506020850191508083835b602083106107fc57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107bf565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610859573d6000803e3d6000fd5b5050506040513d602081101561086e57600080fd5b5051905060006002806108846040848a8c6116fe565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108f857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016108bb565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610955573d6000803e3d6000fd5b5050506040513d602081101561096a57600080fd5b5051600261097b896040818d6116fe565b60405160009060200180848480828437919091019283525050604080518083038152602092830191829052805190945090925082918401908083835b602083106109f457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016109b7565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610a51573d6000803e3d6000fd5b5050506040513d6020811015610a6657600080fd5b5051604080516020818101949094528082019290925280518083038201815260609092019081905281519192909182918401908083835b60208310610ada57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610a9d565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610b37573d6000803e3d6000fd5b5050506040513d6020811015610b4c57600080fd5b50516040805160208101858152929350600092600292839287928f928f92018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610bd957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610b9c565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610c36573d6000803e3d6000fd5b5050506040513d6020811015610c4b57600080fd5b50516040518651600291889160009188916020918201918291908601908083835b60208310610ca957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610c6c565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610d4e57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610d11565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610dab573d6000803e3d6000fd5b5050506040513d6020811015610dc057600080fd5b5051604080516020818101949094528082019290925280518083038201815260609092019081905281519192909182918401908083835b60208310610e3457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610df7565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610e91573d6000803e3d6000fd5b5050506040513d6020811015610ea657600080fd5b50519050858114610f02576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260548152602001806117486054913960600191505060405180910390fd5b60205463ffffffff11610f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806117276021913960400191505060405180910390fd5b602080546001019081905560005b60208110156110a9578160011660011415610fa0578260008260208110610f9157fe5b0155506110ac95505050505050565b600260008260208110610faf57fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061102557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610fe8565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015611082573d6000803e3d6000fd5b5050506040513d602081101561109757600080fd5b50519250600282049150600101610f6e565b50fe5b50505050505050565b60606110c26020546114ba565b905090565b6020546000908190815b60208110156112f05781600116600114156111e6576002600082602081106110f557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061116b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161112e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa1580156111c8573d6000803e3d6000fd5b5050506040513d60208110156111dd57600080fd5b505192506112e2565b600283602183602081106111f657fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061126b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161122e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa1580156112c8573d6000803e3d6000fd5b5050506040513d60208110156112dd57600080fd5b505192505b6002820491506001016110d1565b506002826112ff6020546114ba565b600060401b6040516020018084815260200183805190602001908083835b6020831061135a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161131d565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790527fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000095909516920191825250604080518083037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8018152601890920190819052815191955093508392850191508083835b6020831061143f57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611402565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa15801561149c573d6000803e3d6000fd5b5050506040513d60208110156114b157600080fd5b50519250505090565b60408051600880825281830190925260609160208201818036833701905050905060c082901b8060071a60f81b826000815181106114f457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060061a60f81b8260018151811061153757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060051a60f81b8260028151811061157a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060041a60f81b826003815181106115bd57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060031a60f81b8260048151811061160057fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060021a60f81b8260058151811061164357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060011a60f81b8260068151811061168657fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060001a60f81b826007815181106116c957fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b6000808585111561170d578182fd5b83861115611719578182fd5b505082019391909203915056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a26469706673582212201dd26f37a621703009abf16e77e69c93dc50c79db7f6cc37543e3e0e3decdc9764736f6c634300060b0033",
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000022": "0xf5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb4b",
"0x0000000000000000000000000000000000000000000000000000000000000023": "0xdb56114e00fdd4c1f85c892bf35ac9a89289aaecb1ebd0a96cde606a748b5d71",
"0x0000000000000000000000000000000000000000000000000000000000000024": "0xc78009fdf07fc56a11f122370658a353aaa542ed63e44c4bc15ff4cd105ab33c",
"0x0000000000000000000000000000000000000000000000000000000000000025": "0x536d98837f2dd165a55d5eeae91485954472d56f246df256bf3cae19352a123c",
"0x0000000000000000000000000000000000000000000000000000000000000026": "0x9efde052aa15429fae05bad4d0b1d7c64da64d03d7a1854a588c2cb8430c0d30",
"0x0000000000000000000000000000000000000000000000000000000000000027": "0xd88ddfeed400a8755596b21942c1497e114c302e6118290f91e6772976041fa1",
"0x0000000000000000000000000000000000000000000000000000000000000028": "0x87eb0ddba57e35f6d286673802a4af5975e22506c7cf4c64bb6be5ee11527f2c",
"0x0000000000000000000000000000000000000000000000000000000000000029": "0x26846476fd5fc54a5d43385167c95144f2643f533cc85bb9d16b782f8d7db193",
"0x000000000000000000000000000000000000000000000000000000000000002a": "0x506d86582d252405b840018792cad2bf1259f1ef5aa5f887e13cb2f0094f51e1",
"0x000000000000000000000000000000000000000000000000000000000000002b": "0xffff0ad7e659772f9534c195c815efc4014ef1e1daed4404c06385d11192e92b",
"0x000000000000000000000000000000000000000000000000000000000000002c": "0x6cf04127db05441cd833107a52be852868890e4317e6a02ab47683aa75964220",
"0x000000000000000000000000000000000000000000000000000000000000002d": "0xb7d05f875f140027ef5118a2247bbb84ce8f2f0f1123623085daf7960c329f5f",
"0x000000000000000000000000000000000000000000000000000000000000002e": "0xdf6af5f5bbdb6be9ef8aa618e4bf8073960867171e29676f8b284dea6a08a85e",
"0x000000000000000000000000000000000000000000000000000000000000002f": "0xb58d900f5e182e3c50ef74969ea16c7726c549757cc23523c369587da7293784",
"0x0000000000000000000000000000000000000000000000000000000000000030": "0xd49a7502ffcfb0340b1d7885688500ca308161a7f96b62df9d083b71fcc8f2bb",
"0x0000000000000000000000000000000000000000000000000000000000000031": "0x8fe6b1689256c0d385f42f5bbe2027a22c1996e110ba97c171d3e5948de92beb",
"0x0000000000000000000000000000000000000000000000000000000000000032": "0x8d0d63c39ebade8509e0ae3c9c3876fb5fa112be18f905ecacfecb92057603ab",
"0x0000000000000000000000000000000000000000000000000000000000000033": "0x95eec8b2e541cad4e91de38385f2e046619f54496c2382cb6cacd5b98c26f5a4",
"0x0000000000000000000000000000000000000000000000000000000000000034": "0xf893e908917775b62bff23294dbbe3a1cd8e6cc1c35b4801887b646a6f81f17f",
"0x0000000000000000000000000000000000000000000000000000000000000035": "0xcddba7b592e3133393c16194fac7431abf2f5485ed711db282183c819e08ebaa",
"0x0000000000000000000000000000000000000000000000000000000000000036": "0x8a8d7fe3af8caa085a7639a832001457dfb9128a8061142ad0335629ff23ff9c",
"0x0000000000000000000000000000000000000000000000000000000000000037": "0xfeb3c337d7a51a6fbf00b9e34c52e1c9195c969bd4e7a0bfd51d5c5bed9c1167",
"0x0000000000000000000000000000000000000000000000000000000000000038": "0xe71f0aa83cc32edfbefa9f4d3e0174ca85182eec9f3a09f6a6c0df6377a510d7",
"0x0000000000000000000000000000000000000000000000000000000000000039": "0x31206fa80a50bb6abe29085058f16212212a60eec8f049fecb92d8c8e0a84bc0",
"0x000000000000000000000000000000000000000000000000000000000000003a": "0x21352bfecbeddde993839f614c3dac0a3ee37543f9b412b16199dc158e23b544",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x619e312724bb6d7c3153ed9de791d764a366b389af13c58bf8a8d90481a46765",
"0x000000000000000000000000000000000000000000000000000000000000003c": "0x7cdd2986268250628d0c10e385c58c6191e6fbe05191bcc04f133f2cea72c1c4",
"0x000000000000000000000000000000000000000000000000000000000000003d": "0x848930bd7ba8cac54661072113fb278869e07bb8587f91392933374d017bcbe1",
"0x000000000000000000000000000000000000000000000000000000000000003e": "0x8869ff2c22b28cc10510d9853292803328be4fb0e80495e8bb8d271f5b889636",
"0x000000000000000000000000000000000000000000000000000000000000003f": "0xb5fe28e79f1b850f8658246ce9b6a1e7b49fc06db7143e8fe0b4f2b0c5523a5c",
"0x0000000000000000000000000000000000000000000000000000000000000040": "0x985e929f70af28d0bdd1a90a808f977f597c7c778c489e98d3bd8910d31ac0f7"
}
},
"0xde156C5bBB3EcdA5DFd12de7E34e4A08AB8e9e2B" : {
"balance": "1000000000000000000000000000"
},
"0xc6Ba77E8c77e0762A323A8c5c36213062373136C" : {
"balance": "1000000000000000000000000000"
},
"0x281759F5ac03A3B04fC1498F2e65112a4b2039B3" : {
"balance": "1000000000000000000000000000"
},
"0xb3d6D9195e18cad003B360B4F5C58B7Fb0FC3a84" : {
"balance": "1000000000000000000000000000"
},
"0x5E20F1dDa3Cf7dE7C99dFD6Eb1829f2f8F1f935E" : {
"balance": "1000000000000000000000000000"
},
"0xc462161cD5BcB3f544334d8418acEe2956C6f32a" : {
"balance": "1000000000000000000000000000"
},
"0x4ba7Cc28276D854a1f6DA679391A7D416c1319A0" : {
"balance": "1000000000000000000000000000"
},
"0x0de7ef5bf06aAe8BDfdaEDE4A83FEaB6c2cceBc8" : {
"balance": "1000000000000000000000000000"
},
"0x634aEDeb41A05a9C6CDA7F191D631127C1968d3B" : {
"balance": "1000000000000000000000000000"
},
"0xdF0b24c27766E23A172A2Ed7E062c13E9F98bf29" : {
"balance": "1000000000000000000000000000"
}
},
"coinbase": "0x0000000000000000000000000000000000000000",
"difficulty": "0x01",
"extraData": "",
"gasLimit": "0x17D7840",
"nonce": "0x1234",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "1675263480"
}
@ryanorendorff
Copy link
Author

Note that this requires the following diff to reth to enable the full peer ID to be printed:

diff --git a/bin/reth/src/node/mod.rs b/bin/reth/src/node/mod.rs
index 0cc75b8870..b8931514ea 100644
--- a/bin/reth/src/node/mod.rs
+++ b/bin/reth/src/node/mod.rs
@@ -191,7 +191,7 @@ impl Command {
         let network_config =
             self.load_network_config(&config, Arc::clone(&db), ctx.task_executor.clone());
         let network = self.start_network(network_config, &ctx.task_executor, ()).await?;
-        info!(target: "reth::cli", peer_id = %network.peer_id(), local_addr = %network.local_addr(), "Connected to P2P network");
+        info!(target: "reth::cli", peer_id = ?network.peer_id(), local_addr = %network.local_addr(), "Connected to P2P network");
 
         let transaction_pool = reth_transaction_pool::Pool::eth_pool(
             EthTransactionValidator::new(shareable_db.clone(), Arc::clone(&self.chain)),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment