Skip to content

Commit

Permalink
@jtraglia's suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Traglia <[email protected]>
  • Loading branch information
terencechain and jtraglia authored Nov 8, 2024
1 parent e678deb commit b3371b6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions specs/_features/eip7805/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions specs/_features/eip7805/fork-choice.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions specs/_features/eip7805/validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit b3371b6

Please sign in to comment.