mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Update to consensus-specs v1.1.9 (#3016)
## Issue Addressed Closes #3014 ## Proposed Changes - Rename `receipt_root` to `receipts_root` - Rename `execute_payload` to `notify_new_payload` - This is slightly weird since we modify everything except the actual HTTP call to the engine API. That change is expected to be implemented in #2985 (cc @ethDreamer) - Enable "random" tests for Bellatrix. ## Notes This will break *partially* compatibility with Kintusgi testnets in order to gain compatibility with [Kiln](https://hackmd.io/@n0ble/kiln-spec) testnets. I think it will only break the BN APIs due to the `receipts_root` change, however it might have some other effects too. Co-authored-by: Michael Sproul <micsproul@gmail.com>
This commit is contained in:
@@ -27,11 +27,11 @@ use types::*;
|
||||
///
|
||||
/// ## Specification
|
||||
///
|
||||
/// Equivalent to the `execute_payload` function in the merge Beacon Chain Changes, although it
|
||||
/// Equivalent to the `notify_new_payload` function in the merge Beacon Chain Changes, although it
|
||||
/// contains a few extra checks by running `partially_verify_execution_payload` first:
|
||||
///
|
||||
/// https://github.com/ethereum/consensus-specs/blob/v1.1.5/specs/merge/beacon-chain.md#execute_payload
|
||||
pub fn execute_payload<T: BeaconChainTypes>(
|
||||
/// https://github.com/ethereum/consensus-specs/blob/v1.1.9/specs/bellatrix/beacon-chain.md#notify_new_payload
|
||||
pub fn notify_new_payload<T: BeaconChainTypes>(
|
||||
chain: &BeaconChain<T>,
|
||||
state: &BeaconState<T::EthSpec>,
|
||||
block: BeaconBlockRef<T::EthSpec>,
|
||||
@@ -53,10 +53,10 @@ pub fn execute_payload<T: BeaconChainTypes>(
|
||||
.execution_layer
|
||||
.as_ref()
|
||||
.ok_or(ExecutionPayloadError::NoExecutionConnection)?;
|
||||
let execute_payload_response = execution_layer
|
||||
.block_on(|execution_layer| execution_layer.execute_payload(execution_payload));
|
||||
let notify_new_payload_response = execution_layer
|
||||
.block_on(|execution_layer| execution_layer.notify_new_payload(execution_payload));
|
||||
|
||||
match execute_payload_response {
|
||||
match notify_new_payload_response {
|
||||
Ok((status, _latest_valid_hash)) => match status {
|
||||
ExecutePayloadResponseStatus::Valid => Ok(PayloadVerificationStatus::Verified),
|
||||
// TODO(merge): invalidate any invalid ancestors of this block in fork choice.
|
||||
|
||||
Reference in New Issue
Block a user