Skip to content

[AHM] Relay to Assethub#2904

Merged
zjb0807 merged 12 commits into
masterfrom
relay-to-assethub
Jul 21, 2025
Merged

[AHM] Relay to Assethub#2904
zjb0807 merged 12 commits into
masterfrom
relay-to-assethub

Conversation

@zjb0807
Copy link
Copy Markdown
Contributor

@zjb0807 zjb0807 commented Jul 15, 2025

Major changes:

  • rename relaychain to assethub
  • SubAccountIndexAccountIdConvertor use sibling:2000 instead of para:2000
  • xcm-interface send xcm to assethub instead of relaychain

tested with polkadot_assethub polkadot-fellows/runtimes#812

Setup:

# acala.yml
import-storage:
  Homa:
    NominateIntervalEra: 1
  XcmInterface:
    XcmDestWeightAndFee:
     - [[HomaNominate], [{refTime: 5000000000, proofSize: 131072}, 5000000000]]

sibling:2000:
13cKp89Msu7M2PiaCuuGr1BzAsD5V3vaVbDMs3YtjMZHdGwR
sibling:2000 index 0:
12pw22Qyy3o28BLshjce9yrSMs3fhSiLsAjqLPAzGktbXYV7

# assethub.yml
import-storage:
  System:
    Account:
      - [[12pw22Qyy3o28BLshjce9yrSMs3fhSiLsAjqLPAzGktbXYV7], { providers: 1, data: { free: '46104761056640463', reserved: '200410000000', frozen: '46101975004999542'}}]
      - [[13cKp89Msu7M2PiaCuuGr1BzAsD5V3vaVbDMs3YtjMZHdGwR], { providers: 1, data: { free: '31888059184720240', reserved: '3400000000000', frozen: '0'}}]
  Staking:
    Validators:
      - [[1d6po5LATxuHeAUTSRd61LGA6QWJ7dJRzi852kojKFLbL3t], { commission: 0, blocked: false }]
      - [[14N5nJ4oR4Wj36DsBcPLh1JqjvrM2Uf23No2yc2ojjCvSC24], { commission: 0, blocked: false }]
      - [[14bUYpiF2oxVpmXDnFxBipSi4m9zYBThMZoLpY8bRQrPQNG1], { commission: 0, blocked: false }]
      - [[14zf4PVrmW7LwLptMkZwhKK2fwroFnMpMLrKiy5jpYCMZBwW], { commission: 0, blocked: false }]
      - [[1569aqCBma2m4TuUe1MxEs8EXBAZFCmwwcZMLde6HNbimuW8], { commission: 0, blocked: false }]
      - [[15XY7oJ99hVscy5jS3zUh5M3H6sxfccovyTVCPt15DuXCRAF], { commission: 0, blocked: false }]
      - [[15iA5hpjUecWBbf38Nfegwmtyux25o3LrGaNodfZDxq5nXXE], { commission: 0, blocked: false }]
      - [[16NWoCHEY67DDHCLe76QhgKD3AAcRQtarY54FFQQaJeftJNu], { commission: 0, blocked: false }]
      - [[15faP4KV8Puvtex2WXnhUoeedhNpTPt4jWcAmZVsUuNMVvUX], { commission: 0, blocked: false }]
      - [[14AakQ4jAmr2ytcrhfmaiHMpj5F9cR6wK1jRrdfC3N1oTbUz], { commission: 0, blocked: false }]
    Bonded:
      - [[12pw22Qyy3o28BLshjce9yrSMs3fhSiLsAjqLPAzGktbXYV7], 12pw22Qyy3o28BLshjce9yrSMs3fhSiLsAjqLPAzGktbXYV7]
    ledger:
      - [
          [12pw22Qyy3o28BLshjce9yrSMs3fhSiLsAjqLPAzGktbXYV7],
          {
            stash: 12pw22Qyy3o28BLshjce9yrSMs3fhSiLsAjqLPAzGktbXYV7,
            total: '46089842061525133',
            active: '42618337842051333',
            unlocking: [
              {
                value: '1133844989535540',
                era: 1872
              },
              {
                value: '1344224653780',
                era: 1874
              },
              {
                value: '17771827209997',
                era: 1876
              },
              {
                value: '16958447545257',
                era: 1877
              },
              {
                value: '184943273868892',
                era: 1878
              },
              {
                value: '413412872141',
                era: 1879
              },
              {
                value: '351965507879238',
                era: 1880
              },
              {
                value: '46970182113266',
                era: 1881
              },
              {
                value: '99129426941179',
                era: 1882
              },
              {
                value: '109664158945638',
                era: 1886
                            },
              {
                value: '2924577587526',
                era: 1887
              },
              {
                value: '387132826378',
                era: 1888
              },
              {
                value: '5111759292783',
                era: 1889
              },
              {
                value: '4562923830023',
                era: 1890,
              },
              {
                value: '8813734252312',
                era: 1893
              },
              {
                value: '139948127216953',
                era: 1894
              },
              {
                value: '91995244397781',
                era: 1895
              },
              {
                value: '1182402471390744',
                era: 1896
              },
              {
                value: '72352797114372',
                era: 1897
              }
            ]
          }
        ]

TODO:

  • debug and fix homa.nominate
xcm::validate_xcm_nesting  ERROR: [14] Decode error: Error for xcm: V4(Xcm([WithdrawAsset(Assets([Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(0) }])), BuyExecution { fees: Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(0) }, weight_limit: Unlimited }, Transact { origin_kind: SovereignAccount, require_weight_at_most: Weight { ref_time: 0, proof_size: 0 }, call: "0x2801000059050400ce5ca095000c6067e61d534542ca57971c066d8260c26ed6eaa66301ec2ebdf0" }, RefundSurplus, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: Location { parents: 0, interior: X1([Parachain(2000)])
} }]))!
xcm-interface  DEBUG: [14] subaccount 0 send XCM to nominate [ce5ca095000c6067e61d534542ca57971c066d8260c26ed6eaa66301ec2ebdf0 (5GjHEj4R...)], result: Err(ExceedsMaxMessageSize)
  • check staking pallet index of AssetHub on polkadot/kusama

@zjb0807 zjb0807 requested a review from xlc July 15, 2025 23:18
Comment thread modules/assethub/src/lib.rs Outdated
zjb0807 and others added 3 commits July 16, 2025 10:50
@zjb0807 zjb0807 requested a review from xlc July 18, 2025 07:08
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 18, 2025

Codecov Report

Attention: Patch coverage is 1.92308% with 153 lines in your changes missing coverage. Please review.

Project coverage is 61.14%. Comparing base (5c46aa3) to head (c70f7ff).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
modules/assethub/src/lib.rs 0.00% 102 Missing ⚠️
modules/xcm-interface/src/lib.rs 0.00% 43 Missing ⚠️
modules/homa-validator-list/src/lib.rs 14.28% 6 Missing ⚠️
modules/homa/src/lib.rs 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2904      +/-   ##
==========================================
- Coverage   61.35%   61.14%   -0.21%     
==========================================
  Files          69       69              
  Lines        9411     9449      +38     
==========================================
+ Hits         5774     5778       +4     
- Misses       3637     3671      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xlc
Copy link
Copy Markdown
Member

xlc commented Jul 20, 2025

@zjb0807 I think we can merge this now as we don't plan to have other runtime upgrades meanwhile.

Can you also write an issue to include list of tasks remains. e.g. confirm the pallet index after the kusama-ah / polkadot-ah are released.

@zjb0807 zjb0807 merged commit 069ed19 into master Jul 21, 2025
7 checks passed
@zjb0807 zjb0807 deleted the relay-to-assethub branch July 21, 2025 00:49
@zjb0807 zjb0807 mentioned this pull request Jul 21, 2025
2 tasks
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.

2 participants