Skip to content

Enabling archiver in CI#163

Merged
benesjan merged 3 commits into
masterfrom
janb/enabling-archiver-in-ci
Apr 4, 2023
Merged

Enabling archiver in CI#163
benesjan merged 3 commits into
masterfrom
janb/enabling-archiver-in-ci

Conversation

@benesjan

@benesjan benesjan commented Apr 4, 2023

Copy link
Copy Markdown
Contributor

Description

Enabling archiver in CI

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • I have linked this pull request to the issue(s) that it resolves.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • The branch has been rebased against the head of its merge target.
  • I'm happy for the PR to be merged at the reviewer's next convenience.

@benesjan benesjan requested a review from ludamad April 4, 2023 11:59
@benesjan benesjan merged commit f77018c into master Apr 4, 2023
@benesjan benesjan deleted the janb/enabling-archiver-in-ci branch April 4, 2023 12:00
spypsy pushed a commit that referenced this pull request Jun 8, 2026
…rs (A-818) (#23919)

Fixes A-818 (Audit #163).

## Problem

`formatViemError` (`yarn-project/ethereum/src/utils.ts`) called
`structuredClone(error)` unguarded, before the `instanceof Error`
formatting fallback. `structuredClone` throws `DataCloneError` on values
it cannot clone — and viem RPC/contract errors routinely attach
plain-object context holding functions (e.g. transport request methods).
When that happened, the formatter itself threw, and since several call
sites do `throw formatViemError(...)` (`rollup.ts`, `l1_tx_utils.ts`),
the original L1 revert/RPC error was replaced by a `DataCloneError` and
lost — degrading operator diagnostics.

## Fix

Wrap the clone (and the `stripAbis` call that depends on it) in a
`try/catch`. On clone failure, fall back to formatting the original
error untouched (skipping `stripAbis` so we don't mutate the caller's
object). The `cause` still carries the original error in all paths.

## Test

Added a `formatViemError` test in `utils.test.ts` covering an error
whose `cause` holds a function-valued `request` field. It throws
`DataCloneError` without the fix and returns a `FormattedViemError`
(preserving the message and `cause`) with it.
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.

2 participants