reth
reth copied to clipboard
Combine `ExecutionError` and `ValidationError` types
Currently the ExecutionError and ValidationError types serve similar purposes, where ValidationError represents a block validation error that we should unwind because of. ExecutionError represents some error cases that are block validation-related, and other error cases that are not directly related, like the blockchain tree error variants.
ExecutionError:
https://github.com/paradigmxyz/reth/blob/5595ae9a7838dfa7b2e485e2b56715e062c3b604/crates/interfaces/src/executor.rs#L4-L13
ValidationError:
https://github.com/paradigmxyz/reth/blob/5595ae9a7838dfa7b2e485e2b56715e062c3b604/crates/stages/src/error.rs#L14-L22
Error variants here should be deduplicated if possible, and fatal variants in the combined type should be distinguished from the non-fatal variants that we should unwind for.
It would then be easier for stages to catch one of these errors and determine whether or not the pipeline should unwind.
StageError:
https://github.com/paradigmxyz/reth/blob/5595ae9a7838dfa7b2e485e2b56715e062c3b604/crates/stages/src/error.rs#L11-L14