Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: base sepolia support #5697

Merged
merged 9 commits into from
Dec 27, 2023
Merged

feat: base sepolia support #5697

merged 9 commits into from
Dec 27, 2023

Conversation

Chomtana
Copy link
Contributor

@Chomtana Chomtana commented Dec 5, 2023

I have added base sepolia support to reth which should fixes #5653

However, I have not added test cases yet as I don't know how to get base_sepolia_forkids. It would be great if team can advise me on this.

If this looks good will proceed with op sepolia support.

@Chomtana Chomtana changed the title Base sepolia support feat: base sepolia support Dec 5, 2023
@clabby clabby self-assigned this Dec 5, 2023
@clabby clabby added the A-op-reth Related to Optimism and op-reth label Dec 5, 2023
@clabby
Copy link
Collaborator

clabby commented Dec 5, 2023

Thanks for the PR! Will review after work today.

@Chomtana
Copy link
Contributor Author

Chomtana commented Dec 5, 2023

I'm testing running this but unluckily it doesn't advance blocks

Here is our op-node logs

Dec 05 15:59:02 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:02+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmR9YJEMR38uYu26S75Nr3Xdchq8Bg12Y3bYrreVnsjm4d
Dec 05 15:59:02 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:02+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmNoxHro3ty7C3LHLKqzQaNUaRLpj57d4MTyvEXpSCRWGJ
Dec 05 15:59:03 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:03+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAm1qN1noEzzcAaCDgDKGcnHvmX38WaLV4swyA7kCFpY4i3
Dec 05 15:59:05 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:05+0000 lvl=warn msg="failed to notify engine driver of L1 head change" err="context deadline exceeded"
Dec 05 15:59:07 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:07+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmKyyh2XrqVacKzYVwrvS186P5zb3CMnB4Hxz3HgsHFRJ1
Dec 05 15:59:07 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:07+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmJWCquweGvbxGRfdVwwxZxPPwr7qxNYnxhXQrMb2997xs
Dec 05 15:59:08 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:08+0000 lvl=warn msg="failed to notify engine driver of new L2 payload" err="context deadline exceeded" id=0xd24b907c69d965fb4b55647ee1e22d9549841e2aa740f37ed0ab95f09bff77f6:3011619
Dec 05 15:59:08 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:08+0000 lvl=info msg="Received signed execution payload from p2p" id=0x2f2ae79a1f987d392362e9508b38c48da76ac3cad6edf853b3d509737e352291:3011620 peer=16Uiu2HAmVnECeHftoUtVDeeseMQk3gaQDAuh2uC9CnTmv4noZBQD
Dec 05 15:59:09 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:09+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmD8EBKPFPddv5Ew7uFt1zQMACf5jWkjuCSpqAqfkZPCH6
Dec 05 15:59:12 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:12+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAkwgi8yGC7xoUsVCgxzMZ5KXQw89F2EYPAzcWtA3iuXv1s
Dec 05 15:59:13 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:13+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmMVmDasoqwfWirpmwsJH3WwRsy9TP5jw4y5BP9GJEa6Ur
Dec 05 15:59:13 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:13+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmJyHJ74d7Z3SSU1zFpGXbbYC27dNFKSFakH3roCD7rZos
Dec 05 15:59:13 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:13+0000 lvl=info msg="connected to peer"                      peer=16Uiu2HAmJyHJ74d7Z3SSU1zFpGXbbYC27dNFKSFakH3roCD7rZos addr=/ip4/3.236.207.129/tcp/9222
Dec 05 15:59:13 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:13+0000 lvl=info msg="Starting P2P sync client event loop"    peer=16Uiu2HAmJyHJ74d7Z3SSU1zFpGXbbYC27dNFKSFakH3roCD7rZos
Dec 05 15:59:13 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:13+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAm9DqQWWWEeeSewpDhEW9SrjRCadL7J4rkvuYTfZJha9e6
Dec 05 15:59:14 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:14+0000 lvl=info msg="disconnected from peer"                 peer=16Uiu2HAmUFQYVFYdqSiAKD3vXmu175NbByXdGVGcj8F8Net39YGa addr=/ip4/3.87.131.161/tcp/9222
Dec 05 15:59:17 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:17+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAkxKPR9N5n777quKoKmqmHCoCYdeHHGJPGNYvMNckPjwdE
Dec 05 15:59:17 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:17+0000 lvl=warn msg="failed to notify engine driver of L1 head change" err="context deadline exceeded"
Dec 05 15:59:19 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:19+0000 lvl=info msg="loaded new runtime config values!"      p2p_seq_address=0xb830b99c95Ea32300039624Cb567d324D4b1D83C
Dec 05 15:59:19 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:19+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmCMAdrMBdsK7uJhLfMFFUtMJq2YdUNk3aq2TizGxcFens
Dec 05 15:59:19 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:19+0000 lvl=info msg="disconnected from peer"                 peer=16Uiu2HAmKyyh2XrqVacKzYVwrvS186P5zb3CMnB4Hxz3HgsHFRJ1 addr=/ip4/46.4.65.162/tcp/31727
Dec 05 15:59:20 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:20+0000 lvl=info msg="disconnected from peer"                 peer=16Uiu2HAmFDyRWHRo4en69fK1gH1fS9TKezHnu1huveM2FtJTRcWK addr=/ip4/130.61.42.163/tcp/9222
Dec 05 15:59:20 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:20+0000 lvl=info msg="disconnected from peer"                 peer=16Uiu2HAmMEc2rMH6ckSCKGQ2vW955e5ncgrvVuCsLujCa5zqJa93 addr=/ip4/51.159.223.6/tcp/9222
Dec 05 15:59:22 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:22+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAm4nXkvxFyz9GFqp9J3vEckfWMmNLFJNzum4fWYGY6CgAN
Dec 05 15:59:23 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:23+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmG5YCzh8n583zWJ7yQeAgaTs1xcNmWhafTU6oFyhRZ27P
Dec 05 15:59:27 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:27+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmH1JKxSsSFLLJLk3U7zFv2uAvrnURRZFKDCCjQbxyxwLs
Dec 05 15:59:29 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:29+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAkxBQy6cAFetMH5xSgyE38985J2qWoAKATrRyNHAJjDC9u
Dec 05 15:59:29 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:29+0000 lvl=info msg="connected to peer"                      peer=16Uiu2HAkxBQy6cAFetMH5xSgyE38985J2qWoAKATrRyNHAJjDC9u addr=/ip4/34.227.58.0/tcp/9222
Dec 05 15:59:29 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:29+0000 lvl=info msg="Starting P2P sync client event loop"    peer=16Uiu2HAkxBQy6cAFetMH5xSgyE38985J2qWoAKATrRyNHAJjDC9u
Dec 05 15:59:29 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:29+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmRHDfmFCfibswiZWfy9CDuzWrUZyu7eUxJTBNmfrX8HF1
Dec 05 15:59:29 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:29+0000 lvl=warn msg="failed to notify engine driver of L1 head change" err="context deadline exceeded"
Dec 05 15:59:30 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:30+0000 lvl=info msg="connected to peer"                      peer=16Uiu2HAmRHDfmFCfibswiZWfy9CDuzWrUZyu7eUxJTBNmfrX8HF1 addr=/ip4/150.136.167.92/tcp/9222
Dec 05 15:59:30 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:30+0000 lvl=info msg="Starting P2P sync client event loop"    peer=16Uiu2HAmRHDfmFCfibswiZWfy9CDuzWrUZyu7eUxJTBNmfrX8HF1
Dec 05 15:59:30 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:30+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAkxhcpfY3X7ERtmM9cTLPG4XBeN4uTf6Y8EZWDa7dpof7n
Dec 05 15:59:30 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:30+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmR9YJEMR38uYu26S75Nr3Xdchq8Bg12Y3bYrreVnsjm4d
Dec 05 15:59:32 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:32+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmED2vqgsAxn2mNYBib8r1p3QrdjGgo2s42D6ymheXNoWc
Dec 05 15:59:33 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:33+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmUdSqQjC4cm9xxY4YK3StHRLWXe8zoMDTqtwCVh4rWJJM
Dec 05 15:59:34 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:34+0000 lvl=info msg="connected to peer"                      peer=16Uiu2HAmUdSqQjC4cm9xxY4YK3StHRLWXe8zoMDTqtwCVh4rWJJM addr=/ip4/34.227.161.78/tcp/9222
Dec 05 15:59:34 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:34+0000 lvl=info msg="Starting P2P sync client event loop"    peer=16Uiu2HAmUdSqQjC4cm9xxY4YK3StHRLWXe8zoMDTqtwCVh4rWJJM
Dec 05 15:59:34 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:34+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAm2FbGMXt7RBWMWrGyh8Bgqowhfkgk1d7rsnUnXC7AW78Z
Dec 05 15:59:34 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:34+0000 lvl=info msg="disconnected from peer"                 peer=16Uiu2HAmTnZpXQ5MKuPwpJBi58pHN3axntdDanjYPWSzAJ7WbEKe addr=/ip4/18.205.119.124/tcp/9222
Dec 05 15:59:37 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:37+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmNGoQsLSBq5oA7nfEWP4g5kbsPizC4Ge5x6zhtUgFyhJD
Dec 05 15:59:38 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:38+0000 lvl=warn msg="failed to notify engine driver of new L2 payload" err="context deadline exceeded" id=0x2f2ae79a1f987d392362e9508b38c48da76ac3cad6edf853b3d509737e352291:3011620
Dec 05 15:59:38 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:38+0000 lvl=info msg="Received signed execution payload from p2p" id=0x537713881006c2f09f4fb672b5fc458c7bd251077cf079efc2786545d7e56521:3011621 peer=16Uiu2HAmCFeWzFXhQY3QLPuUBmu6pgmRRJDsMG1NacDFaMhPyCfX
Dec 05 15:59:40 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:40+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAm5gN9MPPZoQXjiRvL7HpBmz5Dj7wKrAvokUEq3gX2tR8f
Dec 05 15:59:41 op-reth-fullnode op-node[11560]: t=2023-12-05T15:59:41+0000 lvl=info msg="disconnected from peer"                 peer=16Uiu2HAm6Qn19XuUvLjUtq4QB3Thgb7nFYckMaJnjzy3kPB7KZwz 

op-reth logs

Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.168589Z  INFO reth::cli: Transaction pool initialized
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.168657Z  INFO reth::cli: Connecting to P2P network
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.168777Z  INFO net::peers: Loading saved peers file=/home/upnodedev/.local/share/reth/base_sepolia/known-peers.json
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.172228Z  INFO reth::cli: Connected to P2P network peer_id=0x31de1d8fd51ea3b7e91e08950b49dae7f1f0c72188466584826f51eb3c442538d8a7e0222b4a6994aa37c1b09f2bc496136ec6815de0b19c507f20175a842d21 local_addr=0.0.0.0:30305 enode=enode://31de1d8fd51ea3b7e91e08950b49dae7f1f0c72188466584826f51eb3c442538d8a7e0222b4a6994aa37c1b09f2bc496136ec6815de0b19c507f20175a842d21@127.0.0.1:30305
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.172884Z  INFO reth::cli: Consensus engine initialized
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.172976Z  INFO reth::cli: Engine API handler initialized
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.176308Z  INFO reth::cli: RPC auth server started url=127.0.0.1:9553
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.176432Z  INFO reth::cli: RPC IPC server started url=/tmp/reth.ipc
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.176450Z  INFO reth::cli: RPC HTTP server started url=0.0.0.0:9545
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.176457Z  INFO reth::cli: RPC WS server started url=0.0.0.0:9546
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.176472Z  INFO reth::cli: Starting consensus engine
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.177444Z  INFO blockchain_tree: Block is already canonical, ignoring. block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.177610Z  INFO reth::node::events: Canonical chain committed number=0 hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 elapsed=225.555µs
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.177701Z  INFO reth::node::events: Forkchoice updated head_block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 safe_block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 finalized_block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 status=Valid
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.369654Z  INFO blockchain_tree: Block is already canonical, ignoring. block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.369785Z  INFO reth::node::events: Canonical chain committed number=0 hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 elapsed=134.423µs
Dec 05 15:49:19 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:19.369826Z  INFO reth::node::events: Forkchoice updated head_block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 safe_block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 finalized_block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 status=Valid
Dec 05 15:49:22 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:22.174011Z  INFO reth::cli: Status connected_peers=0 freelist=2 latest_block=0
Dec 05 15:49:47 op-reth-fullnode op-reth[11559]: 2023-12-05T15:49:47.174463Z  INFO reth::cli: Status connected_peers=0 freelist=2 latest_block=0
Dec 05 15:50:12 op-reth-fullnode op-reth[11559]: 2023-12-05T15:50:12.174157Z  INFO reth::cli: Status connected_peers=0 freelist=2 latest_block=0
Dec 05 15:50:37 op-reth-fullnode op-reth[11559]: 2023-12-05T15:50:37.174355Z  INFO reth::cli: Status connected_peers=0 freelist=2 latest_block=0
Dec 05 15:51:02 op-reth-fullnode op-reth[11559]: 2023-12-05T15:51:02.174899Z  INFO reth::cli: Status connected_peers=0 freelist=2 latest_block=0
Dec 05 15:51:16 op-reth-fullnode op-reth[11559]: 2023-12-05T15:51:16.744134Z  INFO blockchain_tree: Block is already canonical, ignoring. block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4
Dec 05 15:51:16 op-reth-fullnode op-reth[11559]: 2023-12-05T15:51:16.744297Z  INFO reth::node::events: Canonical chain committed number=0 hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 elapsed=146.216µs
Dec 05 15:51:16 op-reth-fullnode op-reth[11559]: 2023-12-05T15:51:16.744353Z  INFO reth::node::events: Forkchoice updated head_block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 safe_block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 finalized_block_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 status=Valid
Dec 05 15:51:16 op-reth-fullnode op-reth[11559]: 2023-12-05T15:51:16.744384Z  INFO reth_payload_builder::service: New payload job created id=0x66dfe77e2b4c32e9 parent=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4
Dec 05 15:51:16 op-reth-fullnode op-reth[11559]: 2023-12-05T15:51:16.756372Z  WARN consensus::engine: Error while processing payload error=InsertBlockError { error: Execution(Validation(BlockGasUsed { gas: GotExpected { got: 63965, expected: 1000000 }, gas_spent_by_tx: [(0, 63965)] })), hash: 0x44b52cadd963750a046be3fa0e4f520fa2d4d22b5222e1a8034295c9d2fc6b6c, number: 1, parent_hash: 0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4, num_txs: 1, .. }
Dec 05 15:51:16 op-reth-fullnode op-reth[11559]: 2023-12-05T15:51:16.756401Z  WARN consensus::engine: Invalid block error on new payload invalid_hash=0x44b52cadd963750a046be3fa0e4f520fa2d4d22b5222e1a8034295c9d2fc6b6c invalid_number=1 error=Execution(Validation(BlockGasUsed { gas: GotExpected { got: 63965, expected: 1000000 }, gas_spent_by_tx: [(0, 63965)] }))
Dec 05 15:51:16 op-reth-fullnode op-reth[11559]: 2023-12-05T15:51:16.756410Z  WARN consensus::engine: Bad block with hash hash=0x44b52cadd963750a046be3fa0e4f520fa2d4d22b5222e1a8034295c9d2fc6b6c header=Header { parent_hash: 0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4, ommers_hash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, beneficiary: 0x4200000000000000000000000000000000000011, state_root: 0x7bbfae434ca8ca95b0d2507e990a3252be5df7dbde15bdf7bc733323a48a78ee, transactions_root: 0x54e9f6846ba3df78380177daaeecbe0f8634b302247793c03fc4f3c8e11bc14e, receipts_root: 0xff07e961a994197df0f9406d373ef5d124e6febecf85a74ca0bcd436b2c5ad0e, withdrawals_root: None, logs_bloom: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, difficulty: 0x0_U256, number: 1, gas_limit: 25000000, gas_used: 1000000, timestamp: 1695768290, mix_hash: 0x0d3a4941f9c13233edd63f40847ed54e0050d38b2dff2347e31a76608bdcd83d, nonce: 0, base_fee_per_gas: Some(980000000), blob_gas_used: None, excess_blob_gas: None, parent_beacon_block_root: None, extra_data: Bytes(0x) }
Dec 05 15:51:27 op-reth-fullnode op-reth[11559]: 2023-12-05T15:51:27.174812Z  INFO reth::cli: Status connected_peers=0 freelist=2 latest_block=0
Dec 05 15:51:52 op-reth-fullnode op-reth[11559]: 2023-12-05T15:51:52.174317Z  INFO reth::cli: Status connected_peers=0 freelist=2 latest_block=0
Dec 05 15:52:17 op-reth-fullnode op-reth[11559]: 2023-12-05T15:52:17.174713Z  INFO reth::cli: Status connected_peers=0 freelist=2 latest_block=0
Dec 05 15:52:42 op-reth-fullnode op-reth[11559]: 2023-12-05T15:52:42.174113Z  INFO reth::cli: Status connected_peers=0 freelist=2 latest_block=0

crates/primitives/src/chain/spec.rs Outdated Show resolved Hide resolved
crates/primitives/src/chain/spec.rs Outdated Show resolved Hide resolved
@Chomtana
Copy link
Contributor Author

Chomtana commented Dec 6, 2023

Still got the error which is nonsense as it error about BlockGasUsed

op-geth

Dec 06 06:57:16 op-reth-fullnode op-reth[14128]: 2023-12-06T06:57:16.054960Z  WARN consensus::engine: Error while processing payload error=InsertBlockError { error: Execution(Validation(BlockGasUsed { gas: GotExpected { got: 63965, expected: 1000000 }, gas_spent_by_tx: [(0, 63965)] })), hash: 0x44b52cadd963750a046be3fa0e4f520fa2d4d22b5222e1a8034295c9d2fc6b6c, number: 1, parent_hash: 0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4, num_txs: 1, .. }
Dec 06 06:57:16 op-reth-fullnode op-reth[14128]: 2023-12-06T06:57:16.055016Z  WARN consensus::engine: Invalid block error on new payload invalid_hash=0x44b52cadd963750a046be3fa0e4f520fa2d4d22b5222e1a8034295c9d2fc6b6c invalid_number=1 error=Execution(Validation(BlockGasUsed { gas: GotExpected { got: 63965, expected: 1000000 }, gas_spent_by_tx: [(0, 63965)] }))
Dec 06 06:57:16 op-reth-fullnode op-reth[14128]: 2023-12-06T06:57:16.055029Z  WARN consensus::engine: Bad block with hash hash=0x44b52cadd963750a046be3fa0e4f520fa2d4d22b5222e1a8034295c9d2fc6b6c header=Header { parent_hash: 0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4, ommers_hash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, beneficiary: 0x4200000000000000000000000000000000000011, state_root: 0x7bbfae434ca8ca95b0d2507e990a3252be5df7dbde15bdf7bc733323a48a78ee, transactions_root: 0x54e9f6846ba3df78380177daaeecbe0f8634b302247793c03fc4f3c8e11bc14e, receipts_root: 0xff07e961a994197df0f9406d373ef5d124e6febecf85a74ca0bcd436b2c5ad0e, withdrawals_root: None, logs_bloom: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, difficulty: 0x0_U256, number: 1, gas_limit: 25000000, gas_used: 1000000, timestamp: 1695768290, mix_hash: 0x0d3a4941f9c13233edd63f40847ed54e0050d38b2dff2347e31a76608bdcd83d, nonce: 0, base_fee_per_gas: Some(980000000), blob_gas_used: None, excess_blob_gas: None, parent_beacon_block_root: None, extra_data: Bytes(0x) }

op-node

Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=info msg="Advancing bq origin"                    origin=0x2c8726436d28248113da87814b0721a65f2bf365d38820df31c2a9d232deaf83:4371286 originBehind=false
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=info msg="Advancing bq origin"                    origin=0xec7b2358e2dea1f05eb5efb46f053dc8f97e96c7f7d3cc460df09857565803d6:4371287 originBehind=false
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=info msg="Advancing bq origin"                    origin=0xa9b19d4df35a55feec5bffa84e01d6f22098cec085031af6446d45a79c5a870c:4371288 originBehind=false
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=info msg="created new channel"                    origin=0xa9b19d4df35a55feec5bffa84e01d6f22098cec085031af6446d45a79c5a870c:4371288 channel=6e687ab2153b70ca155383a6dc1931b6 length=105,609 frame_number=0 is_last=true
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=info msg="Reading channel"                        channel=6e687ab2153b70ca155383a6dc1931b6 frames=1
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=info msg="Found next batch"                       batch_timestamp=1,695,768,290 parent_hash=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4 batch_epoch=0xcac9a83291d4dec146d6f7f69ab2304f23f5be87b1789119a0c5b1e4482444ed:4370868 txs=0
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=info msg="generated attributes in payload queue"  txs=1 timestamp=1,695,768,290
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=eror msg="cancelling old block sealing job"       payload=0x66dfe77e2b4c32e9
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=warn msg="could not process payload derived from L1 data, dropping batch" err="failed to complete building on top of L2 chain 0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4:0, id: 0x66dfe77e2b4c32e9, error (3): execution payload 0x44b52cadd963750a046be3fa0e4f520fa2d4d22b5222e1a8034295c9d2fc6b6c:1 was INVALID! Latest valid hash is 0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4, ignoring bad block: 0xc004053080"
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=eror msg="deposit only block was invalid"         parent=0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4:0 err="failed to complete building on top of L2 chain 0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4:0, id: 0x66dfe77e2b4c32e9, error (3): execution payload 0x44b52cadd963750a046be3fa0e4f520fa2d4d22b5222e1a8034295c9d2fc6b6c:1 was INVALID! Latest valid hash is 0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4, ignoring bad block: 0xc004053080"
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=eror msg="Derivation process critical error"      err="engine stage failed: crit: failed to process block with only deposit transactions: failed to complete building on top of L2 chain 0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4:0, id: 0x66dfe77e2b4c32e9, error (3): execution payload 0x44b52cadd963750a046be3fa0e4f520fa2d4d22b5222e1a8034295c9d2fc6b6c:1 was INVALID! Latest valid hash is 0x0dcc9e089e30b90ddfc55be9a37dd15bc551aeee999d2e2b51414c54eaf934e4, ignoring bad block: 0xc004053080"
Dec 06 06:51:21 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:21+0000 lvl=info msg="State loop returned"
Dec 06 06:51:23 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:23+0000 lvl=info msg="Received signed execution payload from p2p" id=0x6e70a8d9bbcdef1226f2415cdeeef878a0115157e9d75d4143a5a14ef0062a38:3038597 peer=16Uiu2HAkvcoELKxhAAKNscnycAUK7uYitAZMoMxEk2pazVag5UYH
Dec 06 06:51:23 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:23+0000 lvl=info msg="disconnected from peer"                 peer=16Uiu2HAmCFeWzFXhQY3QLPuUBmu6pgmRRJDsMG1NacDFaMhPyCfX addr=/ip4/54.235.20.108/tcp/9222
Dec 06 06:51:24 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:24+0000 lvl=info msg="Received signed execution payload from p2p" id=0xbb0b8dcd17c4217743620128d33985e9e014efb5f0c747cb28fa9175646b8c29:3038598 peer=16Uiu2HAmNoxHro3ty7C3LHLKqzQaNUaRLpj57d4MTyvEXpSCRWGJ
Dec 06 06:51:26 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:26+0000 lvl=info msg="Received signed execution payload from p2p" id=0x69823bde1dc978448a309169ceca70823fefdf69f615decc4e4f92b951818206:3038599 peer=16Uiu2HAmFMqvsatuZ2AsMncXqybkKSbShu1ZwnQ7ZieAcsFE3HHZ
Dec 06 06:51:27 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:27+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmTbpjqKPjg33ux212Y3dpGDS4o5VPyTk9Rmkgj64RskRX
Dec 06 06:51:27 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:27+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmUdSqQjC4cm9xxY4YK3StHRLWXe8zoMDTqtwCVh4rWJJM
Dec 06 06:51:27 op-reth-fullnode op-node[13999]: t=2023-12-06T06:51:27+0000 lvl=info msg="attempting connection"                  peer=16Uiu2HAmVnECeHftoUtVDeeseMQk3gaQDAuh2uC9CnTmv4noZBQD

@clabby
Copy link
Collaborator

clabby commented Dec 7, 2023

Gotcha! I can take a look this weekend. In the meantime, is your L1 Sepolia node an archive node?

@Chomtana
Copy link
Contributor Author

Chomtana commented Dec 7, 2023

It's a quicknode one (50$/month plan) which should be an archive node

@quickchase
Copy link

Any update here? 🙂

@rkrasiuk
Copy link
Member

@clabby @Chomtana what are the next steps here?

@Chomtana
Copy link
Contributor Author

https://base-sepolia.blockscout.com/block/1

Block hash: 0x44b31f42f3327b2497c94acd1d62dd3965b23da06268316e6085dbaf9900c22c

But in reth it says 0x44b52cadd963750a046be3fa0e4f520fa2d4d22b5222e1a8034295c9d2fc6b6c

which is invalid

@mattsse
Copy link
Collaborator

mattsse commented Dec 27, 2023

the gas mismatch is very odd, not sure where the (gas_used: 1000000) gas_used is coming from?

but this is wrong?

if I query the first base sepolia block: cast rpc eth_getBlockByNumber "0x1" true --rpc-url https://sepolia.base.org

I get gas used by the block:
"gasUsed": "0xf9dd", (63965)

and for the systemTx:
"gas": "0xf4240", 1000000

@Chomtana if I read the logs correctly then it looks like the op-node sends an invalid payload to op-reth?

hmm, this entire setup is very confusing to me, why is there payload building involved here?
perhaps there's an issue with the gas_used because of lack of gas refunds?

@clabby

@mattsse
Copy link
Collaborator

mattsse commented Dec 27, 2023

Update:

I think I've found the bug; regolith is timestamp based hardfork and must be initialized as such, see also BASE_MAINNET:

https://github.com/paradigmxyz/reth/blob/main/crates/primitives/src/chain/spec.rs#L421-L421

this would explain the wrong gas_used because there are no refunds if regolith is not activated.

mind giving this another try @Chomtana ?

@Chomtana
Copy link
Contributor Author

Testing now. Thank you very much

@Chomtana
Copy link
Contributor Author

@mattsse it's looking good

reth

image

op-node

image

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

in that case, happy to include this, all chainspec values look fine to me

Copy link
Collaborator

@clabby clabby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for losing track of this; Thought I squared away my todo list prior to logging off for the holidays 😅

Good catch @mattsse; LGTM.

@mattsse mattsse added this pull request to the merge queue Dec 27, 2023
Merged via the queue into paradigmxyz:main with commit ed774e9 Dec 27, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for OP/Base Sepolia
5 participants