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

fix: add checks for hardfork-specific fields to ensure_well_formed_payload #7993

Merged

Conversation

fgimenez
Copy link
Member

@fgimenez fgimenez commented Apr 30, 2024

Adds checks to ensure_well_formed_payload() to ensure that the Cancun specific fields fields are None before Cancun and Some() afterwards.

Additionally, adds checks for the Shanghai fork to ensure that withdrawals are not included before this timestamp and are included afterwards.

Also ensure cancun_fields.fields is None before Cancun and Some() afterwards.

@fgimenez fgimenez force-pushed the fgimenez/do-not-drop-subprotocol-msgs branch from 0463640 to 7407703 Compare May 3, 2024 15:27
@fgimenez fgimenez marked this pull request as ready for review May 3, 2024 15:59
@fgimenez
Copy link
Member Author

fgimenez commented May 3, 2024

I initially added checks for all the conditions but needed to remove these bc of failing tests:

  • cancun active but blob transactions not present
  • shanghai active but withdrawals not present

crates/payload/validator/src/lib.rs Outdated Show resolved Hide resolved
crates/payload/validator/src/lib.rs Outdated Show resolved Hide resolved
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.

lgtm

can include or wait for new as_ref fn

mattsse added a commit to paradigmxyz/revm-inspectors that referenced this pull request May 6, 2024
@fgimenez
Copy link
Member Author

fgimenez commented May 6, 2024

can include or wait for new as_ref fn

cool thx, already proposed bump alloy here #8118

@fgimenez fgimenez force-pushed the fgimenez/do-not-drop-subprotocol-msgs branch from d1f6972 to 466dd78 Compare May 6, 2024 14:01
@fgimenez
Copy link
Member Author

fgimenez commented May 6, 2024

cool thx, already proposed bump alloy here #8118

ok rebased and already using cancun_fields.as_ref

@fgimenez fgimenez added this pull request to the merge queue May 6, 2024
Merged via the queue into paradigmxyz:main with commit b77473c May 6, 2024
28 checks passed
@fgimenez fgimenez deleted the fgimenez/do-not-drop-subprotocol-msgs branch May 6, 2024 15:09
mw2000 pushed a commit to mw2000/reth that referenced this pull request Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants