Skip to content

Sync upstream v2.10.3 (merge conflicts) - #30

Open
JOY (JOY) wants to merge 6 commits into
mainfrom
sync-upstream-v2.10.3
Open

Sync upstream v2.10.3 (merge conflicts)#30
JOY (JOY) wants to merge 6 commits into
mainfrom
sync-upstream-v2.10.3

Conversation

@JOY

Copy link
Copy Markdown

Upstream Sync - v2.10.3

Auto-merge with upstream v2.10.3 failed due to conflicts.

To resolve:

  1. Check out this branch locally
  2. Resolve conflicts
  3. Push and merge this PR
  4. Then create tag v2.10.3 to trigger Docker build

Upstream release notes

tom goriunov (tom2drum) and others added 5 commits August 4, 2026 18:36
…amic-labs SDK

Turbopack's scope hoisting emits code that reads the SDK's UserFieldEditorContext
through the wrong binding. useContext then receives a non-context value, returns
undefined, and the SDK throws from its own useUpdateUserWithModal:

  useUserUpdateRequest can only be used inside the context of DynamicContextProvider

The thrower is the SDK's internal SyncAuthFlow, which the SDK itself renders inside
UserFieldEditorContextProvider — so in a correct build that context cannot be missing.
A webpack build of the same source is fine, so the defect is Turbopack's, not ours.

Impact: a hard crash on the initial load of every page, on any instance with
NEXT_PUBLIC_ACCOUNT_AUTH_PROVIDER=dynamic. Invisible in dev (unminified, no hoisting)
and found only by running the v2.10.0 image locally, so v2.10.0 would have broken every
dynamic-auth instance on rollout. Bisected to blockscout#3574; not fixed by Next 16.3.0, and not
reducible to a single import — the trigger is an emergent property of the module graph.

webpack turns out to be the better bundle anyway, not just the correct one. Against the
Turbopack build it cuts JS-before-FCP 1038 -> 697 KB (-33%) and emitted chunk bytes
49.2 -> 21.4 MB, at 2-3x the build time. The other fix,
experimental.turbopackScopeHoisting:false, was measured and rejected: it nearly doubles
FCP and triples blocking time while leaving M6 almost unchanged.

Dev stays on Turbopack — it is ~3x faster to compile and this crash class only exists in
a minified production build.

  - build, build:next and prod.preset.sh now pass --webpack (build:analyze and
    profile:preset already did). prod:preset matters because it is the measurement path:
    profiling a bundler we no longer ship would be misleading.
  - resolve.fallback maps @react-native-async-storage/async-storage to false. webpack
    surfaces that unresolvable optional import inside @metamask/sdk, which a browser
    bundle never needs; the build is warning-free.

Introduces .agents/adr/ for decisions that are expensive to rediscover, indexed from
AGENTS.md. This is record 0001 and carries the full evidence.

Also automates the perf-trace capture used to make the call: trace.mjs records a
DevTools-format trace over CDP so trace-metrics.py can consume several runs per variant.
Its README now warns that M6 alone is not a sufficient gate — that is exactly how the
scope-hoisting option looked cheap.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`trace.mjs` is a CLI tool — its stdout is the interface (usage hint, and one line per
trace written). Uses a file-level disable with a reason rather than one per call site.

Fixes the Code quality job on blockscout#3612.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ge (blockscout#3611)

* docs: spec for displaying fee payer and calls on the tx details page

Refs blockscout#3607

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Display the fee payer and batched calls on the transaction details page

Eden transactions of type 0x76 are sponsored batches: an executor submits an
ordered list of calls and a separate sponsor pays the fee. Render both fields
inside the collapsible details, gated on their presence in the response.

Pin @blockscout/api-types to a beta built from the backend `dev` branch once
`master` had been merged into it, which is the first published build carrying
the eden chain type alongside the response shorthands the app relies on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Tag a sponsored transaction in the details page header

Transaction lists have no room for another badge, so `sponsored_transaction`
is listed last in TYPES_ORDER with no label of its own. Without an entry there
it scores -1 and sorts ahead of every real type, masking labels like
"Contract call".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…lockscout#3620)

* Fix Rollbar empty "null or missing arguments" items

The deferred-Rollbar refactor (blockscout#3568) added an `unhandledrejection`
window listener that forwarded `event.reason` as Rollbar's sole argument.
On public instances rejections are dominated by wallet-extension /
third-party noise with `null`/bare-object reasons, which Rollbar cannot
turn into a message — it files empty "Item sent with null or missing
arguments." occurrences (Rollbar item #25, 160+ occurrences).

Remove the `unhandledrejection` listener: this matches pre-refactor
behavior (the app never reported unhandled rejections before) and loses
nothing — genuine page crashes surface as `critical` via the React error
boundary. Guard the remaining `error` listener so a non-Error/non-string
thrown value becomes a titled message + the raw value as custom data,
closing the same empty-item hole on that path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Ignore opaque cross-origin "Script error." reports in Rollbar

The uncaught-error window listener added in blockscout#3568 surfaces cross-origin
"Script error." events — the browser masks details of errors thrown by
different-origin third-party scripts (GA, walletconnect, etc.), leaving
only that string with no stack or payload. They are unactionable and
were never reported before the deferred-Rollbar refactor.

Add "Script error" to `ignoredMessages` (the existing 'cross-origin'
entry does not match this literal string), dropping the noise while the
listener still captures genuine same-origin uncaught errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces support for Eden-specific sponsored transactions, including displaying the fee payer and batched calls on the transaction details page, and adding a "Sponsored" tag to the transaction header. It also establishes an Architecture Decision Record (ADR) to use webpack for production builds (due to a Turbopack scope-hoisting bug with the Dynamic-labs SDK) while keeping Turbopack for development, updating build scripts and configurations accordingly. Additionally, it refactors Rollbar error handling to properly report non-Error thrown values and ignore unhandled rejections/opaque script errors, wraps the Multisend widget in a Web3Boundary, and adds performance tracing tools. The review comment correctly identifies that React testing utilities in TxType.spec.tsx are incorrectly imported from vitest/lib instead of @testing-library/react, which would cause test failures.

import React from 'react';

import { afterEach, describe, expect, it } from 'vitest';
import { cleanup, render, screen } from 'vitest/lib';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The React testing utilities cleanup, render, and screen should be imported from @testing-library/react instead of vitest/lib. Importing them from vitest/lib will cause test compilation and execution failures.

Suggested change
import { cleanup, render, screen } from 'vitest/lib';
import { cleanup, render, screen } from '@testing-library/react';

@JOY
JOY (JOY) force-pushed the sync-upstream-v2.10.3 branch 2 times, most recently from 7b90591 to 15604ca Compare August 7, 2026 08:44
@JOY
JOY (JOY) force-pushed the sync-upstream-v2.10.3 branch from 15604ca to 917a59c Compare August 7, 2026 14:43
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