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>
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>
…blockscout#14965)

Co-authored-by: Alexander Kolotov <alexander.kolotov@gmail.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…es (blockscout#14967)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#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 from d6b057c to db96eb4 Compare November 2, 2026 20:01
@JOY
JOY (JOY) force-pushed the sync-upstream-v12.0.4 branch from db96eb4 to f59b53d Compare November 3, 2026 02:03

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