Skip to content

chore(pytest): temporary consume engine tweak for nimbul-el #1425

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

spencer-tb
Copy link
Contributor

@spencer-tb spencer-tb commented Apr 9, 2025

🗒️ Description

Currently consume-engine is not compatible with nimbus-el. These are due to the following points:

  1. For each forkchoiceUpdate and newPayload request we send, each response should contain the PayloadStatusV1 within it. For nimbus PayloadStatusV1 is missing the validationError field for VALID responses (note it exists for INVALID).

  2. For nimbus the forkchoiceUpdate response doesn't include the payloadId.

Our pydantic models error out due to the latter. This PR adds a temporary workaround that allows us to run consume-engine for nimbus, without breaking other clients.

🔗 Related Issues

N/A

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.

@spencer-tb spencer-tb added scope:pytest Scope: Changes EEST's pytest plugins type:chore Type: Chore labels Apr 9, 2025
@spencer-tb
Copy link
Contributor Author

Assuming this gets approved I will create an issue to revert this change once nimbus updates.

Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

I'm hesitant to add this check to all clients since it is out of spec.

I would incline to add a context-sensitive validator that checks if the client is the nimbus-el, and only then allow this out-of-spec behavior.

I added context to the rpc response validation (for exceptions not client-specific validations) in this PR: https://github.com/ethereum/execution-spec-tests/pull/1416/files

We could cherry-pick the context changes into this PR and then apply these relaxed validation only to nimbus-el.

@@ -84,14 +84,40 @@ class PayloadStatus(CamelModel):

status: PayloadStatusEnum
latest_valid_hash: Hash | None
validation_error: str | None
# TODO: Temporarily optional to allow nimbus-el to run `consume-engine`
validation_error: Optional[str] = None
Copy link
Member

Choose a reason for hiding this comment

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

Was there an error with str | None = None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh will try this

# Allows us to run `consume-engine` for nimbus-el.
@model_validator(mode="before")
@classmethod
def ensure_validation_error(cls, data):
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't this validator be added to PayloadStatus?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me try this as well thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fork:prague Prague hardfork scope:pytest Scope: Changes EEST's pytest plugins type:chore Type: Chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants