Skip to content

Bump consensus spec to v1.7.0-beta.0 - #17382

Open
terencechain wants to merge 14 commits into
developfrom
alpha13
Open

Bump consensus spec to v1.7.0-beta.0#17382
terencechain wants to merge 14 commits into
developfrom
alpha13

Conversation

@terencechain

@terencechain terencechain commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

@terencechain
terencechain changed the base branch from develop to methodical-ssz August 19, 2026 20:18
@terencechain
terencechain changed the base branch from methodical-ssz to spectest-alpha-12-compliance August 19, 2026 20:25
@kasey
kasey requested review from a team and kasey as code owners August 27, 2026 19:10
An error occurred while trying to automatically change base from spectest-alpha-12-compliance to develop August 27, 2026 20:29
@terencechain
terencechain deleted the branch develop August 27, 2026 21:15
@terencechain terencechain reopened this Aug 27, 2026
@terencechain
terencechain changed the base branch from spectest-alpha-12-compliance to develop August 27, 2026 21:24
Comment thread beacon-chain/core/gloas/attestation.go Outdated
return executionPayloadAvail == committeeIndex, nil
}

func ParentSlotFromBid(beaconState state.ReadOnlyBeaconState) (primitives.Slot, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We are going with the header, this PR needs to change a bit

ethereum/consensus-specs#5554

}
f.RecordBlockForEquivocation(roblock.Block().Slot(), roblock.Block().ProposerIndex(), roblock.Root())
if features.Get().TrackEquivocations {
f.RecordBlockForEquivocation(roblock.Block().Slot(), roblock.Block().ProposerIndex(), roblock.Root())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this the right spot for this check?

maybe i'm missing something but updating some tests seem to fail for early cutoff tests

func TestForkChoice_InsertNode_RecordsFirstSeen(t *testing.T) {
	resetFn := features.InitWithReset(&features.Flags{TrackEquivocations: true})
	defer resetFn()

	slotSecs := time.Duration(params.BeaconConfig().SecondsPerSlot) * time.Second
	insertAtSlotOne := func(t *testing.T, genesis time.Time) ([][32]byte, [32]byte) {
		f := setup(0, 0)
		f.SetGenesisTime(genesis)
		blockRoot := indexToHash(1)
		st, roblock, err := prepareForkchoiceState(t.Context(), 1, blockRoot, params.BeaconConfig().ZeroHash, params.BeaconConfig().ZeroHash, 0, 0)
		require.NoError(t, err)
		require.NoError(t, f.InsertNode(t.Context(), st, roblock))
		key := proposerSlotKey{slot: 1, proposer: roblock.Block().ProposerIndex()}
		return f.store.blockRootsBySlotProposer[key], blockRoot
	}

	t.Run("records block processed early in its slot", func(t *testing.T) {
		roots, blockRoot := insertAtSlotOne(t, time.Now().Add(-slotSecs))
		require.Equal(t, 1, len(roots))
		require.Equal(t, blockRoot, roots[0])
	})
	t.Run("skips block processed past the early cutoff", func(t *testing.T) {
		roots, _ := insertAtSlotOne(t, time.Now().Add(-2*slotSecs+time.Second))
		require.Equal(t, 0, len(roots))
	})
	t.Run("skips block processed after its slot", func(t *testing.T) {
		roots, _ := insertAtSlotOne(t, time.Now().Add(-10*slotSecs))
		require.Equal(t, 0, len(roots))
	})
	t.Run("skips recording when tracking is disabled", func(t *testing.T) {
		resetFn := features.InitWithReset(&features.Flags{})
		defer resetFn()
		roots, _ := insertAtSlotOne(t, time.Now().Add(-slotSecs))
		require.Equal(t, 0, len(roots))
	})
}

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

would be good to add a small test for the receivedTime.Before(slotStart)

@james-prysm

Copy link
Copy Markdown
Contributor

for recordEarlyEquivocation( which i don't think is touched in this pr, should we add

if receivedTime.Before(slotStart) || !receivedTime.Before(deadline) {

the before slotStart check

@terencechain

terencechain commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

for recordEarlyEquivocation( which i don't think is touched in this pr, should we add

if receivedTime.Before(slotStart) || !receivedTime.Before(deadline) {

the before slotStart check

also fixed in fabc3c9.

Comment thread testing/spectest/shared/gloas/ssz_static/ssz_static.go
Comment thread hack/update-go-spectest.sh Outdated
Comment thread testing/spectest/methodical-spectest.yaml
Comment thread beacon-chain/core/transition/transition_no_verify_sig.go
@terencechain terencechain changed the title Bump consensus spec to v1.7.0-alpha.13 Bump consensus spec to v1.7.0-alpha.14 Sep 2, 2026
The alpha.14 parent_execution_payload vectors set latest_execution_payload_bid.slot without latest_block_header.slot, so the header slot only becomes usable here with the alpha.15 vectors (consensus-specs#5554).
@james-prysm

Copy link
Copy Markdown
Contributor

with ethereum/consensus-specs#5294
shouldn't we moving s.setSeenExecutionPayloadBid(bid.Slot(), tupleKey) only after it passes all the gossip stuff , currently the func (s *Service) validateExecutionPayloadBidGossip isn't touched

@syjn99 syjn99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A couple of cosmetic comments (regarding ethspecify..) and all the core changes look good to me.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think changes in this file should be reverted with ethereum/consensus-specs#5554

Comment on lines 445 to 461
@@ -448,11 +452,11 @@ func ProcessBlockForStateRoot(
// # [Modified in Gloas:EIP7732]
// # Removed `process_execution_payload`
// # [New in Gloas:EIP7732]
// process_execution_payload_bid(state, block.body.signed_execution_payload_bid)
// parent_slot = process_execution_payload_bid(state, block.body.signed_execution_payload_bid)
// process_randao(state, block.body)
// process_eth1_data(state, block.body)
// # [Modified in Gloas:EIP7732]
// process_operations(state, block.body)
// process_operations(state, block.body, parent_slot)
// process_sync_aggregate(state, block.body.sync_aggregate)
// </spec>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

def process_block(state: BeaconState, block: BeaconBlock) -> None:
    # [New in Gloas:EIP7732]
    parent_slot = state.latest_block_header.slot

    # [New in Gloas:EIP7732]
    process_parent_execution_payload(state, block)
    process_block_header(state, block)
    # [Modified in Gloas:EIP7732]
    process_withdrawals(state)
    # [Modified in Gloas:EIP7732]
    # Removed `process_execution_payload`
    # [New in Gloas:EIP7732]
    process_execution_payload_bid(state, block.body.signed_execution_payload_bid)
    process_randao(state, block.body)
    process_eth1_data(state, block.body)
    # [Modified in Gloas:EIP7732]
    process_operations(state, block.body, parent_slot)
    process_sync_aggregate(state, block.body.sync_aggregate)

Same comment as above

potuz and others added 2 commits September 3, 2026 17:48
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@terencechain terencechain changed the title Bump consensus spec to v1.7.0-alpha.14 Bump consensus spec to v1.7.0-beta.0 Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants