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

Address eof-devnet-0 valdation errors #8213

Merged

Conversation

shemnon
Copy link
Contributor

@shemnon shemnon commented Feb 16, 2025

Changes

  • JUMPF is only returning when the target section is returning
  • "short data" containers are valid when inside an inticode container. Tweak needed flags to distinguish between a top level runtime container and an embeded container, and adjust "long data" check.

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Optional. Remove if not applicable.

Documentation

Requires documentation update

  • Yes
  • No

If yes, link the PR to the docs update or the issue with the details labeled docs. Remove if not applicable.

Requires explanation in Release Notes

  • Yes
  • No

If yes, fill in the details here. Remove if not applicable.

Remarks

Optional. Remove if not applicable.

* JUMPF is only returning when the target section is returning
* "short data" containers are valid when inside an inticode container.
  Tweak needed flags to distinguish between a top level runtime
  container and an embeded container, and adjust "long data" check.
@benaadams
Copy link
Member

Thank you so much for tracking this down 💜

if (strategy.HasFlag(ValidationStrategy.ValidateFullBody) && header.DataSection.Size > dataBody.Length)
// If full body validation is requested, or it is runtime mode (but not both)
// the DataSection size must be less than or equal to the data available.
if ((strategy.HasFlag(ValidationStrategy.ValidateRuntimeMode) ^ strategy.HasFlag(ValidationStrategy.ValidateFullBody))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Binary xor is a bit wild 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've finally legitimately used it, and not to implement some VM opcode.

@benaadams benaadams merged commit 6350b85 into NethermindEth:feature/evm/eof Feb 16, 2025
64 checks passed
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