Draft
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## hkalodner/waitfortx-subscriptions #4405 +/- ##
=====================================================================
- Coverage 34.73% 32.97% -1.76%
=====================================================================
Files 489 490 +1
Lines 58064 58188 +124
=====================================================================
- Hits 20170 19190 -980
- Misses 34307 35717 +1410
+ Partials 3587 3281 -306 |
Contributor
❌ 9 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
WaitForTx previously relied on bind.WaitMined which polls for transaction receipts every 1 second. For setup.DeployRollup, which sends 5 sequential transactions, this added ~5 seconds of pure polling latency to every test that deploys a rollup. When the backend supports SubscribeNewHead (ethclient.Client, protocol.ChainBackend), use head subscriptions for near-instant notification instead. Falls back to bind.WaitMined for backends without subscription support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The test used a hardcoded sleep of MaxEmptyBatchDelay + 15s, which was insufficient because the simulated beacon's block timestamps race ahead of wall clock time (each block gets lastBlockTime+1 when mined faster than 1/second). After ~27 blocks during setup, L1 timestamps are ~27s ahead, but the batch poster compares against time.Now(). Replace the hardcoded sleep with a dynamic calculation based on the actual L1 head timestamp offset, and use the lighter legacy deployment path to reduce setup blocks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The receiver (Subscription.Next) was closing the events channel on context cancellation, while sender goroutines from Broadcast could still be mid-send — causing panics caught by a blanket recover(). Replace that with a stopped channel owned by the producer. When the producer shuts down, closing stopped unblocks both in-flight Broadcast goroutines and any Next calls whose context outlives the producer. This eliminates the race without masking other panics. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add subscription-based watcher triggering, headerProvider in tests, execution run caching across subchallenge levels, and subscription-based WaitMined to eliminate polling latency from bisection round-trips. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lenge tail Extract createSecondL2Node from the duplicated node-creation logic in create2ndNodeWithConfigForBoldProtocol and createNodeBWithSharedContracts. This also fixes a bug in createNodeBWithSharedContracts where the L1 chain ID was hardcoded as big.NewInt(1337) instead of queried from the client. Simplify create2ndNodeWithConfigForBoldProtocol: remove unused stackConfig parameter (always nil), remove dead assertion chain creation code (caller discarded it), and delegate to createSecondL2Node for the shared core. Delete createNodeBWithSharedContracts entirely, replacing its single call site with a direct call to createSecondL2Node. Extract runFastChallengeAndAssertHonestWin from the identical challenge-run tail in both low-level tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the L3-specific `startL3BoldChallengeManager` with the shared `startBoldChallengeManager` via `boldChallengeManagerParams`, and replace the inline OSP wait loop with `waitForHonestOSPWin`. Removes ~150 lines of duplicated code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When an edge tracker's Act() call fails (e.g., an evil validator's one-step proof reverts), sleep 5 seconds before retrying. Without this, failing trackers retry on every block notification, flooding the simulated backend with RPC calls and starving block production. This caused TestEndToEnd_ManyEvilValidators to time out in CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33e6cb8 to
87668dc
Compare
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
close(events)+ blanketrecover()with a producer-ownedstoppedchannel that cleanly unblocks both in-flight broadcast goroutines and subscribers on shutdownTest plan
go test ./bold/containers/events/... -vpassesgo test -run TestChallengeProtocolBOLD -tags challengetest ./system_tests/ -v🤖 Generated with Claude Code