Repository navigation
Conversation
On Portal v3+, getWithdrawalStatus looked up the proof submitter before starting the dispute game lookup and the finalizedWithdrawals read, although neither depends on it. They now start right after the portal version, and their results are still read through Promise.allSettled in the same order, so the returned status and errors are unchanged. Co-authored-by: jxom <[email protected]> Amp-Thread-ID: https://ampcode.com/threads/T-01a1e1b3-ba60-755b-bfd0-1a31a4a5bf1e
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 94e8d19 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3dc3e7618e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }) | ||
|
|
||
| expect(status).toMatchInlineSnapshot(`"ready-to-finalize"`) | ||
| expect(rounds.map((names) => names.sort())).toMatchInlineSnapshot(` |
There was a problem hiding this comment.
Assert concurrency behavior without snapshotting call tracking
The new assertion snapshots which RPC functions ran in each recorded round, contrary to the repository's explicit requirement to test observable outputs rather than function invocation tracking. It also couples the test to the exact internal read sequence, so harmless batching or lookup changes can fail it without regressing concurrency. Rework the ephemeral server to gate responses on concurrent progress and assert the resulting withdrawal status instead of snapshotting the invocation trace.
AGENTS.md reference: AGENTS.md:L204-L208
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Keeping this. Recording which requests overlap through a real http transport is how the concurrency rule for these changes is enforced (same approach as the landed #5505 tests). The result alone can't tell a concurrent implementation from a sequential one, since both return the same value. The snapshot records rounds of requests, not hook invocations, so it fails exactly when a waterfall comes back.
| http, | ||
| pad, | ||
| toFunctionSelector, | ||
| } from '../../index.js' |
There was a problem hiding this comment.
Import the new public test APIs through package entrypoints
The newly added public API imports come from ../../index.js, bypassing the package-entrypoint coverage required by the repository's testing conventions. Import these helpers and types from viem instead; the rule explicitly reserves relative imports for internal or non-exported members and chain definitions. This ensures the test exercises the supported consumer-facing export path.
AGENTS.md reference: AGENTS.md:L188-L193
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 94e8d19: the new public imports, including multicall3Abi, now come from 'viem'.
|
Published pnpm add viem@pr-5530
pnpm add [email protected] |
|
Bundled into #5543 as its own commit, so this PR is superseded. Closing in favour of the bundle. |
On Portal v3+,
getWithdrawalStatuslooked up the proof submitter (numProofSubmitters, thenproofSubmitters) before it started the dispute game lookup andfinalizedWithdrawals, although neither depends on the proof submitter. They now start right after the portal version.Effect
Real in-process
node:httpJSON-RPC server adding 50 ms per request, canned Portal v3 responses, real Viem client overhttp(url).maingetWithdrawalStatus(Portal v3+)Behavior
finalizedWithdrawalsare still read throughPromise.allSettled, and the results are checked in the same order, so the returned status and thrown errors are unchanged. Both promises have.catch(() => {})attached when they are created.Tests
createRpcProxyserver answers every contract read (including theaggregate3multicall forl2SequenceNumber) after 20 ms and records each read's depth. The snapshot shows depth 5; onmainit is 7, so the test fails there.op-stacktests are excluded from every Vitest project intest/vitest.config.ts, so this test does not run in CI. I ran the file locally with the exclusion removed: the new test passes, and 5 fork-based tests (ready-to-finalize,ready-to-prove (U16),waiting-to-finalize,waiting-to-finalize (U16),waiting-to-prove (U16)) fail the same way onmain.