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

polkadot v1.2.0 #207

Merged
merged 11 commits into from
Nov 6, 2023
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
3,633 changes: 2,154 additions & 1,479 deletions Cargo.lock

Large diffs are not rendered by default.

54 changes: 38 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,41 @@ panic = "unwind"

#only while debugging/developping
#[patch."https://github.com/encointer/pallets"]
#encointer-balances-tx-payment = { path = "../encointer-pallets/balances-tx-payment" }
#encointer-balances-tx-payment-rpc = { path = "../encointer-pallets/balances-tx-payment/rpc" }
#encointer-balances-tx-payment-rpc-runtime-api = { path = "../encointer-pallets/balances-tx-payment/rpc/runtime-api" }
#encointer-ceremonies-assignment = { path = "../encointer-pallets/ceremonies/assignment" }
#encointer-primitives = { path = "../encointer-pallets/primitives" }
#pallet-encointer-ceremonies = { path = "../encointer-pallets/ceremonies" }
#pallet-encointer-ceremonies-rpc = { path = "../encointer-pallets/ceremonies/rpc" }
#pallet-encointer-ceremonies-rpc-runtime-api = { path = "../encointer-pallets/ceremonies/rpc/runtime-api" }
#pallet-encointer-communities = { path = "../encointer-pallets/communities" }
#pallet-encointer-communities-rpc = { path = "../encointer-pallets/communities/rpc" }
#pallet-encointer-communities-rpc-runtime-api = { path = "../encointer-pallets/communities/rpc/runtime-api" }
#pallet-encointer-balances = { path = "../encointer-pallets/balances" }
#pallet-encointer-scheduler = { path = "../encointer-pallets/scheduler" }
#pallet-encointer-bazaar = { path = "../encointer-pallets/bazaar" }
#pallet-encointer-bazaar-rpc = { path = "../encointer-pallets/bazaar/rpc" }
#pallet-encointer-bazaar-rpc-runtime-api = { path = "../encointer-pallets/bazaar/rpc/runtime-api" }
#encointer-balances-tx-payment = { path = "../pallets/balances-tx-payment" }
#encointer-balances-tx-payment-rpc = { path = "../pallets/balances-tx-payment/rpc" }
#encointer-balances-tx-payment-rpc-runtime-api = { path = "../pallets/balances-tx-payment/rpc/runtime-api" }
#encointer-ceremonies-assignment = { path = "../pallets/ceremonies/assignment" }
#encointer-primitives = { path = "../pallets/primitives" }
#pallet-encointer-ceremonies = { path = "../pallets/ceremonies" }
#pallet-encointer-ceremonies-rpc = { path = "../pallets/ceremonies/rpc" }
#pallet-encointer-ceremonies-rpc-runtime-api = { path = "../pallets/ceremonies/rpc/runtime-api" }
#pallet-encointer-communities = { path = "../pallets/communities" }
#pallet-encointer-communities-rpc = { path = "../pallets/communities/rpc" }
#pallet-encointer-communities-rpc-runtime-api = { path = "../pallets/communities/rpc/runtime-api" }
#pallet-encointer-balances = { path = "../pallets/balances" }
#pallet-encointer-scheduler = { path = "../pallets/scheduler" }
#pallet-encointer-bazaar = { path = "../pallets/bazaar" }
#pallet-encointer-bazaar-rpc = { path = "../pallets/bazaar/rpc" }
#pallet-encointer-bazaar-rpc-runtime-api = { path = "../pallets/bazaar/rpc/runtime-api" }

