Skip to content

Conversation

@gfukushima
Copy link
Contributor

@gfukushima gfukushima commented Sep 9, 2025

PR Description

Added some initial boiler plate to get the execution proof subnet in and start in the controler when the statelss flag is enabled

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Note

Introduces execution proof gossip (topics, subnets, manager/validator) and CLI/config flag to enable it, with networking and controller wiring to process and publish proofs.

  • Networking (gossip/subnets):
    • Add execution proof gossip: new topics (execution_proof_<subnet>), subnet subscriptions, ExecutionProofGossipManager, ExecutionProofSubnetSubscriptions, and topic handler.
    • Extend fork plumbing: GossipForkSubscriptions* and GossipForkManager to publish/subscribe execution proofs; include in Electra/Fulu/Gloas (and BPO) subscriptions.
    • Update Eth2P2PNetwork/ActiveEth2P2PNetwork to support exec-proof subnet subscribe/unsubscribe and publish via ExecutionProofGossipChannel.
    • Topic filtering: include execution proof topics when enabled via P2PConfig/--Xexecution-proof-topics-enabled.
    • GossipTopics/GossipTopicName updated to generate execution proof topics.
  • State transition:
    • Add ExecutionProofManager (+ impl) and ExecutionProofGossipValidator to validate and track received proofs; listener subscription API.
  • Beacon chain wiring:
    • Initialize ExecutionProofManager in BeaconChainController (gated by ZkChainConfiguration), subscribe to valid proofs, and expose processor to P2P builder.
  • Config/CLI:
    • P2PConfig gains executionProofTopicEnabled (default off) and builder/plumbing; new CLI flag --Xexecution-proof-topics-enabled.
  • Tests/Build:
    • Update tests for topic filter and subscriptions; add zkchain deps where required.

Written by Cursor Bugbot for commit 837da57. This will update automatically on new commits. Configure here.

Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
# Conflicts:
#	ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/registry/SchemaRegistryBuilder.java
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
# Conflicts:
#	teku/src/test/java/tech/pegasys/teku/cli/options/ZkChainOptionsTest.java
@Consensys Consensys deleted a comment from cursor bot Sep 30, 2025
@Consensys Consensys deleted a comment from cursor bot Sep 30, 2025
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
cursor[bot]

This comment was marked as outdated.

Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
public static ExecutionProofGossipValidator create() {
return new ExecutionProofGossipValidator(
// max subnets * 2 epochs * slots per epoch 32 based on mainnet for now
LimitedSet.createSynchronized(MAX_EXECUTION_PROOF_SUBNETS.intValue() * 64));
Copy link

Choose a reason for hiding this comment

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

Bug: Cache Size Miscalculation in Epoch-Specific Code

The LimitedSet size calculation in ExecutionProofGossipValidator hardcodes 64 for slots per epoch. This value is mainnet-specific and doesn't adapt to different network configurations, potentially leading to incorrect cache sizing.

Fix in Cursor Fix in Web

topics.add(getExecutionProofSubnetTopic(forkDigest, i, gossipEncoding));
}
}

Copy link

Choose a reason for hiding this comment

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

Bug: Method Signature Change Causes Compatibility Issues

Adding a P2PConfig parameter to the GossipTopics.getAllTopics method signature breaks existing call sites. This results in compilation errors or incorrect behavior where callers haven't been updated.

Fix in Cursor Fix in Web

@Consensys Consensys deleted a comment from cursor bot Oct 7, 2025
@gfukushima gfukushima changed the title [Stateless Proto] Introducing some boiler plate to add execution proofs subnet and gossip validation [Stateless Proto] Introducing execution proofs subnet and gossip validation Oct 7, 2025
# Conflicts:
#	networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/Eth2P2PNetworkBuilder.java
#	networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/gossip/forks/GossipForkSubscriptions.java
#	networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/gossip/forks/versions/GossipForkSubscriptionsGloas.java
#	networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/gossip/forks/versions/GossipForkSubscriptionsGloasBpo.java
#	networking/eth2/src/testFixtures/java/tech/pegasys/teku/networking/eth2/Eth2P2PNetworkFactory.java
topics.add(getExecutionProofSubnetTopic(forkDigest, i, gossipEncoding));
}
}

Copy link

Choose a reason for hiding this comment

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

Bug: Method Update Causes Compilation Failures

The getAllTopics method signature was updated to include a P2PConfig parameter, but not all existing call sites, like those in Eth2GossipTopicFilter.java, were updated to pass this new parameter. This leads to compilation errors.

Fix in Cursor Fix in Web

return new ExecutionProofGossipValidator(
// max subnets * 2 epochs * slots per epoch 32 based on mainnet for now
LimitedSet.createSynchronized(MAX_EXECUTION_PROOF_SUBNETS.intValue() * 64));
}
Copy link

Choose a reason for hiding this comment

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

Bug: Code-Comment Mismatch in LimitedSet Size Calculation

The LimitedSet size is calculated as MAX_EXECUTION_PROOF_SUBNETS.intValue() * 64, but the accompanying comment describes a different calculation: max subnets * 2 epochs * 32 slots per epoch. This creates a discrepancy between the code and its documentation.

Fix in Cursor Fix in Web

@gfukushima gfukushima enabled auto-merge (squash) October 8, 2025 06:35
@gfukushima gfukushima merged commit 63af7e2 into Consensys:master Oct 8, 2025
18 of 19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants