fix(l1_sender): use 1 confirmation for gateway sends, fix test reliability#1178
Open
Artemka374-claude wants to merge 3 commits intomatter-labs:mainfrom
Open
fix(l1_sender): use 1 confirmation for gateway sends, fix test reliability#1178Artemka374-claude wants to merge 3 commits intomatter-labs:mainfrom
Artemka374-claude wants to merge 3 commits intomatter-labs:mainfrom
Conversation
Alloy's block-number-based confirmation polling does not work correctly against ZKsync RPC: the RPC reports a fixed latest block rather than following the chain tip the way an Ethereum node does, so with_required_confirmations(3) on a gateway (ZKsync L2) send never resolved. This caused gateway-topology tests (batch_verification_works::next_to_gateway, etc.) to hang until their 180s timeout. The fix mirrors the existing pattern in l1_watcher/src/watcher.rs that already zeroes confirmations for gateway providers: when the L1 sender is configured for a gateway destination, use 1 confirmation instead of 3 so the pending-transaction future resolves normally. Test-infrastructure changes that make gateway tests reliable: - DEFAULT_TIMEOUT 180s → 300s: gateway finalization involves more round-trips (commit/prove/execute on both chain and gateway), so 180s was occasionally tight even when the pipeline was working correctly. - proof_retry_timeout in contracts.rs: stop using the old hardcoded 120s and use DEFAULT_TIMEOUT instead, so withdrawal-proof polling doesn't become the bottleneck under full-suite load. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nel capacity Remove assertion that required both fake_fri_provers and fake_snark_provers to be enabled when enable_input_generation=false. Commit-only and restart-recovery test configs legitimately enable only a subset of fake provers, so the assertion was incorrectly blocking valid configurations under the no-pig nextest profile. Increase FRI proving pipeline channel capacity from 5 to 50 to prevent backpressure when interop tests drive the node through many batches (40+) under parallel test load. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
L1 sender: Use
.with_required_confirmations(1)when sending to the gateway (ZKsync L2) and.with_required_confirmations(3)when sending to Ethereum L1. Alloy's block-number-based confirmation polling doesn't work against ZKsync RPC (which returns fixed block numbers), so gateway sends were hanging indefinitely. This mirrors the same pattern already used by the L1 watcher.Test timeouts: Increase
DEFAULT_TIMEOUTfrom 180s to 300s and changeproof_retry_timeoutincontracts.rsto useDEFAULT_TIMEOUT(was hardcoded 120s). The gateway finalization pipeline has multiple L1 sender round-trips, and the proof RPC needs time to assemble cross-chain Merkle proofs under full-suite parallel load.Prover assertion: Remove over-strict assertion that required both
fake_fri_proversandfake_snark_proversto be enabled whenenable_input_generation=false. Commit-only and restart-recovery test configs intentionally enable only a subset of fake provers, making this a valid configuration.FRI channel capacity: Increase
FriProvingPipelineStepchannel capacity from 5 to 50 to prevent backpressure when interop tests drive the node through 40+ batches under parallel test load.Test plan
cargo nextest run -p zksync_os_integration_tests --profile no-pignode_recovers_from_l1_batch_revert_after_restart_v30,test_interop_bundle_send,test_interop_l2_to_l1_message_verification, and several gateway tests that hung at 180-323s)batch_verification_works::next_to_gateway,l1_withdraw::next_to_gateway,erc20_withdrawal::next_to_gateway)🤖 Generated with Claude Code