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

Eth-Consensus-version header now passed for json block production from VC #8754

Merged
merged 2 commits into from
Oct 19, 2024

Conversation

rolfyone
Copy link
Contributor

When producing a block, JSON payloads require the Eth-Consensus-version header.

Generally using SSZ this was correct, but there was no test case for JSON block production, and it wasn't providing the header correctly.

Because probably 99% of our block production is via SSZ, this was not really visible.

This would not be a problem for local BN+VC, but if the teku VC ever falls back to json (or is instructed to produce JSON), block production could potentially fail if the BN is following spec.

Changed an AT to check both SSZ and JSON block production.

fixes #8753

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

…m VC

When producing a block, JSON payloads require the Eth-Consensus-version header.

Generally using SSZ this was correct, but there was no test case for JSON block production, and it wasn't providing the header correctly.

Because probably 99% of our block production is via SSZ, this was not really visible.

This would not be a problem for local BN+VC, but if the teku VC ever falls back to json (or is instructed to produce JSON), block production could potentially fail if the BN is following spec.

Changed an AT to check both SSZ and JSON block production.

fixes Consensys#8753

Signed-off-by: Paul Harris <[email protected]>
… and elaborated on changelog.

Signed-off-by: Paul Harris <[email protected]>
Copy link
Contributor

@mehdi-aouadi mehdi-aouadi left a comment

Choose a reason for hiding this comment

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

LGTM
AT is a good way to cover it but I'd also be inclined to add an integration test like we do for the other APIs. A good example is the PostAttestationsV2IntegrationTest where we have a test for the header specifically.
We can go with the current changes and add that in a separate PR though

@mehdi-aouadi
Copy link
Contributor

Just an addition: If we'd want off spec VCs (doesn't send the header) to work any way, we could use the header with slot fall back selector. We could live with that before completely relying on the header. But tbh it's in the spec now and it's legitimate to expect the consensus version header

@rolfyone
Copy link
Contributor Author

Just an addition: If we'd want off spec VCs (doesn't send the header) to work any way, we could use the header with slot fall back selector. We could live with that before completely relying on the header. But tbh it's in the spec now and it's legitimate to expect the consensus version header

yes I have a version with that locally working but I think potentially being spec compliant and updating the changelog is probably a good option.

@rolfyone rolfyone merged commit d761f5b into Consensys:master Oct 19, 2024
17 checks passed
@rolfyone rolfyone deleted the missing-header branch October 19, 2024 20:05
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.

Teku VC Json block production flow is missing a required header
2 participants