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

Kintsugi on_merge_block tests #2811

Merged
merged 16 commits into from
Nov 17, 2021

Conversation

paulhauner
Copy link
Member

@paulhauner paulhauner commented Nov 15, 2021

Issue Addressed

NA

Proposed Changes

Implements all of the execution-facing parts of the v1.1.5 consensus specification (e.g., prepare_execution_payload, validate_merge_block, etc).

Also, runs the fork_choice/on_merge_block tests from the EF tests. We are still ignoring one test, that's because we don't have the ability to retrospectively verify the merge block after an optimistic sync. I did manually disable optimistic sync and observe that test passing. We can pick that test up in the coming weeks as we hone our optimistic sync implementation.

TODO

  • Fork choice changes
  • Validator changes
  • Self-review and testing

@paulhauner paulhauner added work-in-progress PR is a work-in-progress kintsugi 🍵 labels Nov 15, 2021
@paulhauner paulhauner mentioned this pull request Nov 15, 2021
@paulhauner paulhauner force-pushed the kintsugi-terminal-block branch from e709e8d to 6b216e2 Compare November 16, 2021 03:25
@paulhauner paulhauner changed the title Kintsugi validator and forkchoice changes Kintsugi on_merge_block tests Nov 16, 2021
Copy link
Member

@realbigsean realbigsean left a comment

Choose a reason for hiding this comment

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

Looks really good! Had a couple comments, nothing really of substance


/// Extracts a reference to an execution payload from a block, returning an error if there is a
/// fork mismatch.
fn execution_payload_ref<T: EthSpec>(
Copy link
Member

Choose a reason for hiding this comment

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

Could move this to the BeaconBlockRef impl

///
/// ## Specification
///
/// Partially equivalent to the `process_execution_payload` function:
Copy link
Member

Choose a reason for hiding this comment

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

Seems like this is a copy-paste from partially_verify_execution_payload

@@ -505,25 +521,31 @@ impl ExecutionLayer {

self.execution_blocks().await.put(block.block_hash, block);

// TODO(merge): This function can theoretically loop indefinitely, as per the
// specification. We should consider how to fix this. See discussion:
// TODO(merge): This implementation assumes that the following PR is merged:
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this was merged. Unreleased still, so not sure if you want to keep this TODO?

.runtime()
.upgrade()
.ok_or(Error::ShuttingDown)?;
// TODO(paul): respect the shutdown signal.
Copy link
Member

Choose a reason for hiding this comment

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

Do you want this one resolved prior to merge?

@paulhauner
Copy link
Member Author

All comments addressed, thank you!

@paulhauner paulhauner added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Nov 16, 2021
@paulhauner paulhauner merged commit d2e0c48 into sigp:kintsugi Nov 17, 2021
paulhauner added a commit that referenced this pull request Nov 28, 2021
* Start v1.1.5 updates

* Implement new payload creation logic

* Tidy, add comments

* Remove unused error enums

* Add validate payload for gossip

* Refactor validate_merge_block

* Split payload verification in per block processing

* Add execute_payload

* Tidy

* Tidy

* Start working on new fork choice tests

* Fix failing merge block test

* Skip block_lookup_failed test

* Fix failing terminal block test

* Fixes from self-review

* Address review comments
paulhauner added a commit that referenced this pull request Nov 28, 2021
* Start v1.1.5 updates

* Implement new payload creation logic

* Tidy, add comments

* Remove unused error enums

* Add validate payload for gossip

* Refactor validate_merge_block

* Split payload verification in per block processing

* Add execute_payload

* Tidy

* Tidy

* Start working on new fork choice tests

* Fix failing merge block test

* Skip block_lookup_failed test

* Fix failing terminal block test

* Fixes from self-review

* Address review comments
paulhauner added a commit that referenced this pull request Dec 2, 2021
* Start v1.1.5 updates

* Implement new payload creation logic

* Tidy, add comments

* Remove unused error enums

* Add validate payload for gossip

* Refactor validate_merge_block

* Split payload verification in per block processing

* Add execute_payload

* Tidy

* Tidy

* Start working on new fork choice tests

* Fix failing merge block test

* Skip block_lookup_failed test

* Fix failing terminal block test

* Fixes from self-review

* Address review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kintsugi 🍵 ready-for-review The code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants