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

chore: add chopsticks config #157

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chopsticks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Chopsticks

A brief guide on testing a runtime upgrade with [Chopsticks](https://github.com/AcalaNetwork/chopsticks/).

## Runtime Upgrade

1. Launch local network with forks of Pop and Paseo state:
```shell
npx @acala-network/chopsticks@latest xcm -r ./.chopsticks/paseo.yml -p ./.chopsticks/testnet.yml
```
2. Authorise and apply the authorised runtime upgrade on the local Pop fork.
3. Build a block on the local relay chain to build a block (using [websocat](https://github.com/vi/websocat)).
```shell
websocat ws://localhost:8001
{"jsonrpc":"2.0","id":2,"method":"dev_newBlock","params":[{"count":1}]}
```
4. Build blocks on Pop to complete the upgrade:
```shell
websocat ws://localhost:8000
{"jsonrpc":"2.0","id":2,"method":"dev_newBlock","params":[{"count":10}]}
```
5. Verify that the runtime upgrade completed successfully.
14 changes: 14 additions & 0 deletions .chopsticks/devnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
endpoint: wss://rpc2.paseo.popnetwork.xyz
mock-signature-host: true
db: ./db.sqlite
wasm-override: ../pop-node/target/release/wbuild/pop-runtime-devnet/pop_runtime_devnet.wasm

import-storage:
System:
Account:
- - - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
- providers: 1
data:
free: 1000000000000000
Sudo:
Key: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY # Alice
13 changes: 13 additions & 0 deletions .chopsticks/paseo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
endpoint: wss://rpc.ibp.network/paseo
mock-signature-host: true
db: ./db.sqlite

import-storage:
System:
Account:
- - - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
- providers: 1
data:
free: 1000000000000000
Sudo:
Key: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY # Alice
13 changes: 13 additions & 0 deletions .chopsticks/testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
endpoint: wss://rpc2.paseo.popnetwork.xyz
mock-signature-host: true
db: ./db.sqlite

import-storage:
System:
Account:
- - - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
- providers: 1
data:
free: 1000000000000000
Sudo:
Key: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY # Alice
Loading