paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.78k stars 1.02k forks source link

Holesky state root mismatch #7619

Closed pistomat closed 4 months ago

pistomat commented 4 months ago

Describe the bug

Getting the state root mismatch error on Holesky full node after a short node downtime

I come from the state root mismatch warroom, checked out the latest main, built and run the reth db stats --checksum

Steps to reproduce

Run a holesky full node

Node logs

So it happened again, posting all the logs I get before crash

Apr 13 12:16:33 nuc13 systemd[1]: reth.service: Failed with result 'exit-code'. 
Apr 13 12:16:33 nuc13 systemd[1]: reth.service: Consumed 3.170s CPU time. 
Apr 13 12:16:36 nuc13 systemd[1]: reth.service: Scheduled restart job, restart counter is at 2. 
Apr 13 12:16:36 nuc13 systemd[1]: Stopped Reth Execution Layer Client service. 
Apr 13 12:16:36 nuc13 systemd[1]: reth.service: Consumed 3.170s CPU time. 
Apr 13 12:16:36 nuc13 systemd[1]: Started Reth Execution Layer Client service. 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.561131Z  INFO Starting reth version="0.2.0-beta.5-dev (3237ad2a8)" 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.561783Z  INFO Opening database path="/var/lib/reth/db" 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.565338Z  INFO Configuration loaded path="/var/lib/reth/reth.toml" 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.566911Z  INFO Database opened 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.566925Z  INFO Starting metrics endpoint addr=127.0.0.1:9001 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.567079Z  INFO 
Apr 13 12:16:36 nuc13 reth[505287]: Pre-merge hard forks (block based): 
Apr 13 12:16:36 nuc13 reth[505287]: - Frontier                         @0 
Apr 13 12:16:36 nuc13 reth[505287]: - Homestead                        @0 
Apr 13 12:16:36 nuc13 reth[505287]: - Dao                              @0 
Apr 13 12:16:36 nuc13 reth[505287]: - Tangerine                        @0 
Apr 13 12:16:36 nuc13 reth[505287]: - SpuriousDragon                   @0 
Apr 13 12:16:36 nuc13 reth[505287]: - Byzantium                        @0 
Apr 13 12:16:36 nuc13 reth[505287]: - Constantinople                   @0 
Apr 13 12:16:36 nuc13 reth[505287]: - Petersburg                       @0 
Apr 13 12:16:36 nuc13 reth[505287]: - Istanbul                         @0 
Apr 13 12:16:36 nuc13 reth[505287]: - MuirGlacier                      @0 
Apr 13 12:16:36 nuc13 reth[505287]: - Berlin                           @0 
Apr 13 12:16:36 nuc13 reth[505287]: - London                           @0 
Apr 13 12:16:36 nuc13 reth[505287]: Merge hard forks: 
Apr 13 12:16:36 nuc13 reth[505287]: - Paris                            @0 (network is known to be merged) 
Apr 13 12:16:36 nuc13 reth[505287]: Post-merge hard forks (timestamp based): 
Apr 13 12:16:36 nuc13 reth[505287]: - Shanghai                         @1696000704 
Apr 13 12:16:36 nuc13 reth[505287]: - Cancun                           @1707305664 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.626582Z  INFO Transaction pool initialized 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.626606Z  INFO Connecting to P2P network 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.626668Z  INFO Loading saved peers file=/var/lib/reth/known-peers.json 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.627748Z  INFO StaticFileProducer initialized 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.627823Z  INFO Pruner initialized prune_config=PruneConfig { block_interval: 5, segments: PruneModes { sender_recovery: Some(Full), transaction_lookup: None, receipts: Some(Before(0)), account_history: Some(Distance(10064)), storage_history: Some(Distance(10064)), receipts_log_filter: ReceiptsLogPruneConfig({0x4242424242424242424242424242424242424242: Before(0)}) } } 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.627889Z  INFO Consensus engine initialized 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.627908Z  INFO Engine API handler initialized 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629242Z  INFO RPC auth server started url=127.0.0.1:8551 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629351Z  INFO RPC IPC server started url=/tmp/reth.ipc 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629355Z  INFO RPC HTTP server started url=127.0.0.1:8545 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629357Z  INFO RPC WS server started url=127.0.0.1:8546 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629362Z  INFO Starting consensus engine 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629702Z  INFO Preparing stage pipeline_stages=1/12 stage=Headers checkpoint=1337139 target=None 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629703Z  INFO Target block already reached checkpoint=1337139 target=Hash(0x9bf31af3ca41a421cf05a682936a23c50c86865c1451ef8f5a87074a50849ee2) 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629732Z  INFO Executing stage pipeline_stages=1/12 stage=Headers checkpoint=1337139 target=None 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629828Z  INFO Finished stage pipeline_stages=1/12 stage=Headers checkpoint=1337139 target=None stage_progress=100.00% 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629845Z  INFO Preparing stage pipeline_stages=2/12 stage=Bodies checkpoint=1337139 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629852Z  INFO Executing stage pipeline_stages=2/12 stage=Bodies checkpoint=1337139 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629860Z  INFO Finished stage pipeline_stages=2/12 stage=Bodies checkpoint=1337139 target=1337139 stage_progress=100.00% 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629873Z  INFO Stage is always skipped 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629877Z  INFO Preparing stage pipeline_stages=3/12 stage=SenderRecovery checkpoint=1337139 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629884Z  INFO Executing stage pipeline_stages=3/12 stage=SenderRecovery checkpoint=1337139 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629891Z  INFO Finished stage pipeline_stages=3/12 stage=SenderRecovery checkpoint=1337139 target=1337139 stage_progress=99.99% 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629897Z  INFO Preparing stage pipeline_stages=4/12 stage=Execution checkpoint=1337139 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629903Z  INFO Executing stage pipeline_stages=4/12 stage=Execution checkpoint=1337139 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629910Z  INFO Finished stage pipeline_stages=4/12 stage=Execution checkpoint=1337139 target=1337139 stage_progress=100.00% 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629918Z  INFO Preparing stage pipeline_stages=5/12 stage=MerkleUnwind checkpoint=1337139 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629924Z  INFO Executing stage pipeline_stages=5/12 stage=MerkleUnwind checkpoint=1337139 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629930Z  INFO Finished stage pipeline_stages=5/12 stage=MerkleUnwind checkpoint=1337139 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629936Z  INFO Preparing stage pipeline_stages=6/12 stage=AccountHashing checkpoint=1336931 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.629942Z  INFO Executing stage pipeline_stages=6/12 stage=AccountHashing checkpoint=1336931 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.701880Z  INFO Finished stage pipeline_stages=6/12 stage=AccountHashing checkpoint=1337139 target=1337139 stage_progress=100.00% 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.723228Z  INFO Preparing stage pipeline_stages=7/12 stage=StorageHashing checkpoint=1336931 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.723254Z  INFO Executing stage pipeline_stages=7/12 stage=StorageHashing checkpoint=1336931 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.899736Z  INFO Finished stage pipeline_stages=7/12 stage=StorageHashing checkpoint=1337139 target=1337139 stage_progress=100.00% 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.946153Z  INFO Preparing stage pipeline_stages=8/12 stage=MerkleExecute checkpoint=1336931 target=1337139 
Apr 13 12:16:36 nuc13 reth[505287]: 2024-04-13T10:16:36.946181Z  INFO Executing stage pipeline_stages=8/12 stage=MerkleExecute checkpoint=1336931 target=1337139 
Apr 13 12:16:38 nuc13 reth[505287]: 2024-04-13T10:16:38.295381Z  INFO Received forkchoice updated message when syncing head_block_hash=0x8c8430f6f3aaa2e781d0dc76ead864b1eba750f265d201ed83bcae475e792e57 safe_block_hash=0x67bf9031653d64285285d925c4ce3dc564a52a7af50b7d8ba52a1290ab302a10 finalized_block_hash=0x5c52f3979d0d4900c443bae5868431f75b8959d52eba22f5256c8492ce932838 
Apr 13 12:16:38 nuc13 reth[505287]: 2024-04-13T10:16:38.448158Z  WARN Failed to verify block state root target_block=1337139 got=0xf339af638c6c2a6e696d2cda9a5aa0a260b9d0fa4ec226d5c0e76db91c5a15b0 expected=SealedHeader { hash: 0x9bf31af3ca41a421cf05a682936a23c50c86865c1451ef8f5a87074a50849ee2, header: Header { parent_hash: 0xe64cc71cfbe21248128c756dcc47a79d34ea852895f2ea2908da19394fc0fa04, ommers_hash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, beneficiary: 0x9baa3244565d51d9c7897c0eb6679ed4890e536e, state_root: 0x5c0071282a49ca27c45cd289cd6c33445820a63443257042102da8148e59f32e, transactions_root: 0xb8ad7a2f77c04094acfe35ef317dcbef813bad3a67af4c567f0cf1325b400942, receipts_root: 0x044da19b6bbd09905977a0c407e0d8613aedfc0ec796257006fe6f6f1122f7dc, withdrawals_root: Some(0x14ee52cf9f3b680a40d42ff502e2994e75039cbaa67ae0953d65fab47e71150d), logs_bloom: 0x15001000094002002000030000004dd4e1c108248600008044ae20244011c4eb2019710501882220021c204824822604182e221db10344022a340188222d100c0006c23240b1020510070c195400081061038500780c1100749746190a9040205001001846a140c20c050c857424090e441893800220d921000042141020044480001668048010f20080541c800048a14810b0090b000490301580010123162003a2a80047041500502015211d8018023f220e2050a4c818b48000260c14028c321884438000b5000d01808201cc1f0008602913009000002518310009c5602a401000240805ed0c2350098380098990ce0c800c0280a150043056105200c420, difficulty: 0x0_U256, number: 1337139, gas_limit: 30000000, gas_used: 15146437, timestamp: 1712994228, mix_hash: 0x14bdaa6b4d5ce5ca4803aaf2c42dc7f53e8e165d133b438588cea025b5aef9f3, nonce: 0, base_fee_per_gas: Some(1555332838), blob_gas_used: Some(524288), excess_blob_gas: Some(79560704), parent_beacon_block_root: Some(0x5dd523643cca358a3b1797a8dd5a6301c8ad9d8d5ae71462363ab1590b9aba42), extra_data: 0x } } 
Apr 13 12:16:38 nuc13 reth[505287]: 2024-04-13T10:16:38.448266Z ERROR Stage encountered a validation error: mismatched block state root: got 0xf339af638c6c2a6e696d2cda9a5aa0a260b9d0fa4ec226d5c0e76db91c5a15b0, expected 0x5c0071282a49ca27c45cd289cd6c33445820a63443257042102da8148e59f32e stage=MerkleExecute bad_block=1337139 
Apr 13 12:16:38 nuc13 reth[505287]: 2024-04-13T10:16:38.568375Z  INFO Unwinding{stage=StorageHashing}: Stage unwound stage=StorageHashing unwind_to=1336931 progress=1336931 done=true 
Apr 13 12:16:38 nuc13 reth[505287]: 2024-04-13T10:16:38.730625Z  INFO Unwinding{stage=AccountHashing}: Stage unwound stage=AccountHashing unwind_to=1336931 progress=1336931 done=true 
Apr 13 12:16:39 nuc13 reth[505287]: 2024-04-13T10:16:39.593469Z  WARN Unwinding{stage=MerkleUnwind}: Failed to verify block state root target_block=1336931 got=0x4c58076e9e0493c26848041376e88e9501a114d2f431e599467577146df56272 expected=SealedHeader { hash: 0xb6031d3ce90a8dd0eddc0928020523803cf2b2bf4c427d239f5faf0e90c985b9, header: Header { parent_hash: 0xd176f3b9cc5ae0ecbd96827765ac1a0edea8fded71f97e2ef52af7af9f68e003, ommers_hash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, beneficiary: 0xbcff060f601684a0dbf5b0ea48d8dcc112f4ff2f, state_root: 0x6fd8c329f6f8bdc3ede9da9f3caa36fbb1e93cdd9189efcfdbe99510a47fc29c, transactions_root: 0x95553b12c5e475c65ce0dc1fa83cce131eadddb01d5bd353c9d5a1191935e71c, receipts_root: 0x087be94c62d2f77a0bdc41d3323474f8b4d286366e5bf90ef5d1d46963f58ea2, withdrawals_root: Some(0x6e6c4888df701671e97110acfa69b3a1f533db28d9bda4dd6b0da52adefbee4a), logs_bloom: 0x0810025008020200108001810a1000524080c0620440d0881484080c504041281c00452100010200908d20a208080100220020492047100062948300a03e2a000000808c2410020141830d0d0e00d40143010020200050c000454459a0e090002c4000000a00040080c0034500104c0012000820000390280040101f00a000c080000108e0000080008000400009813006002100040100102806018140a014048b001b090000840006c04108078800102804003048490000980081a4010000810208041a02202c0108a8408481944598010100221c98384040199844500230200233a08a11022400200051022109a100883480000001010031aa080840802400, difficulty: 0x0_U256, number: 1336931, gas_limit: 30000000, gas_used: 19086161, timestamp: 1712991396, mix_hash: 0x8d0c50f1399ff1fbcd41999ac7a57b5591edaee3cf1fe8ee2676eafd0241832f, nonce: 0, base_fee_per_gas: Some(635436827), blob_gas_used: Some(655360), excess_blob_gas: Some(79298560), parent_beacon_block_root: Some(0x96a0450222350089ec0aa80ca8a1616b89a9f3664e6565673571ea0fee41759d), extra_data: 0xd883010d0b846765746888676f312e32312e36856c696e7578 } } 
Apr 13 12:16:39 nuc13 reth[505287]: 2024-04-13T10:16:39.600996Z ERROR shutting down due to error 
Apr 13 12:16:39 nuc13 reth[505287]: Error: stage encountered an error in block #1336931: validation error: mismatched block state root: got 0x4c58076e9e0493c26848041376e88e9501a114d2f431e599467577146df56272, expected 0x6fd8c329f6f8bdc3ede9da9f3caa36fbb1e93cdd9189efcfdbe99510a47fc29c 
Apr 13 12:16:39 nuc13 reth[505287]: Caused by: 
Apr 13 12:16:39 nuc13 reth[505287]:    0: validation error: mismatched block state root: got 0x4c58076e9e0493c26848041376e88e9501a114d2f431e599467577146df56272, expected 0x6fd8c329f6f8bdc3ede9da9f3caa36fbb1e93cdd9189efcfdbe99510a47fc29c 
Apr 13 12:16:39 nuc13 reth[505287]:    1: mismatched block state root: got 0x4c58076e9e0493c26848041376e88e9501a114d2f431e599467577146df56272, expected 0x6fd8c329f6f8bdc3ede9da9f3caa36fbb1e93cdd9189efcfdbe99510a47fc29c 
Apr 13 12:16:39 nuc13 reth[505287]: Location: 
Apr 13 12:16:39 nuc13 reth[505287]:     /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/task/poll.rs:255:39 
Apr 13 12:16:39 nuc13 reth[505287]: 2024-04-13T10:16:39.601335Z  INFO Wrote network peers to file peers_file="/var/lib/reth/known-peers.json" 
Apr 13 12:16:39 nuc13 systemd[1]: reth.service: Main process exited, code=exited, status=1/FAILURE 
Apr 13 12:16:39 nuc13 systemd[1]: reth.service: Failed with result 'exit-code'. 
Apr 13 12:16:39 nuc13 systemd[1]: reth.service: Consumed 3.183s CPU time. 

$ reth db stats --checksum
2024-04-13T10:20:03.305291Z  INFO Calculating checksum for table: CanonicalHeaders
2024-04-13T10:20:03.305358Z  INFO Hashed 0 entries.
2024-04-13T10:20:03.305380Z  INFO Calculating checksum for table: HeaderTerminalDifficulties
2024-04-13T10:20:03.305445Z  INFO Hashed 0 entries.
2024-04-13T10:20:03.305455Z  INFO Calculating checksum for table: HeaderNumbers
...

2024-04-13T10:28:34.612798Z  INFO Calculating checksum for table: TransactionSenders
2024-04-13T10:28:34.613004Z  INFO Hashed 0 entries.
2024-04-13T10:28:34.619450Z  INFO Calculating checksum for table: StageCheckpoints
2024-04-13T10:28:34.619533Z  INFO Hashed 0 entries.
2024-04-13T10:28:34.619548Z  INFO Calculating checksum for table: StageCheckpointProgresses
2024-04-13T10:28:34.619610Z  INFO Hashed 0 entries.
2024-04-13T10:28:34.619620Z  INFO Calculating checksum for table: PruneCheckpoints
2024-04-13T10:28:34.619700Z  INFO Hashed 0 entries.
2024-04-13T10:28:34.619711Z  INFO Calculating checksum for table: VersionHistory
2024-04-13T10:28:34.619770Z  INFO Hashed 0 entries.
| Table                      | Checksum         | Elapsed        |
|----------------------------|------------------|----------------|
| CanonicalHeaders           | 595dd8002fb74c3f | 19.022µs       |
| HeaderTerminalDifficulties | 3897d82438fc49f2 | 8.232µs        |
| HeaderNumbers              | 99c89111a27c0c50 | 2.602169554s   |
| Headers                    | e2c35c66f5de6cfe | 1.030214ms     |
| BlockBodyIndices           | aae1b2741f6b1f8e | 932.81668ms    |
| BlockOmmers                | 4de175ca3f146051 | 2.004µs        |
| BlockWithdrawals           | c95ee18f1815a87  | 12.928633851s  |
| Transactions               | f90922f0fe6efd61 | 91.185062ms    |
| TransactionHashNumbers     | 8e57e29f82199a9c | 86.108722753s  |
| TransactionBlocks          | ecb22bdeddbf6740 | 619.588458ms   |
| Receipts                   | 6d3eaa50c67f86a8 | 16.935915157s  |
| Bytecodes                  | 3e067a5e504555a6 | 8.329494753s   |
| PlainAccountState          | 96c85432e929dc7c | 52.040015185s  |
| PlainStorageState          | 6ac66abeedb588d4 | 88.448583761s  |
| AccountsHistory            | 6233337f807e590c | 3.145459668s   |
| StoragesHistory            | f8b375cbd64adfbc | 6.443895667s   |
| AccountChangeSets          | c64c25f32b745599 | 1.321719052s   |
| StorageChangeSets          | c9bdc8ad139bb1d8 | 16.990263942s  |
| HashedAccounts             | d25b5a4a346ccec9 | 67.618650313s  |
| HashedStorages             | aa7fc53db75d7a34 | 101.702344159s |
| AccountsTrie               | 1b864c699eb67fde | 12.811838542s  |
| StoragesTrie               | 1ebccbca8178e3b4 | 32.226745029s  |
| TransactionSenders         | 61569456b75b8d29 | 6.439018ms     |
| StageCheckpoints           | 622239e2dbf7be09 | 12.177µs       |
| StageCheckpointProgresses  | 7880b8a1b8c7d827 | 7.565µs        |
| PruneCheckpoints           | e1ea92bd362333cb | 8.812µs        |
| VersionHistory             | 77c4d670f203a8f7 | 8.125µs        |
| -------------------------- | ---------------- | -------------- |
| Total elapsed              |                  | 511.305576755s |

| Segment      | Block Range       | Transaction Range   | Shape (columns x rows) | Data Size | Index Size | Offsets Size | Config Size | Total Size |
|--------------|-------------------|---------------------|------------------------|-----------|------------|--------------|-------------|------------|
| Headers      | 0..=499999        | N/A                 | 3 x 500000             | 163.1 MiB | 0 B        | 11.4 MiB     | 75 B        | 174.6 MiB  |
| Headers      | 500000..=999999   | N/A                 | 3 x 500000             | 220.9 MiB | 0 B        | 11.4 MiB     | 75 B        | 232.3 MiB  |
| Headers      | 1000000..=1337139 | N/A                 | 3 x 337140             | 187 MiB   | 0 B        | 7.7 MiB      | 75 B        | 194.7 MiB  |
| Transactions | 0..=499999        | 0..=1903501         | 1 x 1903502            | 664.1 MiB | 0 B        | 14.5 MiB     | 87 B        | 678.7 MiB  |
| Transactions | 500000..=999999   | 1903502..=30681966  | 1 x 28778465           | 10.9 GiB  | 0 B        | 219.6 MiB    | 87 B        | 11.1 GiB   |
| Transactions | 1000000..=1337139 | 30681967..=42160680 | 1 x 11478714           | 16.8 GiB  | 0 B        | 87.6 MiB     | 87 B        | 16.9 GiB   |
| ------------ | ----------------- | ------------------- | ---------------------- | --------- | ---------- | ------------ | ----------- | ---------- |
| Total        |                   |                     |                        | 28.9 GiB  | 0 B        | 352.3 MiB    | 486 B       | 29.3 GiB   |

| Table Name                 | # Entries | Branch Pages | Leaf Pages | Overflow Pages | Total Size |
|----------------------------|-----------|--------------|------------|----------------|------------|
| AccountChangeSets          | 983378    | 2826         | 12730      | 0              | 60.8 MiB   |
| AccountsHistory            | 500708    | 642          | 43420      | 97             | 172.5 MiB  |
| AccountsTrie               | 2283883   | 803          | 160208     | 0              | 628.9 MiB  |
| BlockBodyIndices           | 1337140   | 36           | 7813       | 0              | 30.7 MiB   |
| BlockOmmers                | 0         | 0            | 0          | 0              | 0 B        |
| BlockWithdrawals           | 1327487   | 848          | 189585     | 0              | 743.9 MiB  |
| Bytecodes                  | 59739     | 49           | 3470       | 123767         | 497.2 MiB  |
| CanonicalHeaders           | 71        | 1            | 2          | 0              | 12 KiB     |
| HashedAccounts             | 30282162  | 12544        | 794984     | 0              | 3.1 GiB    |
| HashedStorages             | 54432057  | 21935        | 1135072    | 0              | 4.4 GiB    |
| HeaderNumbers              | 1337140   | 425          | 31272      | 0              | 123.8 MiB  |
| HeaderTerminalDifficulties | 71        | 0            | 1          | 0              | 4 KiB      |
| Headers                    | 71        | 1            | 13         | 0              | 56 KiB     |
| PlainAccountState          | 30286653  | 5689         | 564568     | 0              | 2.2 GiB    |
| PlainStorageState          | 54452243  | 19815        | 995605     | 0              | 3.9 GiB    |
| PruneCheckpoints           | 5         | 0            | 1          | 0              | 4 KiB      |
| Receipts                   | 3500578   | 653          | 145808     | 76044          | 869.2 MiB  |
| StageCheckpointProgresses  | 1         | 0            | 1          | 0              | 4 KiB      |
| StageCheckpoints           | 12        | 0            | 1          | 0              | 4 KiB      |
| StorageChangeSets          | 12212336  | 24866        | 181513     | 0              | 806.2 MiB  |
| StoragesHistory            | 1150638   | 4697         | 91452      | 83             | 375.9 MiB  |
| StoragesTrie               | 4382940   | 44864        | 375497     | 0              | 1.6 GiB    |
| TransactionBlocks          | 1164184   | 35           | 7463       | 0              | 29.3 MiB   |
| TransactionHashNumbers     | 42151036  | 14319        | 968999     | 0              | 3.8 GiB    |
| TransactionSenders         | 9645      | 1            | 91         | 0              | 368 KiB    |
| Transactions               | 3293      | 3            | 202        | 1195           | 5.5 MiB    |
| VersionHistory             | 3         | 0            | 1          | 0              | 4 KiB      |
| -------------------------- | --------- | ------------ | ---------- | -------------- | ---------- |
| Tables                     |           |              |            |                | 23.1 GiB   |
| Freelist                   | 361054    |              |            |                | 1.4 GiB    |

Platform(s)

Linux (x86)

What version/commit are you on?

$ reth --version
reth Version: 0.2.0-beta.5-dev
Commit SHA: 3237ad2a8
Build Timestamp: 2024-04-13T10:08:11.262400615Z
Build Features: jemalloc
Build Profile: release

What database version are you on?

$ reth db version
Current database version: 2
Local database is uninitialized

What type of node are you running?

Full via --full flag

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

make install

Code of Conduct

pistomat commented 4 months ago

Here are my logs reth.log EDIT: full log.1 (previously truncated) reth.log.1.zip

winksaville commented 4 months ago

@pistomat

The reth.log file starts with

2024-04-13T08:30:34.296405Z DEBUG storage::db::mdbx: Commit total_duration=24.489903ms commit_latency=Some(CommitLatency(MDBX_commit_latency { preparation: 0, gc_wallclock: 12, audit: 0, write: 0, sync: 1578, ending: 0, whole: 1591, gc_cputime: 0, gc_prof: MDBX_commit_latency__bindgen_ty_1 { wloops: 0, coalescences: 0, wipes: 0, flushes: 0, kicks: 0, work_counter: 0, work_rtime_monotonic: 0, work_xtime_cpu: 0, work_rsteps: 0, work_xpages: 0, work_majflt: 0, self_counter: 0, self_rtime_monotonic: 0, self_xtime_cpu: 0, self_rsteps: 0, self_xpages: 0, self_majflt: 0 } })) is_read_only=false

The reth.log.1.txt file ends with:

2024-04-10T18:20:13.744223Z DEBUG trie::parallel_state_root: pre-calculating storage roots len=134
2024-04-10T18:20:13.886711Z DEBUG blockchain_tree::chain: Validated state root number=1320312 hash=0xc9610a7c6c9909648de9571e614bf87a0bee2e046e7b5fa63f2c1593f186e96d elapsed=144.087248ms
2024-04-10T18:20:13.886793Z DEBUG

The last line looks like it's truncated and the date is April 10, where as reth.log begins with a April 13 date. So it looks like reth.log.1.txt was truncated as I'd expect it to have a ending time stamp of 2024-04-13T08:30:33.xxx or 2024-04-13T08:30:34.yyyyyyZ, where yyyyyy is < 296405.

pistomat commented 4 months ago

Oh yeah, it got truncated on downloading from the node, it was way larger than I expected.

@winksaville nontruncated file: reth.log.1.zip

winksaville commented 4 months ago

Oh yeah, it got truncated on downloading from the node, it was way larger than I expected.

@winksaville nontruncated file: reth.log.1.zip

This reth.log.1 is similar to mine, there are many WARN Failed to insert block lines in the log that are identical except for the time stamp, using uniq it shows count, 262, and the first instance`:

wink@3900x 24-04-13T16:49:19.355Z:~/reth-lighthouse-issues/reth-issue-7619
$ rg 'Failed to insert block' reth.log.1 | uniq -cf 1
    262 2024-04-13T06:56:51.378872Z  WARN consensus::engine: Error while processing payload error=Failed to insert block (hash=0xe0276077b2294e2f5db876b8beff7c1c4d5c42c1710a95b743b6d708240d1329, number=1336932, parent_hash=0xb6031d3ce90a8dd0eddc0928020523803cf2b2bf4c427d239f5faf0e90c985b9): mismatched block state root: got 0xcc29631fbe7093c6c1901617130c44d96e3fd2226590cfa06923e1b6051e7784, expected 0xad7c30ac21e4a512b5e0a9ec0741865d84d6cb2e8ee300f2be1609932e5d2ca4
wink@3900x 24-04-13T16:49:30.780Z:~/reth-lighthouse-issues/reth-issue-7619

My guess is that whatever lead up to this first Failed to insert block might be the root cause.

winksaville commented 4 months ago

Here is the uniq output from my holesky node:

kendall@ethel 24-04-13T17:54:52.608Z:~/eth2-data/reth/holesky
$ ls -lrt reth.log*
-rw-r--r-- 1 kendall kendall 209715241 Mar 25 08:57 reth.log.4
-rw-r--r-- 1 kendall kendall 209715331 Apr  3 10:07 reth.log.3
-rw-r--r-- 1 kendall kendall 209715655 Apr  8 10:26 reth.log.2
-rw-r--r-- 1 kendall kendall 209716221 Apr 12 12:59 reth.log.1
-rw-r--r-- 1 kendall kendall  36055006 Apr 13 10:55 reth.log
kendall@ethel 24-04-13T17:55:02.640Z:~/eth2-data/reth/holesky
$ rg 'Failed to insert block' reth.log.4 | uniq -cf 1
kendall@ethel 24-04-13T17:55:48.612Z:~/eth2-data/reth/holesky
$ rg 'Failed to insert block' reth.log.3 | uniq -cf 1
    168 2024-03-26T17:10:51.389084Z  WARN consensus::engine: Error while processing payload error=Failed to insert block (hash=0xd6bf93f17c15eef43e4fe34c675ce89d8c7d88ee2b5a341336ec587bfe066bbf, number=1221400, parent_hash=0xb211ed799d6b6fc2acfa9b71da8339127ec7fa397e3921868e0d906fcdbc4773): mismatched block state root: got 0xcdf1b990b63256e10ebd8e53f5e278047ae1b7f81c83f9b371a59e81d002ceb9, expected 0x871f69bf1cc2e24823e4a25f52e6e6af3134d97264bb16d617b4b69fc1114bf1
     98 2024-04-02T05:16:50.721056Z  WARN consensus::engine: Error while processing payload error=Failed to insert block (hash=0x168c92f7f36f0d968ee9f0353268af64c0e987e098f0b29d9d99483f1f6e4af2, number=1264353, parent_hash=0x4fe60b1e2aaccc7e25006671727879e2a2535fa087231efaa0424821bf9fa57e): mismatched block state root: got 0xa34bd0e7cebbf20708fbae4423721a00106e19e2fd075818f05d0582df314694, expected 0x4ed32b88c105a497378e0773cf741fcac17ab4474b074f515e0ad7f99dbb4af8
kendall@ethel 24-04-13T17:55:52.046Z:~/eth2-data/reth/holesky
$ rg 'Failed to insert block' reth.log.2 | uniq -cf 1
    121 2024-04-04T00:45:02.611461Z  WARN consensus::engine: Error while processing payload error=Failed to insert block (hash=0x20f3f909f84db85a78eb8b2b47716d188fe38471aa57f51c9e49959827f3e7ab, number=1276302, parent_hash=0x6e7d2560a8904fea597335628d2296185061316d821bd85ea818937316e07d36): mismatched block state root: got 0xd009436e581fa5d10f05a91189f8d4a244dc1c6f9eec91a6fcd8f8a4b1d51f97, expected 0xd03305890ff60b20ca96716ae8456f51918e37659a68e8bd2f2719527ecaac96
    132 2024-04-08T10:14:16.306330Z  WARN consensus::engine: Error while processing payload error=Failed to insert block (hash=0x75d33ca50ce5995c5829e318419a0457440a866982c717269d8ab59aa58d9378, number=1305364, parent_hash=0x5c44156fbe0b623395752c0881c6a52ebb7fd33f97307b6964da70fa0be94c65): mismatched block state root: got 0x1f4fa2a54d8d8d028b23247c85a769dbcc0c9b81fc61f5b1fc7a7ab07241d524, expected 0x617aa48146e8cec830faf41f4b8b36f1104e4c496c304ef5b37829bde06ac9df
kendall@ethel 24-04-13T17:55:55.046Z:~/eth2-data/reth/holesky
$ rg 'Failed to insert block' reth.log.1 | uniq -cf 1
kendall@ethel 24-04-13T17:55:59.022Z:~/eth2-data/reth/holesky
$ rg 'Failed to insert block' reth.log | uniq -cf 1
kendall@ethel 24-04-13T17:56:03.656Z:~/eth2-data/reth/holesky
gakonst commented 4 months ago

Fixed in #7753.