Skip to content

Conversation

noot
Copy link
Contributor

@noot noot commented Oct 6, 2025

📝 Summary

  • implement sync and execution of flashblocks received over p2p

instructions for local testing with builder-playground, 1 builder building and 1 builder syncing:

  1. checkout modified builder-playground branch: cd builder-playground && git checkout noot/multi-builder
  2. checkout and build this branch: cd op-rbuilder && git checkout noot/p2p-sync && cargo build
  3. run builder-playground:
sudo rm -rf ~/.playground ~/.local/share/reth && go run main.go cook opstack --flashblocks --external-builder http://host.docker.internal:4444 --flashblocks-builder ws://host.docker.internal:1111 --base-overlay
  1. check that the sync-only node has started: docker logs devnet-op-rbuilder-sync-only-1 -f
  2. run builder that will build:
./target/debug/op-rbuilder node --chain $HOME/.playground/devnet/l2-genesis.json --http --http.port 2222 --authrpc.port 4444 --authrpc.jwtsecret $HOME/.playground/devnet/jwtsecret --port 30333 --disable-discovery --rollup.builder-secret-key 59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d --trusted-peers enode://79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8@127.0.0.1:30304 --authrpc.addr 0.0.0.0 --flashblocks.enabled --flashblocks.addr 172.17.0.1 --flashblocks.port 1111 --rollup.chain-block-time 2000 --flashblocks.p2p_enabled

you should see logs showing that the nodes connected and that flashblocks are syncing and successfully executing and being added to the canonical chain:

2025-10-15T18:52:31.442158Z  INFO executing flashblock header=Header { parent_hash: 0x70285e5ea71a4e7a3f8201ad26f3e9d56fa7c107b829577ed62f81e50134dcaf, ommers_hash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, beneficiary: 0x4200000000000000000000000000000000000011, state_root: 0x468f6ad3315f8435ef691e752eb3420313c0709d9c10cd5231d069e61ec4c36f, transactions_root: 0xa0ba654a54295a9730299eccbdbda4e485729cac1020d47e63ed7322f61455d9, receipts_root: 0x078cb07a71cd0774760b0d2ef9d538699f8a5a90269eb293f79e6978968225ad, logs_bloom: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, difficulty: 0, number: 25, gas_limit: 60000000, gas_used: 73498, timestamp: 1760554353, extra_data: 0x00000000fa00000006, mix_hash: 0x0130f5ed8cefc24088a9b58715b709e975ce4fd6e4c53d5fefb2a0435b1e9cfc, nonce: 0x0000000000000000, base_fee_per_gas: Some(905213509), withdrawals_root: Some(0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421), blob_gas_used: Some(0), excess_blob_gas: Some(0), parent_beacon_block_root: Some(0x59fe6ce059192b2ce5d0e83a5b149f88d5d10e3d5d69713da1784eccbd6c2d9d), requests_hash: None }
2025-10-15T18:52:31.442901Z  INFO successfully executed flashblock header=Header { parent_hash: 0x70285e5ea71a4e7a3f8201ad26f3e9d56fa7c107b829577ed62f81e50134dcaf, ommers_hash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, beneficiary: 0x4200000000000000000000000000000000000011, state_root: 0x468f6ad3315f8435ef691e752eb3420313c0709d9c10cd5231d069e61ec4c36f, transactions_root: 0xa0ba654a54295a9730299eccbdbda4e485729cac1020d47e63ed7322f61455d9, receipts_root: 0x078cb07a71cd0774760b0d2ef9d538699f8a5a90269eb293f79e6978968225ad, logs_bloom: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, difficulty: 0, number: 25, gas_limit: 60000000, gas_used: 73498, timestamp: 1760554353, extra_data: 0x00000000fa00000006, mix_hash: 0x0130f5ed8cefc24088a9b58715b709e975ce4fd6e4c53d5fefb2a0435b1e9cfc, nonce: 0x0000000000000000, base_fee_per_gas: Some(905213509), withdrawals_root: Some(0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421), blob_gas_used: Some(0), excess_blob_gas: Some(0), parent_beacon_block_root: Some(0x59fe6ce059192b2ce5d0e83a5b149f88d5d10e3d5d69713da1784eccbd6c2d9d), requests_hash: None }
2025-10-15T18:52:31.443200Z  INFO Block added to canonical chain number=25 hash=0x17daba1d7d7386a5af8cb0cff6dac93b4ef310c9ffc88df6ce9af04b59568700 peers=1 txs=2 gas_used=73.50Kgas gas_throughput=5.57Ggas/second gas_limit=60.00Mgas full=0.1% base_fee=0.91Gwei blobs=0 excess_blobs=0 elapsed=13.19µs

💡 Motivation and Context

--- see #275

✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

@noot noot marked this pull request as ready for review October 16, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant