Skip to content

chore: sync xrplevm with upstream master + fix token_balance compile error#3

Open
JordiParraCrespo wants to merge 760 commits into
xrplevmfrom
xrplevm-update-08-06-26
Open

chore: sync xrplevm with upstream master + fix token_balance compile error#3
JordiParraCrespo wants to merge 760 commits into
xrplevmfrom
xrplevm-update-08-06-26

Conversation

@JordiParraCrespo

Copy link
Copy Markdown

Summary

Syncs the backend xrplevm fork with upstream Blockscout master (the local Merge branch 'master' ... into xrplevm that was not yet on origin/xrplevm) and fixes a compile error that merge introduced.

Compile fix

The upstream-master merge re-introduced public format_and_filter_address_params/1 and format_and_filter_token_balance_params/1 in apps/indexer/lib/indexer/fetcher/token_balance/helper.ex, colliding with the fork's private defp versions and leaving an orphaned @timeout reference. This fails to compile on the Dockerfile's Elixir 1.19.4:

error: defp format_and_filter_address_params/1 already defined as def ...helper.ex:68

Upstream blockscout#13923 ("Move current token balances into a separate fetcher") moved the import logic into Current/Historical, each with its own import_token_balances/1 calling the public Helper.format_and_filter_*. That left Helper.import_token_balances/1 and its private helpers as dead code. This PR removes that dead block so the module compiles.

⚠️ Behavior note: removing the dead block also drops the native-XRP (0xeeee…) coin-balance-via-token-balances optimization, which the blockscout#13923 refactor had already orphaned (it was unreachable/non-functional). If still desired, it should be re-ported into the Current/Historical import_token_balances/1 flow.

Verification

  • Builds successfully via docker-compose/docker-compose.local-build.yml (Elixir 1.19.4, RELEASE_VERSION 10.0.6).
  • Runs stably against the XRPL EVM testnet RPC (CHAIN_ID 1449000); serves the v2 API on :4000 (verified end-to-end with the blockscout-frontend chain/xrplevm build).

vbaranov and others added 30 commits December 1, 2025 12:48
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
…ut#13669)

Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
dependabot Bot and others added 30 commits March 10, 2026 16:53
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Maksym Zub <kroistsmeh@gmail.com>
…#14129)

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>
…14102)

Co-authored-by: glencorse033 <glencorse033@users.noreply.github.com>
Co-authored-by: Maxim Filonov <53992153+sl1depengwyn@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#14131)

Co-authored-by: glencorse033 <glencorse033@users.noreply.github.com>
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
)

Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
Co-authored-by: Victor Baranov <baranov.viktor.27@gmail.com>
The upstream-master merge re-introduced public format_and_filter_address_params/1
and format_and_filter_token_balance_params/1 in token_balance/helper.ex, which
collided with the fork's private defp versions (and an orphaned @timeout),
breaking compilation on Elixir 1.19.4.

After upstream blockscout#13923 moved the import logic into Current/Historical (each with
its own import_token_balances/1 calling the public Helper.format_and_filter_*),
Helper.import_token_balances/1 and its private helpers became dead code. Remove
them so the module compiles.

Note: this drops the native-XRP (0xeeee...) coin-balance-via-token-balances
optimization, which the blockscout#13923 refactor had already orphaned. Re-port into
Current/Historical import_token_balances/1 if still desired.
The Block schema only compiles in blob_gas_used/excess_blob_gas when built
with CHAIN_TYPE=ethereum, while runtime reads CHAIN_TYPE from
common-blockscout.env. Building without the arg produced a schema mismatch
that made the blocks on_conflict upsert fail (cannot update non-updatable
field :blob_gas_used) and silently halted block indexing.

Pass CHAIN_TYPE (default ethereum) as a build arg wherever the backend image
is built (docker-compose.yml backend + nft_media_handler, no-services.yml).
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.