Skip to content

Commit

Permalink
Improves installation doc (#9)
Browse files Browse the repository at this point in the history
* Improves installation doc

* update rust-toolchain.toml

* update readme

Co-authored-by: Bryan Chen <[email protected]>
  • Loading branch information
Alan Sapede and xlc authored Oct 27, 2022
1 parent 082a063 commit 8de817a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,31 @@

Create parallel reality of your Substrate network.

## Run
## Install

Make sure you have setup Rust environment.
Make sure you have setup Rust environment (>= 1.64).

- Clone repository with submodules ([smoldot](https://github.com/paritytech/smoldot))
- `git clone --recurse-submodules https://github.com/AcalaNetwork/chopsticks.git && cd chopsticks`
- Install deps
- `yarn`
- Build wasm
- `yarn build-wasm`
- Run nodejs runner
- `yarn start run-block --endpoint=wss://acala-rpc-2.aca-api.network/ws`

Connect to the rpc via localhost:8000 and you may be able to submit transaction and it will be executed in parallel reality.
## Run

NOTE: subscriptions are not yet implemented so you will need to refresh to see new blocks.
- Replay latest block

- `yarn start run-block --endpoint=wss://acala-rpc-2.aca-api.network/ws`
- This will replay the last block and print out the changed storages

NOTE2: this currently takes ~half minute to produce a new block.
- Run a test node
- `yarn start dev --endpoint=wss://acala-rpc-2.aca-api.network/ws`
- You have a test node running at `ws://localhost:8000`
- You can use [Polkadot.js Apps](https://polkadot.js.org/apps/) to connect to this node
- Submit any transaction to produce a new block in the in parallel reality

Next step:

- Implements subscription
- Disable signature verification
- API for arbitrary storage override
- Compile the rust part into wasm
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "nightly-2022-10-16"
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"

0 comments on commit 8de817a

Please sign in to comment.