From b3371b6c19da93a0bd035a3d8cf5c89d9aae1d17 Mon Sep 17 00:00:00 2001 From: terence Date: Fri, 8 Nov 2024 01:35:59 -0800 Subject: [PATCH] @jtraglia's suggestions Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com> --- specs/_features/eip7805/beacon-chain.md | 8 ++++---- specs/_features/eip7805/fork-choice.md | 6 +++--- specs/_features/eip7805/validator.md | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/specs/_features/eip7805/beacon-chain.md b/specs/_features/eip7805/beacon-chain.md index cf59ee1ca3..f128bab7b2 100644 --- a/specs/_features/eip7805/beacon-chain.md +++ b/specs/_features/eip7805/beacon-chain.md @@ -43,7 +43,7 @@ This is the beacon chain specification to add EIP-7805 / fork-choice enforced, c | Name | Value | | - | - | -| `DOMAIN_IL_COMMITTEE` | `DomainType('0x0C000000')` # (New in EIP-7805)| +| `DOMAIN_IL_COMMITTEE` | `DomainType('0x0C000000')` # (New in EIP7805) | ### Inclusion List Committee @@ -55,7 +55,7 @@ This is the beacon chain specification to add EIP-7805 / fork-choice enforced, c | Name | Value | | - | - | -| `MAX_TRANSACTIONS_PER_INCLUSION_LIST` | `uint64(1)` # (New in EIP-7805) TODO: Placeholder | +| `MAX_TRANSACTIONS_PER_INCLUSION_LIST` | `uint64(1)` # (New in EIP-7805) TODO: Placeholder | ## Containers @@ -88,14 +88,14 @@ def is_valid_inclusion_list_signature( state: BeaconState, signed_inclusion_list: SignedInclusionList) -> bool: """ - Check if ``signed_inclusion_list`` has a valid signature + Check if ``signed_inclusion_list`` has a valid signature. """ message = signed_inclusion_list.message index = message.validator_index pubkey = state.validators[index].pubkey domain = get_domain(state, DOMAIN_IL_COMMITTEE, compute_epoch_at_slot(message.slot)) signing_root = compute_signing_root(message, domain) - return bls.FastAggregateVerify(pubkey, signing_root, signed_inclusion_list.signature) + return bls.Verify(pubkey, signing_root, signed_inclusion_list.signature) ``` ### Beacon State accessors diff --git a/specs/_features/eip7805/fork-choice.md b/specs/_features/eip7805/fork-choice.md index fc4db346eb..2e268b292c 100644 --- a/specs/_features/eip7805/fork-choice.md +++ b/specs/_features/eip7805/fork-choice.md @@ -21,7 +21,7 @@ This is the modification of the fork choice accompanying the EIP-7805 upgrade. | Name | Value | Unit | Duration | | - | - | :-: | :-: | -| `VIEW_FREEZE_DEADLINE` | `uint64(9)` | seconds | 9 seconds | # [New in EIP-7805] +| `VIEW_FREEZE_DEADLINE` | `uint64(9)` | seconds | 9 seconds # (New in EIP7805) | ## Helpers @@ -68,7 +68,7 @@ def on_inclusion_list( signed_inclusion_list: SignedInclusionList, inclusion_list_committee: Vector[ValidatorIndex, IL_COMMITTEE_SIZE]]) -> None: """ - ``on_inclusion_list`` verify the inclusion list before importing it to fork choice store. + Verify the inclusion list and import it into the fork choice store. If there exists more than 1 inclusion list in store with the same slot and validator index, remove the original one. """ message = signed_inclusion_list.message @@ -98,7 +98,7 @@ def on_inclusion_list( if validator_index not in inclusion_list_equivocators[(message.slot, root)]: if validator_index in [il.validator_index for il in inclusion_lists[(message.slot, root)]]: il = [il for il in inclusion_lists[(message.slot, root)] if il.validator_index == validator_index][0] - if not il == message: + if validator_il != message: # We have equivocation evidence for `validator_index`, record it as equivocator inclusion_list_equivocators[(message.slot, root)].add(validator_index) # This inclusion list is not an equivocation. Store it if prior to the view freeze deadline diff --git a/specs/_features/eip7805/validator.md b/specs/_features/eip7805/validator.md index af27256c1b..1e719b9dba 100644 --- a/specs/_features/eip7805/validator.md +++ b/specs/_features/eip7805/validator.md @@ -51,7 +51,7 @@ The body of these function is implementation dependent. The Engine API may be us ## New inclusion list committee assignment -A validator may be a member of the new Inclusion List Committee (ILC) for a given slot. To check for ILC assignments the validator uses the helper `get_ilc_assignment(state, epoch, validator_index)` where `epoch <= next_epoch`. +A validator may be a member of the new Inclusion List Committee (ILC) for a given slot. To check for ILC assignments the validator uses the helper `get_ilc_assignment(state, epoch, validator_index)` where `epoch <= next_epoch`. ILC selection is only stable within the context of the current and next epoch. @@ -82,7 +82,7 @@ def get_ilc_assignment( ### Block proposal -Proposers are still expected to propose `SignedBeaconBlock` at the beginning of any slot during which `is_proposer(state, validator_index)` returns `true`. The mechanism to prepare this beacon block and related sidecars differs from previous forks as follows: +Proposers are still expected to propose `SignedBeaconBlock` at the beginning of any slot during which `is_proposer(state, validator_index)` returns true. The mechanism to prepare this beacon block and related sidecars differs from previous forks as follows: #### Update execution client with inclusion lists @@ -93,7 +93,7 @@ The proposer should call `engine_updateInclusionListV1` at `PROPOSER_INCLUSION_L Some validators are selected to submit signed inclusion list. Validators should call `get_ilc_assignment` at the beginning of an epoch to be prepared to submit their inclusion list during the next epoch. -A validator should create and broadcast the `signed_inclusion_list` to the global `inclusion_list` subnet by the `inclusion_list_CUT_OFF` in the slot, unless a block for the current slot has been processed and is the head of the chain and broadcast to the network. +A validator should create and broadcast the `signed_inclusion_list` to the global `inclusion_list` subnet by `PROPOSER_INCLUSION_LIST_CUT_OFF` seconds into the slot, unless a block for the current slot has been processed and is the head of the chain and broadcast to the network. #### Constructing a signed inclusion list