Skip to content

Conversation

gfukushima
Copy link
Contributor

@gfukushima gfukushima commented Oct 17, 2025

PR Description

Adds a flag to enable custom artificial delay when generating the proofs, built on top of #10004

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

Adds a CLI option to configure artificial execution-proof generation delay and wires it through config, manager, and generator.

  • ZK Chain config/CLI:
    • Add --Xstateless-proofs-generation-delay option; plumb to ZkChainConfiguration as Duration proofDelayDurationInMs with default 2s.
    • BeaconChainController passes configured delay to ExecutionProofManagerImpl.
  • Execution proofs:
    • Update ExecutionProofGenerator.generateExecutionProof to accept Duration proofGenerationDelay and sleep for that duration.
    • ExecutionProofManagerImpl stores the delay and forwards it when generating proofs; minor cleanup in validation loop.
  • Tests:
    • Adjust generator test to pass Duration.ofMillis(0).
    • Add CLI tests for default and custom proof-generation delay.

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

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
…port any milestone

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
# Conflicts:
#	ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/registry/SchemaRegistryBuilder.java
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
# Conflicts:
#	teku/src/test/java/tech/pegasys/teku/cli/options/ZkChainOptionsTest.java
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
…class

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
… validated proofs map

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
# Conflicts:
#	ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/executionproofs/ExecutionProofManagerImpl.java
@gfukushima gfukushima marked this pull request as ready for review October 17, 2025 00:43
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
cursor[bot]

This comment was marked as outdated.

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
cursor[bot]

This comment was marked as outdated.

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
@gfukushima gfukushima changed the title Add flag to set execution proof generation artificial delay [Stateless Proto] Add flag to set execution proof generation artificial delay Oct 17, 2025
cursor[bot]

This comment was marked as outdated.

# Conflicts:
#	ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/executionproofs/ExecutionProofGenerator.java
#	ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/executionproofs/ExecutionProofGeneratorImpl.java
#	ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/executionproofs/ExecutionProofManagerImpl.java
#	ethereum/statetransition/src/test/java/tech/pegasys/teku/statetransition/executionproofs/ExecutionProofGeneratorImplTest.java
#	services/beaconchain/src/main/java/tech/pegasys/teku/services/beaconchain/BeaconChainController.java
#	services/zkchain/src/main/java/tech/pegasys/teku/services/zkchain/ZkChainConfiguration.java
#	teku/src/test/java/tech/pegasys/teku/cli/options/ZkChainOptionsTest.java
public static final boolean DEFAULT_STATELESS_VALIDATION_ENABLED = false;
public static final boolean DEFAULT_GENERATE_EXECUTION_PROOFS_ENABLED = false;
public static final int DEFAULT_STATELESS_MIN_PROOFS_REQUIRED = 1;
public static final Duration DEFAULT_PROOF_GENERATION_DELAY = Duration.ofSeconds(2);
Copy link
Contributor

Choose a reason for hiding this comment

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

given everything is moving to millis, i'd probably take millis here, it'll allow you less than a second delay...

Comment on lines +58 to +59
private long statelessProofGenerationDelay =
ZkChainConfiguration.DEFAULT_PROOF_GENERATION_DELAY.toMillis();
Copy link
Contributor

Choose a reason for hiding this comment

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

along the same lines, we've got millis here, seconds other places, so being consistent will make it easier to understand.

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.

2 participants