Skip to content

Sync upstream v11.3.3 (merge conflicts) - #248

Open
JOY (JOY) wants to merge 82 commits into
mainfrom
sync-upstream-v11.3.3
Open

JOY (JOY) wants to merge 82 commits into
mainfrom
sync-upstream-v11.3.3

Conversation

@JOY

Copy link
Copy Markdown

Upstream Sync - v11.3.3

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

docker-compose/envs/common-blockscout.env
mix.lock

To resolve:

  1. Check out this branch locally
  2. Resolve remaining conflicts
  3. Push and merge this PR
  4. Then create tag v11.3.3 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>
@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 Oct 2, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 199 files, which is 99 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c778105e-6a1d-4129-bde0-478c95af9722
📥 Commits

Reviewing files that changed from the base of the PR and between 13ae939 and 4c2f0d5.

⛔ Files ignored due to path filters (1)
  • mix.lock is excluded by !**/*.lock
📒 Files selected for processing (199)
  • .tool-versions
  • CHANGELOG.md
  • apps/block_scout_web/assets/css/components/_custom_tooltips.scss
  • apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/address_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/api/rpc/address_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/api/v2/address_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/api/v2/fallback_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/api/v2/main_page_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/api/v2/stats_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/api/v2/token_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/api/v2/transaction_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/chain_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/tokens/token_controller.ex
  • apps/block_scout_web/lib/block_scout_web/controllers/tokens/transfer_controller.ex
  • apps/block_scout_web/lib/block_scout_web/graphql/resolvers/internal_transaction.ex
  • apps/block_scout_web/lib/block_scout_web/microservice_interfaces/transaction_interpretation.ex
  • apps/block_scout_web/lib/block_scout_web/models/get_address_tags.ex
  • apps/block_scout_web/lib/block_scout_web/notifier.ex
  • apps/block_scout_web/lib/block_scout_web/notifiers/arbitrum.ex
  • apps/block_scout_web/lib/block_scout_web/notifiers/optimism.ex
  • apps/block_scout_web/lib/block_scout_web/schemas/api/v2/optimism/game.ex
  • apps/block_scout_web/lib/block_scout_web/schemas/api/v2/stats/response.ex
  • apps/block_scout_web/lib/block_scout_web/schemas/api/v2/transaction.ex
  • apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex
  • apps/block_scout_web/lib/block_scout_web/views/api/v2/optimism_view.ex
  • apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex
  • apps/block_scout_web/lib/block_scout_web/views/nft_helper.ex
  • apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex
  • apps/block_scout_web/mix.exs
  • apps/block_scout_web/priv/gettext/default.pot
  • apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
  • apps/block_scout_web/test/block_scout_web/channels/v2/block_channel_test.exs
  • apps/block_scout_web/test/block_scout_web/controllers/api/rpc/address_controller_test.exs
  • apps/block_scout_web/test/block_scout_web/controllers/api/rpc/eth_controller_test.exs
  • apps/block_scout_web/test/block_scout_web/controllers/api/v2/address_controller_test.exs
  • apps/block_scout_web/test/block_scout_web/controllers/api/v2/block_controller_test.exs
  • apps/block_scout_web/test/block_scout_web/controllers/api/v2/stats_controller_test.exs
  • apps/block_scout_web/test/block_scout_web/controllers/api/v2/token_controller_test.exs
  • apps/block_scout_web/test/block_scout_web/controllers/api/v2/transaction_controller_test.exs
  • apps/block_scout_web/test/block_scout_web/models/get_address_tags_test.exs
  • apps/block_scout_web/test/block_scout_web/notifier_broadcast_test.exs
  • apps/block_scout_web/test/block_scout_web/notifier_subscriber_filter_test.exs
  • apps/block_scout_web/test/block_scout_web/views/api/v2/transaction_view_test.exs
  • apps/block_scout_web/test/block_scout_web/views/nft_helper_test.exs
  • apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs
  • apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block.ex
  • apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/blocks.ex
  • apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http.ex
  • apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/request_coordinator.ex
  • apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/transaction.ex
  • apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/transport.ex
  • apps/ethereum_jsonrpc/mix.exs
  • apps/ethereum_jsonrpc/test/ethereum_jsonrpc/block_test.exs
  • apps/ethereum_jsonrpc/test/ethereum_jsonrpc/http/mox_test.exs
  • apps/ethereum_jsonrpc/test/ethereum_jsonrpc/receipt_test.exs
  • apps/ethereum_jsonrpc/test/ethereum_jsonrpc/transaction_test.exs
  • apps/ethereum_jsonrpc/test/ethereum_jsonrpc_test.exs
  • apps/explorer/config/config.exs
  • apps/explorer/config/runtime/test.exs
  • apps/explorer/config/test.exs
  • apps/explorer/lib/explorer/application.ex
  • apps/explorer/lib/explorer/chain.ex
  • apps/explorer/lib/explorer/chain/address.ex
  • apps/explorer/lib/explorer/chain/address/coin_balance.ex
  • apps/explorer/lib/explorer/chain/address/counters.ex
  • apps/explorer/lib/explorer/chain/address/metadata_preloader.ex
  • apps/explorer/lib/explorer/chain/address/reputation.ex
  • apps/explorer/lib/explorer/chain/address/scam_badge_to_address.ex
  • apps/explorer/lib/explorer/chain/advanced_filter.ex
  • apps/explorer/lib/explorer/chain/block.ex
  • apps/explorer/lib/explorer/chain/block_number_helper.ex
  • apps/explorer/lib/explorer/chain/bridged_token.ex
  • apps/explorer/lib/explorer/chain/cache/accounts.ex
  • apps/explorer/lib/explorer/chain/cache/accounts/refresher.ex
  • apps/explorer/lib/explorer/chain/cache/address_tags.ex
  • apps/explorer/lib/explorer/chain/cache/background_migrations.ex
  • apps/explorer/lib/explorer/chain/cache/counters/address_counters.ex
  • apps/explorer/lib/explorer/chain/cache/counters/address_counters_consolidator.ex
  • apps/explorer/lib/explorer/chain/cache/counters/address_token_transfers_count.ex
  • apps/explorer/lib/explorer/chain/cache/counters/address_transactions_count.ex
  • apps/explorer/lib/explorer/chain/cache/counters/address_transactions_gas_usage_sum.ex
  • apps/explorer/lib/explorer/chain/cache/counters/consolidation.ex
  • apps/explorer/lib/explorer/chain/cache/counters/gas_usage_sum.ex
  • apps/explorer/lib/explorer/chain/cache/counters/helper.ex
  • apps/explorer/lib/explorer/chain/cache/counters/token_counters.ex
  • apps/explorer/lib/explorer/chain/cache/counters/token_counters_consolidator.ex
  • apps/explorer/lib/explorer/chain/cache/counters/token_holders_count.ex
  • apps/explorer/lib/explorer/chain/cache/counters/token_transfers_count.ex
  • apps/explorer/lib/explorer/chain/cache/counters/transactions_count.ex
  • apps/explorer/lib/explorer/chain/cache/propagator.ex
  • apps/explorer/lib/explorer/chain/cache/scam_addresses.ex
  • apps/explorer/lib/explorer/chain/import.ex
  • apps/explorer/lib/explorer/chain/import/runner/address/current_token_balances.ex
  • apps/explorer/lib/explorer/chain/import/runner/blocks.ex
  • apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex
  • apps/explorer/lib/explorer/chain/import/runner/tokens.ex
  • apps/explorer/lib/explorer/chain/internal_transaction.ex
  • apps/explorer/lib/explorer/chain/map_cache.ex
  • apps/explorer/lib/explorer/chain/null_round_height.ex
  • apps/explorer/lib/explorer/chain/optimism/dispute_game.ex
  • apps/explorer/lib/explorer/chain/optimism/eip1559_config_update.ex
  • apps/explorer/lib/explorer/chain/optimism/withdrawal.ex
  • apps/explorer/lib/explorer/chain/ordered_cache.ex
  • apps/explorer/lib/explorer/chain/pending_operations_helper.ex
  • apps/explorer/lib/explorer/chain/smart_contract.ex
  • apps/explorer/lib/explorer/chain/token.ex
  • apps/explorer/lib/explorer/chain/token_transfer.ex
  • apps/explorer/lib/explorer/chain/transaction.ex
  • apps/explorer/lib/explorer/eth_rpc.ex
  • apps/explorer/lib/explorer/etherscan.ex
  • apps/explorer/lib/explorer/etherscan/logs.ex
  • apps/explorer/lib/explorer/helper.ex
  • apps/explorer/lib/explorer/market/source/crypto_compare.ex
  • apps/explorer/lib/explorer/microservice_interfaces/bens.ex
  • apps/explorer/lib/explorer/microservice_interfaces/metadata.ex
  • apps/explorer/lib/explorer/microservice_interfaces/multichain_search.ex
  • apps/explorer/lib/explorer/migrator/backfill_address_counters.ex
  • apps/explorer/lib/explorer/migrator/backfill_multichain_search_db.ex
  • apps/explorer/lib/explorer/migrator/backfill_token_counters.ex
  • apps/explorer/lib/explorer/migrator/reindex_blocks_with_stale_internal_transactions.ex
  • apps/explorer/lib/explorer/migrator/reindex_blocks_with_uncataloged_token_transfers.ex
  • apps/explorer/lib/explorer/query_helper.ex
  • apps/explorer/lib/explorer/token/metadata_retriever.ex
  • apps/explorer/lib/explorer/utility/address_id_to_address_hash.ex
  • apps/explorer/lib/explorer/utility/counters_refetch_block.ex
  • apps/explorer/lib/explorer/utility/missing_block_range.ex
  • apps/explorer/mix.exs
  • apps/explorer/priv/repo/migrations/20260831000000_add_counters_updated_at_to_addresses.exs
  • apps/explorer/priv/repo/migrations/20260831000001_create_address_counters_refetch_blocks.exs
  • apps/explorer/priv/repo/migrations/20260831000002_add_counters_updated_at_to_tokens.exs
  • apps/explorer/priv/repo/migrations/20260831000003_rename_address_counters_refetch_blocks.exs
  • apps/explorer/test/explorer/application_test.exs
  • apps/explorer/test/explorer/chain/address/coin_balance_test.exs
  • apps/explorer/test/explorer/chain/address/metadata_preloader_test.exs
  • apps/explorer/test/explorer/chain/block_number_helper_test.exs
  • apps/explorer/test/explorer/chain/block_test.exs
  • apps/explorer/test/explorer/chain/cache/accounts/refresher_test.exs
  • apps/explorer/test/explorer/chain/cache/address_tags_test.exs
  • apps/explorer/test/explorer/chain/cache/counters/address_counters_consolidator_test.exs
  • apps/explorer/test/explorer/chain/cache/counters/address_counters_test.exs
  • apps/explorer/test/explorer/chain/cache/counters/token_counters_consolidator_test.exs
  • apps/explorer/test/explorer/chain/cache/counters/token_counters_test.exs
  • apps/explorer/test/explorer/chain/cache/counters/transactions_test.exs
  • apps/explorer/test/explorer/chain/cache/propagator_test.exs
  • apps/explorer/test/explorer/chain/cache/scam_addresses_test.exs
  • apps/explorer/test/explorer/chain/cache/transactions_test.exs
  • apps/explorer/test/explorer/chain/import/runner/address/current_token_balances_test.exs
  • apps/explorer/test/explorer/chain/import/runner/blocks_test.exs
  • apps/explorer/test/explorer/chain/import_test.exs
  • apps/explorer/test/explorer/chain/null_round_height_test.exs
  • apps/explorer/test/explorer/chain/optimism/dispute_game_test.exs
  • apps/explorer/test/explorer/chain/optimism/eip1559_config_update_test.exs
  • apps/explorer/test/explorer/chain/token_transfer_test.exs
  • apps/explorer/test/explorer/chain/transaction_test.exs
  • apps/explorer/test/explorer/chain_test.exs
  • apps/explorer/test/explorer/eth_rpc_test.exs
  • apps/explorer/test/explorer/etherscan/logs_test.exs
  • apps/explorer/test/explorer/etherscan_test.exs
  • apps/explorer/test/explorer/market/source/crypto_compare_test.exs
  • apps/explorer/test/explorer/microservice_interfaces/multichain_search_test.exs
  • apps/explorer/test/explorer/migrator/backfill_address_counters_test.exs
  • apps/explorer/test/explorer/migrator/backfill_token_counters_test.exs
  • apps/explorer/test/explorer/migrator/reindex_blocks_with_stale_internal_transactions_test.exs
  • apps/explorer/test/explorer/migrator/reindex_blocks_with_uncataloged_token_transfers_test.exs
  • apps/explorer/test/explorer/migrator/switch_pending_operations_test.exs
  • apps/explorer/test/explorer/utility/missing_block_range_test.exs
  • apps/explorer/test/support/factory.ex
  • apps/explorer/test/support/query_sources.ex
  • apps/indexer/lib/indexer/block/catchup/fetcher.ex
  • apps/indexer/lib/indexer/block/fetcher.ex
  • apps/indexer/lib/indexer/block/realtime/fetcher.ex
  • apps/indexer/lib/indexer/fetcher/beacon/client.ex
  • apps/indexer/lib/indexer/fetcher/beacon/deposit.ex
  • apps/indexer/lib/indexer/fetcher/internal_transaction.ex
  • apps/indexer/lib/indexer/fetcher/on_demand/internal_transaction.ex
  • apps/indexer/lib/indexer/fetcher/on_demand/token_total_supply.ex
  • apps/indexer/lib/indexer/fetcher/optimism/transaction_batch.ex
  • apps/indexer/lib/indexer/fetcher/token_counters_updater.ex
  • apps/indexer/lib/indexer/supervisor.ex
  • apps/indexer/lib/indexer/temporary/uncataloged_token_transfers.ex
  • apps/indexer/mix.exs
  • apps/indexer/test/indexer/block/catchup/fetcher_test.exs
  • apps/indexer/test/indexer/fetcher/beacon/deposit_test.exs
  • apps/indexer/test/indexer/fetcher/internal_transaction_test.exs
  • apps/indexer/test/indexer/fetcher/on_demand/contract_creator_test.exs
  • apps/indexer/test/indexer/fetcher/on_demand/token_total_supply_test.exs
  • apps/indexer/test/indexer/temporary/uncataloged_token_transfers_test.exs
  • apps/nft_media_handler/mix.exs
  • apps/utils/mix.exs
  • bin/install_chrome_headless.sh
  • config/config_helper.exs
  • config/runtime.exs
  • config/runtime/prod.exs
  • cspell.json
  • docker-compose/envs/common-blockscout.env
  • docker/Makefile
  • mix.exs
  • rel/config.exs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@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 significant performance optimizations and feature enhancements, including incremental counter consolidation for addresses and tokens, a distributed cache propagator to prevent indexer stalls, support for OP Stack Upgrade 20 (Super Root games), and optimized participant preloading to reduce database queries. Feedback on these changes highlights several critical issues that must be addressed to prevent compilation and runtime failures: a compilation error in NullRoundHeight due to calling a private function in BlockNumberHelper, a missing alias for QueryHelper in CurrentTokenBalances, and potential runtime crashes in the Refresher and ScamAddresses caches if their configuration intervals are undefined and return nil.

Comment on lines +183 to +191
# the farthest fetched one are unknown, so they are looked up once the fetched ones are exhausted.
defp skip_null_rounds(number, direction, null_rounds, farthest_fetched) do
neighbor = BlockNumberHelper.move_by_one(number, direction)

cond do
MapSet.member?(null_rounds, neighbor) -> skip_null_rounds(neighbor, direction, null_rounds, farthest_fetched)
beyond?(neighbor, farthest_fetched, direction) -> neighbor_block_number(number, direction)
true -> neighbor
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.

critical

The function BlockNumberHelper.move_by_one/2 is defined as a private function (defp) in BlockNumberHelper and cannot be called from the NullRoundHeight module. This will cause a compilation error. We should define a local move_by_one/2 helper function within NullRoundHeight to resolve this.

  defp skip_null_rounds(number, direction, null_rounds, farthest_fetched) do
    neighbor = move_by_one(number, direction)

    cond do
      MapSet.member?(null_rounds, neighbor) -> skip_null_rounds(neighbor, direction, null_rounds, farthest_fetched)
      beyond?(neighbor, farthest_fetched, direction) -> neighbor_block_number(number, direction)
      true -> neighbor
    end
  end

  defp move_by_one(number, :previous), do: max(number - 1, 0)
  defp move_by_one(number, :next), do: number + 1


query =
from(ctb in CurrentTokenBalance,
where: ^QueryHelper.tuple_in([:address_hash, :token_contract_address_hash], ids),

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

QueryHelper is used here but it is not aliased or imported in this module, which will cause a compilation error. Use the fully qualified module name Explorer.QueryHelper to ensure successful compilation.

        where: ^Explorer.QueryHelper.tuple_in([:address_hash, :token_contract_address_hash], ids),

Comment on lines +180 to +182
defp update_interval do
Application.get_env(:explorer, __MODULE__)[:update_interval]
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 the :update_interval configuration is missing or nil, update_interval/0 will return nil. Passing nil to Process.send_after/3 will raise an ArgumentError and crash the GenServer. Provide a sensible default fallback value (e.g., :timer.minutes(1)).

  defp update_interval do
    Application.get_env(:explorer, __MODULE__, [])[:update_interval] || :timer.minutes(1)
  end

Comment on lines +189 to +195
defp update_interval do
config()[:update_interval]
end

defp max_size do
config()[:max_size]
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 the configuration is missing or nil, update_interval/0 and max_size/0 will return nil. A nil update interval will cause Process.send_after/3 to raise an ArgumentError and crash the GenServer. Additionally, comparing estimated_size > nil is implicitly false in Elixir, which could lead to unexpected behavior. Provide sensible default fallbacks for both functions.

  defp update_interval do
    config()[:update_interval] || :timer.minutes(5)
  end

  defp max_size do
    config()[:max_size] || 200_000
  end

@JOY
JOY (JOY) force-pushed the sync-upstream-v11.3.3 branch 15 times, most recently from 3fa63e0 to 1e9f363 Compare October 6, 2026 08:05
@JOY
JOY (JOY) force-pushed the sync-upstream-v11.3.3 branch from 1e9f363 to 4c2f0d5 Compare October 6, 2026 14: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.

5 participants