reth
reth copied to clipboard
refactor: replace ValidationError string with PayloadValidationError enum
closes #2720
Do we also need to create seperate PayloadValidationError variants for every consensus/Execution error?
https://github.com/paradigmxyz/reth/blob/5039122c356f20d36e3d5979f0da97a2fc40ac75/crates/consensus/beacon/src/engine/mod.rs#L743-L746
Codecov Report
Merging #2803 (a29c38d) into main (91dd782) will decrease coverage by
27.12%. The diff coverage is0.00%.
| Impacted Files | Coverage Δ | |
|---|---|---|
| crates/rpc/rpc-types/src/eth/engine/payload.rs | 30.89% <0.00%> (-56.50%) |
:arrow_down: |
... and 257 files with indirect coverage changes
| Flag | Coverage Δ | |
|---|---|---|
| integration-tests | 15.88% <0.00%> (-0.01%) |
:arrow_down: |
| unit-tests | 33.98% <0.00%> (-30.12%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Components | Coverage Δ | |
|---|---|---|
| reth binary | 10.74% <ø> (-15.61%) |
:arrow_down: |
| blockchain tree | 69.93% <ø> (-11.33%) |
:arrow_down: |
| pipeline | 49.75% <ø> (-36.93%) |
:arrow_down: |
| storage (db) | 54.01% <ø> (-19.48%) |
:arrow_down: |
| trie | 58.94% <ø> (-35.73%) |
:arrow_down: |
| txpool | 30.28% <ø> (-18.71%) |
:arrow_down: |
| networking | 45.03% <ø> (-32.80%) |
:arrow_down: |
| rpc | 33.81% <0.00%> (-24.31%) |
:arrow_down: |
| consensus | 36.74% <ø> (-26.62%) |
:arrow_down: |
| revm | 18.87% <ø> (-15.99%) |
:arrow_down: |
| payload builder | 6.83% <ø> (ø) |
|
| primitives | 49.89% <ø> (-38.39%) |
:arrow_down: |
okay, so let's get rid of all the deserialize impls?
okay, so let's get rid of all the deserialize impls?
yeah
@Rjected @mattsse what's the path forward here?
After thinking about it, to remove the Deserialize impl we would have to remove it from a bunch of other engine API types. This might be fine, since we only actually serialize those types afaik. Including a more rich type in an error field that needs to be deserialized requires parsing the error, which is why the Deserialize impls are so involved.
I think it's fine to remove the Deserialize impls, but it's a bit more work than I thought so that would be the next steps here.
I thought about this a bit,
and I no longer support replacing string with an enum, because this just further complicates things, it's okay to treat this as a simple error message.
I kept the tests though, ty!