pull_request_template.md: specify merges are OK#164
Merged
Conversation
ludamad
pushed a commit
that referenced
this pull request
Apr 14, 2023
* initial version of merge rollup * move previous rollup data from base to merge and update root * fix ci * add rollup subtree height * add tests * test: change expectd failure regex (#164) * just use one type of public inputs for base/merge (#168) * this better work and ignore wasm tests --------- Co-authored-by: Lasse Herskind <16536249+LHerskind@users.noreply.github.com>
ludamad
pushed a commit
that referenced
this pull request
Apr 17, 2023
* initial version of merge rollup * move previous rollup data from base to merge and update root * fix ci * add rollup subtree height * add tests * test: change expectd failure regex (#164) * just use one type of public inputs for base/merge (#168) * this better work and ignore wasm tests --------- Co-authored-by: Lasse Herskind <16536249+LHerskind@users.noreply.github.com>
ludamad
pushed a commit
that referenced
this pull request
Apr 17, 2023
* initial version of merge rollup * move previous rollup data from base to merge and update root * fix ci * add rollup subtree height * add tests * test: change expectd failure regex (#164) * just use one type of public inputs for base/merge (#168) * this better work and ignore wasm tests --------- Co-authored-by: Lasse Herskind <16536249+LHerskind@users.noreply.github.com>
spalladino
pushed a commit
that referenced
this pull request
Jun 9, 2026
Fixes A-819 (Audit #164). ## Problem `RollupContract.getAttesters` (`yarn-project/ethereum/src/contracts/rollup.ts`) made several sequential RPC reads with no pinned block: - `getActiveAttesterCount()` (read at `latest`) - N chunked `getAttestersFromIndicesAtTime(...)` reads, one per 1000 indices (each read at `latest`) The `ts` timestamp argument was already captured once and reused consistently across chunks, so the literal "stale timestamp across chunks" framing of the title doesn't occur. The real defect is that the **reads are not pinned to a single L1 block**: across a block boundary or reorg, the count and the individual chunk reads can observe different attester sets, yielding an inconsistent or truncated result. This only bites for attester sets larger than the 1000-entry chunk size, read precisely across a set-changing block — hence low impact, but real. ## Fix Fetch the current block once in `getAttesters`, then thread its `number` as a `blockNumber` option through `getActiveAttesterCount` and every chunked `getAttestersFromIndicesAtTime` read so they all evaluate against the same L1 block. This follows the existing `checkBlockTag(options?.blockNumber, ...)` pattern already used by many reads in `rollup.ts` (e.g. `getCheckpointNumber`, `status`, `canPruneAtTime`). - `getActiveAttesterCount` and `GSEContract.getAttestersFromIndicesAtTime` now accept an optional `{ blockNumber }`. ## Testing Verified the full TypeScript build passes. No automated test added: reproducing the block-drift race deterministically would require anvil plus a hook to advance an L1 block between the count read and the chunk reads (or deep viem-client mocking), which isn't justified for this low-impact, pattern-following change. The block-pinning behavior mirrors other pinned reads in the same file.
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.
Description
More realistic PR message. Rebases can waste time for squashed PRs
Checklist: