Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 74 additions & 1 deletion .ethspecify.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v1.7.0-alpha.2
version: v1.7.0-alpha.4
style: full

specrefs:
Expand All @@ -23,6 +23,8 @@ exceptions:
- PTC_SIZE#gloas

constants:
# heze
- DOMAIN_INCLUSION_LIST_COMMITTEE#heze
# phase0
- BASIS_POINTS#phase0
- ENDIANNESS#phase0
Expand Down Expand Up @@ -72,10 +74,30 @@ exceptions:
- GLOAS_FORK_EPOCH#gloas
- GLOAS_FORK_VERSION#gloas
- SYNC_MESSAGE_DUE_BPS_GLOAS#gloas
# heze
- HEZE_FORK_EPOCH#heze
- HEZE_FORK_VERSION#heze
- INCLUSION_LIST_SUBMISSION_DUE_BPS#heze
- MAX_BYTES_PER_INCLUSION_LIST#heze
- MAX_REQUEST_INCLUSION_LIST#heze
- PROPOSER_INCLUSION_LIST_CUTOFF_BPS#heze
- VIEW_FREEZE_CUTOFF_BPS#heze

ssz_objects:
# phase0
- Eth1Block#phase0
# fulu
- PartialDataColumnHeader#fulu
- PartialDataColumnPartsMetadata#fulu
- PartialDataColumnSidecar#fulu
# gloas
- PartialDataColumnHeader#gloas
# heze
- BeaconState#heze
- ExecutionPayloadBid#heze
- InclusionList#heze
- SignedExecutionPayloadBid#heze
- SignedInclusionList#heze
# capella
- LightClientBootstrap#capella
- LightClientFinalityUpdate#capella
Expand Down Expand Up @@ -105,6 +127,7 @@ exceptions:
dataclasses:
# phase0
- LatestMessage#phase0
- Seen#phase0
- Store#phase0
# altair
- LightClientStore#altair
Expand All @@ -121,6 +144,11 @@ exceptions:
- ExpectedWithdrawals#gloas
- LatestMessage#gloas
- Store#gloas
# heze
- GetInclusionListResponse#heze
- InclusionListStore#heze
- PayloadAttributes#heze
- Store#heze

functions:
# Functions implemented by KZG library for EIP-4844
Expand Down Expand Up @@ -177,11 +205,22 @@ exceptions:
- verify_cell_kzg_proof_batch_impl#fulu

# phase0
- compute_attestation_subnet_prefix_bits#phase0
- compute_min_epochs_for_block_requests#phase0
- compute_time_at_slot_ms#phase0
- is_not_from_future_slot#phase0
- is_within_slot_range#phase0
- update_proposer_boost_root#phase0
- is_proposer_equivocation#phase0
- record_block_timeliness#phase0
- compute_proposer_score#phase0
- get_attestation_score#phase0
- validate_attester_slashing_gossip#phase0
- validate_beacon_aggregate_and_proof_gossip#phase0
- validate_beacon_attestation_gossip#phase0
- validate_beacon_block_gossip#phase0
- validate_proposer_slashing_gossip#phase0
- validate_voluntary_exit_gossip#phase0
- calculate_committee_fraction#phase0
- compute_fork_version#phase0
- compute_pulled_up_tip#phase0
Expand Down Expand Up @@ -272,6 +311,7 @@ exceptions:
- upgrade_lc_store_to_capella#capella
- upgrade_lc_update_to_capella#capella
# deneb
- compute_max_request_blob_sidecars#deneb
- get_lc_execution_root#deneb
- is_valid_light_client_header#deneb
- prepare_execution_payload#deneb
Expand All @@ -282,6 +322,7 @@ exceptions:
- upgrade_lc_store_to_deneb#deneb
- upgrade_lc_update_to_deneb#deneb
# electra
- compute_max_request_blob_sidecars#electra
- compute_weak_subjectivity_period#electra
- current_sync_committee_gindex_at_slot#electra
- finalized_root_gindex_at_slot#electra
Expand All @@ -303,12 +344,20 @@ exceptions:
- upgrade_lc_store_to_electra#electra
- upgrade_lc_update_to_electra#electra
# fulu
- compute_max_request_data_column_sidecars#fulu
- compute_matrix#fulu
- verify_partial_data_column_header_inclusion_proof#fulu
- verify_partial_data_column_sidecar_kzg_proofs#fulu
- get_blob_parameters#fulu
- get_data_column_sidecars_from_block#fulu
- get_data_column_sidecars_from_column_sidecar#fulu
- recover_matrix#fulu
# gloas
- compute_ptc#gloas
- initialize_ptc_window#gloas
- is_payload_data_available#gloas
- is_pending_validator#gloas
- process_ptc_window#gloas
- compute_balance_weighted_acceptance#gloas
- compute_balance_weighted_selection#gloas
- compute_fork_version#gloas
Expand Down Expand Up @@ -406,6 +455,28 @@ exceptions:
- update_next_withdrawal_builder_index#gloas
- update_payload_expected_withdrawals#gloas
- update_proposer_boost_root#gloas
# heze
- compute_fork_version#heze
- get_forkchoice_store#heze
- get_inclusion_list_bits#heze
- get_inclusion_list_committee_assignment#heze
- get_inclusion_list_committee#heze
- get_inclusion_list_signature#heze
- get_inclusion_list_store#heze
- get_inclusion_list_submission_due_ms#heze
- get_inclusion_list_transactions#heze
- get_proposer_inclusion_list_cutoff_ms#heze
- get_view_freeze_cutoff_ms#heze
- is_inclusion_list_bits_inclusive#heze
- is_payload_inclusion_list_satisfied#heze
- is_valid_inclusion_list_signature#heze
- on_execution_payload#heze
- on_inclusion_list#heze
- prepare_execution_payload#heze
- process_inclusion_list#heze
- record_payload_inclusion_list_satisfaction#heze
- should_extend_payload#heze
- upgrade_to_heze#heze

presets:
# gloas
Expand All @@ -414,3 +485,5 @@ exceptions:
- MAX_BUILDERS_PER_WITHDRAWALS_SWEEP#gloas
- MAX_PAYLOAD_ATTESTATIONS#gloas
- PTC_SIZE#gloas
# heze
- INCLUSION_LIST_COMMITTEE_SIZE#heze
10 changes: 5 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,16 @@ filegroup(
url = "https://github.com/ethereum/EIPs/archive/5480440fe51742ed23342b68cf106cefd427e39d.tar.gz",
)

consensus_spec_version = "v1.7.0-alpha.2"
consensus_spec_version = "v1.7.0-alpha.4"

load("@prysm//tools:download_spectests.bzl", "consensus_spec_tests")

consensus_spec_tests(
name = "consensus_spec_tests",
flavors = {
"general": "sha256-iGQsGZ1cHah+2CSod9jC3kN8Ku4n6KO0hIwfINrn/po=",
"minimal": "sha256-TgcYt8N8sXSttdHTGvOa+exUZ1zn1UzlAMz0V7i37xc=",
"mainnet": "sha256-LnXyiLoJtrvEvbqLDSAAqpLMdN/lXv92SAgYG8fNjCs=",
"general": "sha256-kNJxuhCtW4RbuS9nb4U6JXHlPgTSg6G3hWeHFVB9gZ4=",
"minimal": "sha256-U1tCkXxtdI6mkEdk80i8z9LU2hAyf7Ztz5SBYo5oMzo=",
"mainnet": "sha256-Ga8VDOcNhTTdXDj8tSyBVYrwya9f1HO94ehJ5vv91r4=",
},
version = consensus_spec_version,
)
Expand All @@ -298,7 +298,7 @@ filegroup(
visibility = ["//visibility:public"],
)
""",
integrity = "sha256-Y/67Dg393PksZj5rTFNLntiJ6hNdB7Rxbu5gZE2gebY=",
integrity = "sha256-XHu5K/65mue+5po63L9yGTFjGfU1RGj4S56dmcHc2Rs=",
strip_prefix = "consensus-specs-" + consensus_spec_version[1:],
url = "https://github.com/ethereum/consensus-specs/archive/refs/tags/%s.tar.gz" % consensus_spec_version,
)
Expand Down
1 change: 0 additions & 1 deletion beacon-chain/blockchain/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ go_test(
"//beacon-chain/core/altair:go_default_library",
"//beacon-chain/core/blocks:go_default_library",
"//beacon-chain/core/feed/state:go_default_library",
"//beacon-chain/core/gloas:go_default_library",
"//beacon-chain/core/helpers:go_default_library",
"//beacon-chain/core/peerdas:go_default_library",
"//beacon-chain/core/signing:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/blockchain/chain_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
"github.com/OffchainLabs/prysm/v7/genesis"
enginev1 "github.com/OffchainLabs/prysm/v7/proto/engine/v1"
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
"github.com/OffchainLabs/prysm/v7/time/slots"
"github.com/OffchainLabs/prysm/v7/testing/assert"
"github.com/OffchainLabs/prysm/v7/testing/require"
"github.com/OffchainLabs/prysm/v7/testing/util"
"github.com/OffchainLabs/prysm/v7/time/slots"
"google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/blockchain/process_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ func (s *Service) handleBlockPayloadAttestations(ctx context.Context, blk interf
if len(atts) == 0 {
return nil
}
committee, err := gloas.PayloadCommittee(ctx, st, blk.Slot()-1)
committee, err := st.PayloadCommittee(blk.Slot() - 1)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions beacon-chain/blockchain/process_block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/OffchainLabs/prysm/v7/beacon-chain/cache"
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/blocks"
statefeed "github.com/OffchainLabs/prysm/v7/beacon-chain/core/feed/state"
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/gloas"
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/helpers"
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/peerdas"
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/signing"
Expand Down Expand Up @@ -3556,7 +3555,7 @@ func TestHandleBlockPayloadAttestations(t *testing.T) {
base, insertBlk := testGloasState(t, 1, parentRoot, blockHash)
insertGloasBlock(t, s, base, insertBlk, blockRoot)

ptc, err := gloas.PayloadCommittee(ctx, headState, 1)
ptc, err := headState.PayloadCommittee(1)
require.NoError(t, err)
require.NotEqual(t, 0, len(ptc))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package blockchain
import (
"testing"

"github.com/OffchainLabs/prysm/v7/beacon-chain/core/gloas"
mockExecution "github.com/OffchainLabs/prysm/v7/beacon-chain/execution/testing"
"github.com/OffchainLabs/prysm/v7/beacon-chain/state"
"github.com/OffchainLabs/prysm/v7/config/params"
Expand Down Expand Up @@ -51,7 +50,7 @@ func TestReceivePayloadAttestationMessage_ValidatorNotInPTC(t *testing.T) {
require.NoError(t, err)
s.head = &head{root: blockRoot, block: wsb, state: headState, slot: 1}

ptc, err := gloas.PayloadCommittee(ctx, headState, 1)
ptc, err := headState.PayloadCommittee(1)
require.NoError(t, err)

// Pick a validator index not in the PTC.
Expand Down Expand Up @@ -100,7 +99,7 @@ func TestReceivePayloadAttestationMessage_OK(t *testing.T) {
require.NoError(t, err)
s.head = &head{root: blockRoot, block: wsb, state: headState, slot: 1}

ptc, err := gloas.PayloadCommittee(ctx, headState, 1)
ptc, err := headState.PayloadCommittee(1)
require.NoError(t, err)
require.NotEqual(t, 0, len(ptc))

Expand Down
1 change: 1 addition & 0 deletions beacon-chain/core/gloas/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ go_library(
"//crypto/bls/common:go_default_library",
"//crypto/hash:go_default_library",
"//encoding/bytesutil:go_default_library",
"//monitoring/tracing/trace:go_default_library",
"//proto/engine/v1:go_default_library",
"//proto/prysm/v1alpha1:go_default_library",
"//runtime/version:go_default_library",
Expand Down
9 changes: 6 additions & 3 deletions beacon-chain/core/gloas/deposit_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func processDepositRequests(ctx context.Context, beaconState state.BeaconState,

// processDepositRequest processes the specific deposit request
//
// <spec fn="process_deposit_request" fork="gloas" hash="3c6b0310">
// <spec fn="process_deposit_request" fork="gloas" hash="0e8b94ab">
// def process_deposit_request(state: BeaconState, deposit_request: DepositRequest) -> None:
// # [New in Gloas:EIP7732]
// builder_pubkeys = [b.pubkey for b in state.builders]
Expand All @@ -40,8 +40,11 @@ func processDepositRequests(ctx context.Context, beaconState state.BeaconState,
// # already exists with this pubkey, apply the deposit to their balance
// is_builder = deposit_request.pubkey in builder_pubkeys
// is_validator = deposit_request.pubkey in validator_pubkeys
// is_builder_prefix = is_builder_withdrawal_credential(deposit_request.withdrawal_credentials)
// if is_builder or (is_builder_prefix and not is_validator):
// if is_builder or (
// is_builder_withdrawal_credential(deposit_request.withdrawal_credentials)
// and not is_validator
// and not is_pending_validator(state, deposit_request.pubkey)
// ):
Comment on lines +43 to +47

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Because update spec test, i have to change this, this is implemented in #16532

// # Apply builder deposits immediately
// apply_deposit_for_builder(
// state,
Expand Down
Loading
Loading