[DO-NOT-MERGE] chore: fixing flakey tests#20935
Open
danielntmd wants to merge 18 commits intonextfrom
Open
Conversation
This PR introduces additional block/checkpoint proposal validation to ensure `SEQ_MAX_TX_PER_BLOCK` is not breached. Also adds additional tests for existing validation criteria. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
## Summary - Reject `rollbackTo` calls targeting a block that is not the last block of its checkpoint, since rollback operates at checkpoint granularity. The error message indicates the nearest valid checkpoint boundaries so the caller can retry with a correct target. - Fix proven checkpoint number to roll back to the target checkpoint instead of resetting to zero. Fixes A-552 ## Test plan - Unit tests added in `archiver-store.test.ts` covering: - Rejection of non-boundary blocks with correct error message - Successful rollback to checkpoint boundary with sync point verification - Proven checkpoint rollback when target is before proven block - Proven checkpoint preservation when target is after proven block - e2e test `e2e_epochs/manual_rollback` passes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Ref: A-493 - Split `peerCount` metric into total connections and healthy connections - Fixed memory leak in peer manager: `peerConnectedAt` map entries are now deleted after recording connection duration - Fixed mined-delay tracking for `TxPoolV2` - Added attestation pool instrumentation - Renamed metrics/groups - Other zero metric fixes
BigInt() doesn't accept scientific notation strings like "1e+23" or "2E+23". This caused a crash when starting a node with --network testnet, as config values like 200000e18 get converted to "2e+23" by the JSON pipeline. Parse scientific notation losslessly using bigint arithmetic instead of going through float64, preserving exact values.
## Summary
- Fixes `bigintConfigHelper` to handle scientific notation strings (e.g.
`1e+23`, `2E+23`) that `BigInt()` can't parse directly
- Uses lossless bigint arithmetic to parse scientific notation instead
of going through float64
- Fixes crash when starting a node with `--network testnet` where config
values like `200000e18` get converted to `2e+23` by JSON
## Context
The bug surfaces because `network-defaults.yml` values like `200000e18`
pass through `yq -o json | jq`, which converts them to float64
scientific notation (`2E+23`). At runtime, `BigInt("2e+23")` throws
`SyntaxError: Cannot convert 2e+23 to a BigInt`.
This fix makes the parsing layer resilient to scientific notation,
regardless of how the values arrive.
## Test plan
- Added unit tests covering: plain integers, scientific notation
(`1e+23`, `2E+23`, `1e23`, `5e18`), decimal mantissa (`1.5e10`), empty
string default, and error on non-integer results (`1e-3`)
- All 10 test cases verified passing
[ClaudeBox log](http://ci.aztec-labs.com/e312c3dcef56fc86-1)
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.
Trying to recreate failing tests...