Skip to content

Fix Debug/Dev chain sync: list Avail DA Mainnet once in chains_dev.json - #1316

Closed
takemiyamakoto wants to merge 1 commit into
masterfrom
claude/dev-chains-avail-dedupe
Closed

takemiyamakoto wants to merge 1 commit into
masterfrom
claude/dev-chains-avail-dedupe

Conversation

@takemiyamakoto

Copy link
Copy Markdown
Contributor

Summary

Debug and Fearless Dev builds (-DF_DEV in fearless.debug.xcconfig and fearless.dev.xcconfig) read remote-config/development/chains/v13/chains_dev.json from master. That list had Avail DA Mainnet (b91746b45e0346cc2f815a520b9c6cb4d5c0902af848db0a80f85932d2e8276a) twice. ChainSyncService.sanitizingRemoteChains refuses a whole list that repeats a chainId (duplicateRemoteChainIdentifier), so every sync attempt failed and a fresh install kept only the app-owned Bitcoin, Solana and Taira chains: no Polkaswap, no SORA, no Substrate networks. This showed up in a Debug simulator run on 2026-11-07, where the app's stdout shows the error and the retries.

Release builds read remote-config/production/chains/v13/chains.json, which has one Avail entry. This PR doesn't change it.

Root cause

The duplicate arrived with the import in #1305. Upstream soramitsu/shared-features-utils@f2ed4ccf chains/v13/chains_dev.json already listed Avail twice; its SHA-256 5726b01a… is the manifest's upstreamSha256. scripts/verify-remote-config.py never compared chainIds, so the audit passed this list.

Changes

  • remote-config/development/chains/v13/chains_dev.json: delete the first Avail DA Mainnet copy (74 lines, deletions only). The two copies were byte-identical and equal to the production entry. The copy I kept is where production has it, after Viction and next to Avail Turing Testnet. The list goes from 78 to 77 chains, every chainId is unique, and no other entry changes (the new list equals the old one without index 59).
  • config/remote-config-imports.json: re-pin ownedSha256 to 26b9dc290ad22588888dee433f6d6f7dfbe2b3541d1cf738fadef37ceca14310 and log the correction.
  • scripts/verify-remote-config.py: the audit now fails when a versioned chain list (remote-config/*/chains/v*/chains*.json) repeats a chainId. Two new tests are in scripts/test-remote-config.py.
  • docs/ChainRegistryVersions.md: refresh the owned-registry table. Its chain-list rows still had values from before the 2026-10-29 network removal. The production row now shows master's current value; this PR doesn't change that file.

Evidence

This project runs no hosted CI. Every check below ran locally on a clean tree at the PR head, 1cbd9038d905e66110c8caa460e932227d6aba52 (base dce8790cd).

Check Result
python3 scripts/test-remote-config.py -v 16 tests OK (14 existing, 2 new)
python3 scripts/verify-remote-config.py . {"documents": 34, "ownedReferences": 1995}, exit 0
New verifier on master dce8790cd data remote-config/development/chains/v13/chains_dev.json: chainId b91746b4 is listed more than once, exit 1
Old verifier on master dce8790cd data exit 0 (missed the duplicate)
python3 scripts/deps/test-native-source.py 16 tests OK
python3 scripts/deps/verify-native-source.py . exit 0
python3 Native/scripts/test-xcm-read-only-boundary.py PASS
python3 Native/scripts/test-authorized-rpc.py PASS, 37 cases
Manifest pins 949 of 949 ownedSha256 values match the files
Duplicate scan of every v2, v9 and v13 list none

ownedReferences drops from 1997 to 1995 because the removed copy carried two icon URLs.

Debug and Dev builds read this file from master at runtime, so the fix reaches them when this merges. No new build is needed.

Not in this PR (found while checking)

Risk and rollback

This only changes app data, and Release builds are unaffected. To roll back, revert this commit; that restores the duplicate and the old pin.

🤖 Generated with Claude Code

remote-config/development/chains/v13/chains_dev.json listed Avail DA
Mainnet (b91746b4...) twice, as the shared-features-utils f2ed4ccf list
it was imported from already did. Debug and Fearless Dev builds read
this list (F_DEV), and ChainSyncService.sanitizingRemoteChains refuses
a list that repeats a chainId, so every sync failed and those builds
kept only Bitcoin, Solana and Taira: no Polkaswap, no Substrate
networks.

Both copies were identical to the single production entry. Keep the one
at the production position (after Viction, next to Avail Turing
Testnet) and delete the other; no other entry changes.

- Re-pin the file's ownedSha256 and log the correction in
  config/remote-config-imports.json.
- scripts/verify-remote-config.py now fails on a versioned chain list
  that repeats a chainId; the previous audit passed this list.
- Refresh the owned-registry table in docs/ChainRegistryVersions.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@takemiyamakoto
takemiyamakoto requested a review from a team as a code owner November 7, 2026 09:57
@takemiyamakoto
takemiyamakoto deleted the claude/dev-chains-avail-dedupe branch November 7, 2026 09:59
@takemiyamakoto

Copy link
Copy Markdown
Contributor Author

Superseded by #1317, same commit (1cbd903). Master's required Branch Flow check takes only develop, release/* or hotfix/* heads, so I renamed the head to hotfix/dev-chains-avail-dedupe. GitHub closed this PR when its head was renamed.

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.

1 participant