Skip to content

chore: update viem to 0.0.0-9a2b41b1 - #930

Merged
jxom merged 2 commits into
mainfrom
chore/viem-nonce-number
Oct 28, 2026
Merged

jxom merged 2 commits into
mainfrom
chore/viem-nonce-number

Conversation

@jxom

@jxom jxom commented Oct 28, 2026

Copy link
Copy Markdown
Member

This updates the Viem pin from the main build 0.0.0-de39e106 (#928) to the current main build, 0.0.0-9a2b41b10a791e5ee55eab66110139e2043ccf26. The catalog and the override both change.

  • The error snapshots now show the new version string.
  • A fill still formats Tempo nonces as bigints (TIP-1106), so the two Number(transaction.nonce) casts in feeLiquidity.localnet.test.ts stay.
  • The earlier main builds 9f07ca98, d18ea6dc and 92e78aa6 are skipped. Their Tempo chain formatters lost the chain-formatter type, so fillTransaction returned the base transaction type (41 tsc errors). 9a2b41b1 fixes it.

Validation: pnpm check:types is clean, pnpm audit passes, and lib/pure passes 860 of 860 tests locally. The localnet tests run in CI.


Generated by Claude Code

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
accounts-site Ready Ready Preview Oct 28, 2026 5:18am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T05:14:18.101842Z 576c807 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tempoxyz-bot

tempoxyz-bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ Cyclops Security Review: safe to merge

Last reviewed: 576c807 (latest) · no open findings

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This is a clean viem prerelease pin bump.

What was reviewed:

  • pnpm-workspace.yaml: the catalog and overrides entries both move to the same 9a2b41b1 hash, and the old de39e106 hash no longer appears anywhere in the tree.
  • pnpm-lock.yaml: the viem specifiers, versions and integrity hash change, and viem's dependency list stays the same. The @ wagmi/connectors and porto peer-suffix keys get new hashes, and their peer resolution lines (@ types/react, use-sync-external-store, accounts: 'link:') are only shuffled between those entries. The same lines are added and removed, which points to a regenerated lockfile rather than a hand edit.
  • In the six test files, only the Version: viem@... line of the inline snapshots changed.
Extended reasoning...

The change bumps a pinned viem prerelease in pnpm-workspace.yaml and regenerates pnpm-lock.yaml. It also updates the version string in inline error snapshots across six test files. No application or library source changes, and it touches no auth, crypto or data-exposure code. In the lockfile, everything apart from the viem lines is a peer-suffix re-hash, and the same lines are added and removed, which fits a clean pnpm install. The repo has no CODEOWNERS file and the PR timeline has no open reviewer objections.

jxom commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Verify / Checks, Verify / Test Runtime (env: localnet), build, Bench and Wagmi failed at install. Aegis recentlyPublished blocked [email protected], the version this PR pins. No test ran.

This needs an Aegis exemption for that exact version: https://go/aegis/policies?org=*&repo=*&reason=recentlyPublished&verdict=warn&confirm=1&purl=pkg%3Anpm%2Fviem%400.0.0-9a2b41b10a791e5ee55eab66110139e2043ccf26. After the exemption, I will re-run the failed jobs.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

@pkg-pr-new

pkg-pr-new Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/tempoxyz/accounts@930

commit: 576c807

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

⚡ Accounts Bench

RendererScorevs main
Tempo Wallet · popup66−1
Tempo Wallet · iframe91−2
WebAuthn99±0
Timings
Renderer Case Wallet ready Confirm Total Total vs main Score Runs
Tempo Wallet · popup register 513 ms 654 ms 1258 ms +257 ms (+26%) 63 5/5
Tempo Wallet · popup login 392 ms 477 ms 1038 ms +68 ms (+7%) 69 5/5
Tempo Wallet · popup send 1753 ms 692 ms 2614 ms −104 ms (−4%) 63 5/5
Tempo Wallet · popup register-siwe 405 ms 676 ms 1213 ms +13 ms (+1%) 65 5/5
Tempo Wallet · popup register-key 366 ms 631 ms 1155 ms −15 ms (−1%) 66 5/5
Tempo Wallet · popup register-siwe-key 382 ms 740 ms 1268 ms −13 ms (−1%) 64 5/5
Tempo Wallet · popup login-siwe 374 ms 570 ms 1052 ms +44 ms (+4%) 68 5/5
Tempo Wallet · popup login-key 371 ms 440 ms 992 ms −1 ms (−0%) 70 5/5
Tempo Wallet · popup login-siwe-key 400 ms 563 ms 1064 ms −16 ms (−1%) 68 5/5
Tempo Wallet · iframe register 199 ms 29 ms 373 ms ±0 ms (±0%) 89 5/5
Tempo Wallet · iframe login 16 ms 42 ms 297 ms ±0 ms (±0%) 95 5/5
Tempo Wallet · iframe send 1358 ms 586 ms 1811 ms +724 ms (+67%) 71 5/5
Tempo Wallet · iframe register-siwe 12 ms 113 ms 369 ms +13 ms (+4%) 92 5/5
Tempo Wallet · iframe register-key 16 ms 85 ms 263 ms +18 ms (+7%) 95 5/5
Tempo Wallet · iframe register-siwe-key 16 ms 151 ms 317 ms −68 ms (−18%) 93 5/5
Tempo Wallet · iframe login-siwe 14 ms 89 ms 344 ms +15 ms (+5%) 93 5/5
Tempo Wallet · iframe login-key 15 ms 24 ms 279 ms +1 ms (+0%) 95 5/5
Tempo Wallet · iframe login-siwe-key 14 ms 88 ms 343 ms +12 ms (+4%) 93 5/5
WebAuthn register – – 16 ms −1 ms (−6%) 100 5/5
WebAuthn login – – 18 ms ±0 ms (±0%) 100 5/5
WebAuthn send – – 778 ms +67 ms (+9%) 93 5/5
WebAuthn register-siwe – – 75 ms −12 ms (−14%) 99 5/5
WebAuthn register-key – – 18 ms ±0 ms (±0%) 100 5/5
WebAuthn register-siwe-key – – 72 ms −11 ms (−13%) 99 5/5
WebAuthn login-siwe – – 72 ms −5 ms (−6%) 99 5/5
WebAuthn login-key – – 17 ms ±0 ms (±0%) 100 5/5
WebAuthn login-siwe-key – – 70 ms −18 ms (−20%) 99 5/5
Scoring

Each value is the median of the passing runs. It is scored 0–100 on Lighthouse's log-normal curve: the good budget scores 90 and the poor budget scores 50. Rings are green from 90, orange from 50 and red below 50. A case score weights Total twice as much as Wallet ready and Confirm, and a renderer score is the mean of its case scores.

Metric Measures register / login, with any SIWE or access key (good · poor) send (good · poor)
Wallet ready App click → wallet approval button visible and enabled 100 · 800 ms 100 · 800 ms
Confirm Wallet approval click → app callback 200 · 1200 ms 800 · 3000 ms
Total App click → app callback 300 · 2000 ms 1000 · 4000 ms

send runs eth_sendTransactionSync, so it includes block inclusion on Tempo Testnet (Moderato). -siwe cases sign in to the bench app's Handler.auth server, and -key cases also authorize an access key.

vs main runs the same bench against main's SDK in the same job, alternating which app goes first in each run, so both see the same network. 🟢 and 🔴 mark a Total change only when every run of one app beats every run of the other and the medians differ by 50 ms or more. A score change is marked when its cases agree.

Commit 576c807 · vs main 7a2feb9 · 5 runs · Chrome 156.0.8078.47 · wallet https://wallet.tempo.xyz · workflow run

@jxom
jxom merged commit c15f5c6 into main Oct 28, 2026
37 of 48 checks passed
@jxom
jxom deleted the chore/viem-nonce-number branch October 28, 2026 18:50
gakonst added a commit that referenced this pull request Nov 3, 2026
Updates the Viem pin from the `main` build `0.0.0-9a2b41b1` (#930) to
`0.0.0-9348d386a9f62fd6713124e25360d6040e4a34cf`, the `main` build with
wevm/viem#5392 (published 2026-11-03T04:00:50Z). The catalog and the
override both change. Viem still depends on `ox` 0.14.59, so Ox stays
where it is; it moves in a follow-up.

#5392 is the reason for the bump:
- JSON-RPC `-32601` and `-32004` refusals are no longer retried, even
from non-2xx responses. A public RPC's 403 refusal of `tempo_simulateV1`
now fails at once in any client, not just in `Handler.relay`'s probe
(#941). That probe keeps `retryCount: 0`, which still matters for
transport failures.
- The `http` and socket transports build the `onFetchRequest` `Request`
and the `TimeoutError` only when they're needed.
- `toSignatureHash` caches signature hashes in an LRU, so selector
lookups in `decodeFunctionData`, `decodeEventLog`, `decodeErrorResult`
and `encodeFunctionData` stop rehashing every ABI item.

## Other Viem changes between `9a2b41b1` and `9348d386`

There are 37 commits in `9a2b41b1..9348d386`. These are the ones that
change Tempo behavior the SDK relies on:

- **#5360**: The default expiring-nonce `validBefore` goes from 25 to
270 seconds. A random `nonce` discriminator replaces the random
`validAfter`, and `Transaction.expiringNonceMaxExpiry` (300) is added.
`prepareTransactionRequest` drops a requested `feeToken` from a fill the
fee payer already signed, since that signature covers the filled token.
`Relay.feePayer` caps expiring windows, but the SDK's relay handler
doesn't use `Relay.feePayer`.
- **#5356**: The Tempo chain config adds 5,000 gas for the fee payer's
signature and fee token to a sponsored request whose gas came from the
fill. T14 charges these as intrinsic gas. It doesn't add the gas to
owner-approved configurable transactions. The Tempo formatter now keeps
`capabilities` on fill requests without Tempo fields; it used to drop
`errors: true` there. `Relay.autoSwap` and the opt-in balance diffs are
new `viem/tempo` relay plugins. `Handler.relay` has its own `autoSwap`
and `balanceDiffs` and is unaffected.
- **#5377 / #5382**: When `eth_sendRawTransactionSync` returns error
code 4, `sendTransactionSync` now keeps the nonce and waits for the
receipt with the node's hash, or with a hash it derives locally.
`fallback` no longer forwards that transaction to the next node. The
Provider's root-account sends go through this path.
`AccessKeyTransaction` sends the raw request itself and still treats
code 4 as maybe submitted.
- **#5336**: `fillTransaction` keeps a requested nonce as a `bigint`
(TIP-1106).
- **#5388**: Adds `Account.serialize`/`Account.deserialize` and a
`keyAuthorization` option for access key accounts. These are new APIs
only.
- **#5372**: `estimateGas` now applies block and state overrides instead
of returning a gas limit filled during preparation. The SDK doesn't pass
overrides.
- **#5373**: `NonceManager.reset` now receives the consumed nonce. The
SDK has no nonce manager.
- **#5380 / #5381**: `watchBlocks` and `watchBlockNumber` now emit
missed blocks on fast chains, with catch-up capped at 100 blocks. The
SDK doesn't watch blocks.
- **#5339 / #5370**: `getAbiItem` now rejects overloads it can't tell
apart, and `validateTypedData` rejects invalid EIP-712 field types.
Nothing in the suites hits either.

No source changes were needed. The error snapshots now show the new
version string.

## Lockfile

A full resolution re-resolves every peer and adds a real `[email protected]`
(with `[email protected]`) as a tooling peer, which
`scripts/zod-security.test.ts` rejects. `--fix-lockfile` does the same.
So the lockfile is edited directly:
- the version and integrity of `viem`;
- the 5 hashed peer suffixes whose input contains the `viem` version
(`@wagmi/[email protected]`, 3× `@wagmi/[email protected]` and
`[email protected]`).

To get the new hashes, I resolved both the old and the new graphs with
`--config.peers-suffix-max-length=100000`. Hashing the old graph's
unhashed suffixes (SHA-256, first 32 hex characters) reproduces every
hash on `main`. The new hashes match what pnpm wrote on a full
resolution. The lockfile diff touches only these entries.

I logged this as friction in `.agents/friction-log/`.

No changeset: the published `viem` peer range (`>=2.57.12`) and the `ox`
range don't change.

## Validation

- `pnpm install --frozen-lockfile` from empty `node_modules`: passed.
- `pnpm check:types`: passed.
- `pnpm check`: 0 errors; the 5 warnings are already on `main`.
- `pnpm build`: passed.
- `pnpm test --project lib/pure --reporter=dot`: 50 files, 889 tests
passed.
- `VITE_NODE_ENV=localnet VITE_NODE_TAG=latest pnpm test --project
lib/localnet --reporter=dot --maxWorkers=4` against
`ghcr.io/tempoxyz/tempo:latest` in OrbStack: 10 files, 658 tests passed.

This branch was successfully deployed

1 active deployment
Preview — 576c8075 Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants