Skip to content

Sync upstream v12.0.4 (merge conflicts) - #282

Open
JOY (JOY) wants to merge 141 commits into
mainfrom
sync-upstream-v12.0.4
Open

JOY (JOY) wants to merge 141 commits into
mainfrom
sync-upstream-v12.0.4

Conversation

@JOY

Copy link
Copy Markdown

Upstream Sync - v12.0.4

Auto-merge with upstream v12.0.4 failed. Version/workflow conflicts were auto-resolved,
but the following files have code conflicts that need manual resolution:

apps/explorer/lib/explorer/migrator/delete_zero_value_internal_transactions.ex
docker-compose/envs/common-blockscout.env
docker/Dockerfile
mix.lock
types-package/package-lock.json

To resolve:

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

Upstream release notes

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…cout#14654)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…4761)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#14764)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot Bot and others added 8 commits October 27, 2026 15:14
…#14979)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…cout#14989)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

@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.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@chatgpt-codex-connector

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 ⚠️ Failed 2026-11-02T14:03:13.460701Z
We couldn’t complete this review. Comment @codex review to try again.
d6b057c PR opened
ℹ️ About Codex in GitHub

Your 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

@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 upgrades the codebase to Elixir 1.20 and Erlang/OTP 28, replaces Poison/Jason with the built-in JSON module, adds support for ERC-8056 tokens, and refactors pagination across API v2. The review feedback correctly identifies three critical issues: a potential FunctionClauseError in notifier.ex due to missing keys in a TransactionView.render/2 call, a crash risk in address_controller.ex if BlockNumber.get_max/0 returns nil, and an unsafe log.block.hash access in transaction_view.ex when the block association is not preloaded.

Comment on lines +910 to +913
TransactionView.render("token_transfers.json", %{
token_transfers: relevant_token_transfers,
conn: nil
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

TransactionView.render("token_transfers.json", ...) expects decoded_transactions_map and next_page_params in its assigns map. Calling it with only token_transfers and conn will fail to match any clause and raise a FunctionClauseError at runtime. Please pass decoded_transactions_map: %{} and next_page_params: nil to satisfy the pattern match.

          TransactionView.render("token_transfers.json", %{
            token_transfers: relevant_token_transfers,
            decoded_transactions_map: %{},
            next_page_params: nil,
            conn: nil
          })

Comment on lines +275 to +281
head_block_number = BlockNumber.get_max()

if is_nil(end_block_number) or end_block_number >= head_block_number do
max(head_block_number - tolerance, 0)
else
end_block_number
end

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

If BlockNumber.get_max() returns nil (which can happen if the block number cache is empty or during initial sync/testing), evaluating head_block_number - tolerance will raise an ArithmeticError and crash the request. We should safely handle the nil case.

      case BlockNumber.get_max() do
        nil ->
          end_block_number

        head_block_number ->
          if is_nil(end_block_number) or end_block_number >= head_block_number do
            max(head_block_number - tolerance, 0)
          else
            end_block_number
          end
      end

"smart_contract" => smart_contract_info(transaction_or_hash),
"block_number" => log.block_number,
"block_hash" => log.block_hash,
"block_hash" => log.block.hash,

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

Using log.block.hash is unsafe because if the block association is not loaded (i.e., %NotLoaded{}) or is nil (e.g., for pending logs), this will raise a KeyError or BadMapError at runtime. Since block_hash is a direct field on the Log struct, we should continue using log.block_hash which is always safe and avoids unnecessary association loading.

      "block_hash" => log.block_hash,

@JOY
JOY (JOY) force-pushed the sync-upstream-v12.0.4 branch 5 times, most recently from f80fc06 to 4a1bee5 Compare November 3, 2026 20:02

@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.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@JOY
JOY (JOY) force-pushed the sync-upstream-v12.0.4 branch 5 times, most recently from 4c0aa67 to 5dc7064 Compare November 5, 2026 02:03

@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.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@JOY
JOY (JOY) force-pushed the sync-upstream-v12.0.4 branch 2 times, most recently from 2aeccf4 to beebe4f Compare November 5, 2026 14:02

@cursor cursor 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.

Stale comment

Agentic security review of the v12.0.4 upstream sync found one medium issue: a newly accepted scoped reCAPTCHA bypass token in the query string is not redacted from API access logs.

Open in Web View Automation 

Sent by Cursor Security Agent: Security Reviewer

Comment on lines +196 to +198
scoped_recaptcha_bypass_token =
normalize_blank_to_nil(get_header_or_nil(conn, "scoped-recaptcha-bypass-token")) ||
normalize_blank_to_nil(get_query_param_or_nil(conn, "scoped_recaptcha_bypass_token"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Agentic Security Review
Severity: MEDIUM

This PR newly accepts the scoped reCAPTCHA bypass token from the scoped_recaptcha_bypass_token query parameter (header still takes precedence). That value is an operator-issued shared secret used to skip CAPTCHA on privileged actions such as NFT metadata refetch.

BlockScoutWeb.Plug.Logger logs request_path?query_string and RPCTranslator.redact_apikey/1 only redacts apikey=. A query-string bypass therefore lands in application logs, and typically also in reverse-proxy/CDN logs, Referer headers, and browser history. Tests and OpenAPI now document the query form, which steers trusted clients into this leak. Header-only submission remains safer.

Impact: Anyone with access to those logs (or a leaked Referer) can reuse the token to bypass CAPTCHA on scoped endpoints.

Fix in Cursor Fix in Web

Reviewed by Cursor Security Reviewer for commit beebe4f. Configure here.

@JOY
JOY (JOY) force-pushed the sync-upstream-v12.0.4 branch from beebe4f to b6406f0 Compare November 5, 2026 20:01

This branch has not been deployed

No deployments
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.

7 participants