erigon-pulse/consensus
Andrew Ashikhmin 17d6f86218
Don't mark blocks as bad on transient errors (#8197)
For example, erigon on devnet8 marked a block as bad due to
"mdbx_cursor_open: cannot allocate memory":
```
[INFO] [09-12|04:57:36.041] [NewPayload] Handling new payload        height=171035 hash=0x321dea00c4853ee354bebaf8aef3e63fbe06c4508271c0db4c92b0f087aedc3b
171034
[WARN] [09-12|04:57:36.069] Could not validate block                 err="[3/7 BlockHashes] table: Header, mdbx_cursor_open: cannot allocate memory, stack: [kv_mdbx.go:1057 kv_mdbx.
go:1069 kv_mdbx.go:1077 memory_mutation.go:473 memory_mutation.go:502 etl.go:123 etl.go:96 block_writer.go:40 stage_blockhashes.go:49 default_stages.go:457 sync.go:425 sync.go:258 s
tageloop.go:414 backend.go:476 fork_validator.go:250 fork_validator.go:156 ethereum_execution.go:151 execution_client.go:51 chain_reader.go:252 engine_server.go:741 engine_server.go
:235 engine_server.go:600 value.go:586 value.go:370 service.go:224 handler.go:494 handler.go:444 handler.go:392 handler.go:223 handler.go:316 asm_amd64.s:1598]"
[WARN] [09-12|04:57:36.069] ethereumExecutionModule.ValidateChain: chain is invalid hash=0x321dea00c4853ee354bebaf8aef3e63fbe06c4508271c0db4c92b0f087aedc3b
```
With this PR blocks are marked as bad only on genuine protocol errors.
2023-09-17 11:14:36 +02:00
..
aura Move ApplyDAOHardFork & UpgradeBuildInSystemContract to engine.Initialize (#8095) 2023-08-30 15:51:19 +02:00
bor Get vote on hash (#8172) 2023-09-13 11:49:49 +01:00
clique Move ApplyDAOHardFork & UpgradeBuildInSystemContract to engine.Initialize (#8095) 2023-08-30 15:51:19 +02:00
ethash Remove unused metrics and out of date versions (#8109) 2023-09-01 07:13:13 +07:00
merge Move ApplyDAOHardFork & UpgradeBuildInSystemContract to engine.Initialize (#8095) 2023-08-30 15:51:19 +02:00
misc EIP-4788 v2 (no precompile) (#8038) 2023-08-24 17:10:50 +02:00
chain_reader.go Add FrozenBlocks function to chainReaders (#7866) 2023-07-10 17:35:27 +01:00
consensus.go Move ApplyDAOHardFork & UpgradeBuildInSystemContract to engine.Initialize (#8095) 2023-08-30 15:51:19 +02:00
errors.go Don't mark blocks as bad on transient errors (#8197) 2023-09-17 11:14:36 +02:00
result.go Clean up DEBUG category logs (#2776) 2021-10-05 08:14:04 +07:00