#only while debugging/developping
#[patch.crates-io]
#encointer-balances-tx-payment = { path = "../pallets/balances-tx-payment" }
#encointer-balances-tx-payment-rpc = { path = "../pallets/balances-tx-payment/rpc" }
#encointer-balances-tx-payment-rpc-runtime-api = { path = "../pallets/balances-tx-payment/rpc/runtime-api" }
#encointer-ceremonies-assignment = { path = "../pallets/ceremonies/assignment" }
#encointer-primitives = { path = "../pallets/primitives" }
#pallet-encointer-ceremonies = { path = "../pallets/ceremonies" }
#pallet-encointer-ceremonies-rpc = { path = "../pallets/ceremonies/rpc" }
#pallet-encointer-ceremonies-rpc-runtime-api = { path = "../pallets/ceremonies/rpc/runtime-api" }
#pallet-encointer-communities = { path = "../pallets/communities" }
#pallet-encointer-communities-rpc = { path = "../pallets/communities/rpc" }
#pallet-encointer-communities-rpc-runtime-api = { path = "../pallets/communities/rpc/runtime-api" }
#pallet-encointer-balances = { path = "../pallets/balances" }
#pallet-encointer-scheduler = { path = "../pallets/scheduler" }
#pallet-encointer-bazaar = { path = "../pallets/bazaar" }
#pallet-encointer-bazaar-rpc = { path = "../pallets/bazaar/rpc" }
#pallet-encointer-bazaar-rpc-runtime-api = { path = "../pallets/bazaar/rpc/runtime-api" }
#pallet-encointer-faucet = { path = "../pallets/faucet" }
#pallet-encointer-reputation-commitments = { path = "../pallets/reputation-commitments" }
#
50 changes: 9 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,16 @@ It is forked from the [Cumulus](https://github.com/paritytech/cumulus) repositor
* [Sybil Defense Demo](docs/sybil-demo)
* [Native Downward-/ Upward Token Tx Demo](docs/downward-upward-native-token-tx)

## Launch a local setup with polkadot-launch
## Zombienet

###Build sudo-patched polkadot binary
Inside the parent directory of this repo, execute the following commands:
```bash
git clone https://github.com/paritytech/polkadot
cd polkadot
git fetch
git checkout v0.9.18
# add sudo to all types of relaychain to simplify and accelerate testing
git cherry-pick 755a4b69c94ba75618080c76d25133b11c1d58db
# use `cargo install diener` if not done already
diener update --substrate --branch polkadot-v0.9.18
cargo build --release
1. Download zombienet from the releases in the [zombienet](https://github.com/paritytech/zombienet) repository.
2. Copy it to `~/.local/bin/`
3. Launch it in your terminal
```

Run:
`cp target/release/polkadot ../../bin/polkadot-0.9.24-sudo`
It is assumed that the bin directory exists at this relative path.
Note: When using the `launch-rococo-local-with-encointer` setup it is assumed that the `bin` folder also contains a `polkadot-v0.9.37` binary.


### Setup local testnet with polkadot-launch
[polkadot-launch](https://github.com/paritytech/polkadot-launch) lets you easily setup a local testnet. The following procedure will setup a local testnet with three relay chain nodes and two encointer parachains. It will also setup up a XCM (cross chain messaging) channel between the two chains.

**Note 2:** The `polkadot-launch-config.json` and the commands below assume that the polkadot-launch directory is on the same level as this repo's directory.

**Preliminaries:** you need to have yarn and node installed

Inside the parent directory of this repo, execute the following commands:
```bash
# We need to build it from source. The one from the yarn registry does not work with our code.
git clone https://github.com/paritytech/polkadot-launch
cd polkadot-launch
yarn install
yarn build

cd ../encointer-parachain
cargo build --release
node ../polkadot-launch/dist/cli.js ./polkadot-launch/launch-rococo-local-with-launch.json
zombienet-linux-x64 spawn --provider native zombienet/rococo-local-with-encointer.toml
```

This launches the local testnet and creates 5 log files: `alice.log`, `bob.log`, `charlie.log`, which are the logs of the relay chain nodes and `9944.log`, `9955.log`, which are the logs of the two parachains.

Executing the `./tmux_setup.sh` script at the project root will set up tmux with three panes that tailing the logs of `alice.log`, `9944.log` and `9955.log`.
**Note:** You can also set a chain-spec path to the zombienet config, but the config param is named `chain_spec_path`.

## manual test setup step by step

Expand Down Expand Up @@ -101,6 +66,9 @@ cargo build --release
# should print the phase
./target/release/encointer-client-notee -p 9946 next-phase
# should progress phase
./target/release/encointer-client-notee -p 9946 list-communities
# should print 0 communities, if `--enable-offchain-indexing` is `true` or panic otherwise

```

### Deploy on rococo
Expand Down
49 changes: 0 additions & 49 deletions polkadot-launch/launch-kusama-local-with-encointer.json

This file was deleted.

This file was deleted.

49 changes: 0 additions & 49 deletions polkadot-launch/launch-rococo-local-with-encointer.json

This file was deleted.

43 changes: 0 additions & 43 deletions polkadot-launch/launch-rococo-local-with-launch.json

This file was deleted.

30 changes: 0 additions & 30 deletions polkadot-launch/launch-rococo-local.json

This file was deleted.

Loading