Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Moonbase runtime 2403 #76

Merged
merged 1 commit into from
Aug 6, 2023
Merged

Conversation

imstar15
Copy link
Member

@imstar15 imstar15 commented Aug 5, 2023

  1. Modify WEIGHT_PROOF_SIZE in src/config/moonbase-local.js
  2. Modify getProxyAccount function for Moonbase.
    Both Moonbase and Moonbeam have updated their algorithms for computing derived account to HashedDescriptionDescribeFamilyAllTerminal. So we should follow the modification.

https://github.com/moonbeam-foundation/moonbeam/blob/93548eeba1e32361c401c58c87596b400707557a/runtime/moonbase/src/xcm_config.rs#L114

The implementation details are available here:
https://github.com/moonbeam-foundation/polkadot/blob/89fd916a027ea7fb4a1b0092d0259e7897b45a79/xcm/xcm-builder/src/location_conversion.rs#L40

Our implementation refers to:
https://github.com/Moonsong-Labs/xcm-tools/blob/d7618f219e7ceecd4b4c34ad686b25621b5eabff/scripts/calculate-multilocation-derivative-account.ts#L38

Log:

4. Execute an XCM from Moonbase Local to Turing Dev ...

a). Create a payload extrinsic to store in Turing’s task ...

b). Create an automation time task with the payload extrinsic ...
Task extrinsic encoded call data: 0x3c030004000000000000000003010100a10f03010200a10f040303010200a10f040300a0e7ae395d64000000000000000000c90126018097c3c354652cb1eeed3e5b65fba2576470678a01581501000000000000000000000000000000000000000000000000000000000000970951a12f975e6762482aca81e57d5a2a4e73f4000000000000000000000000000000000000000000000000000000000000000010d09de08a0003404ac76c5a15010003401462a85a860300d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d

c). Schedule the task from moonbase ...
Proxy task extrinsic encoded call data: 0x3c030004000000000000000003010100a10f03010200a10f040303010200a10f040300a0e7ae395d64000000000000000000c90126018097c3c354652cb1eeed3e5b65fba2576470678a01581501000000000000000000000000000000000000000000000000000000000000970951a12f975e6762482aca81e57d5a2a4e73f4000000000000000000000000000000000000000000000000000000000000000010d09de08a0003404ac76c5a15010003401462a85a860300d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d
transactCallWeight:  { refTime: '1,332,429,446', proofSize: '0' }
weight: (7332429446, 0)

Execute the above an XCM from Moonbase Local to schedule a task on Turing Dev ...
transactExtrinsic Encoded call data: 0x210603010100092100000100c7b1ac0e800401000000000000000061033c030004000000000000000003010100a10f03010200a10f040303010200a10f040300a0e7ae395d64000000000000000000c90126018097c3c354652cb1eeed3e5b65fba2576470678a01581501000000000000000000000000000000000000000000000000000000000000970951a12f975e6762482aca81e57d5a2a4e73f4000000000000000000000000000000000000000000000000000000000000000010d09de08a0003404ac76c5a15010003401462a85a860300d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0386426b4f00010786fe0bb50100
status.type Ready
status.type InBlock
status.type Finalized
        automationTime:TaskScheduled:: (phase={"applyExtrinsic":0})
                        AccountId32: 6BNrKN1Hp6fd8nAVZPcTeR5smPHTEiz1g8rgrPtSmxVdSTcq
                        Bytes: 0x38342d302d31
                        Option<AccountId32>: 6AwtFW6sYcQ8RcuAJeXdDKuFtUVXj4xW57ghjYQ5xyciT1yd
TaskId: 84-0-1

5. Keep Listening XCM events on Moonbase Local until 2023-08-06 02:00:00(1691258400000) to verify that the task(taskId: 84-0-1) will be successfully executed ...
        ethereum:Executed:: (phase={"applyExtrinsic":1})
                        H160: 0x8097c3c354652cb1eeed3e5b65fba2576470678a
                        H160: 0x970951a12f975e6762482aca81e57d5a2a4e73f4
                        H256: 0x509664fff577d9ea034ca17faeeb2654ded259e86fd66445d6f8720026acde39
                        {"_enum":{"Succeed":"EvmCoreErrorExitSucceed","Error":"EvmCoreErrorExitError","Revert":"EvmCoreErrorExitRevert","Fatal":"EvmCoreErrorExitFatal"}}: {"succeed":"Stopped"}
                        Bytes: 0x
Task has been executed!
Reached the end of main() ...

@imstar15 imstar15 requested review from v9n and chrisli30 August 5, 2023 17:38
@chrisli30 chrisli30 force-pushed the update-moonbase-runtime-2403 branch from f7e2664 to ae8174f Compare August 6, 2023 20:18
Copy link
Member

@chrisli30 chrisli30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested with the below chain verisons and verified that moonbase-local test is passing.
| Kusama | v0.9.43 |
| Turing Network | v2.0.0 |
| Moonriver | runtime-2403 |

@imstar15 all above chains can be run now with our fix in Zombienet, paritytech/zombienet#766
You only need to sync from zombienet main and rebuild its binary.

@chrisli30 chrisli30 merged commit aa7eb1d into master Aug 6, 2023
1 check passed
@chrisli30 chrisli30 deleted the update-moonbase-runtime-2403 branch August 6, 2023 20:27
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