Skip to content

Commit

Permalink
upgrade to polkadot sdk 1.12 (#371)
Browse files Browse the repository at this point in the history
* psvm 1.12 plus patches

* fix upgrade

* bump version and warning fixe

* lift patches

* fix CI

* enhance test script an output
  • Loading branch information
brenzi authored Jun 25, 2024
1 parent 2208ffc commit 6b9acc9
Show file tree
Hide file tree
Showing 14 changed files with 1,745 additions and 995 deletions.
2,205 changes: 1,415 additions & 790 deletions Cargo.lock

Large diffs are not rendered by default.

178 changes: 89 additions & 89 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,96 +26,96 @@ serde_json = "1.0.114"
tokio = { version = "1.33", features = ["rt-multi-thread", "macros", "time"] }

# encointer deps
encointer-balances-tx-payment = { default-features = false, version = "7.0.0" }
encointer-balances-tx-payment-rpc = { version = "7.0.0" }
encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, version = "7.0.0" }
encointer-ceremonies-assignment = { version = "7.0.0" }
encointer-primitives = { default-features = false, version = "7.0.0" }
pallet-encointer-balances = { default-features = false, version = "7.0.0" }
pallet-encointer-bazaar = { default-features = false, version = "7.0.0" }
pallet-encointer-bazaar-rpc = { version = "7.0.0" }
pallet-encointer-bazaar-rpc-runtime-api = { default-features = false, version = "7.0.0" }
pallet-encointer-ceremonies = { default-features = false, version = "7.0.0" }
pallet-encointer-ceremonies-rpc = { version = "7.0.0" }
pallet-encointer-ceremonies-rpc-runtime-api = { default-features = false, version = "7.0.0" }
pallet-encointer-communities = { default-features = false, version = "7.0.0" }
pallet-encointer-communities-rpc = { version = "7.0.0" }
pallet-encointer-communities-rpc-runtime-api = { default-features = false, version = "7.0.0" }
pallet-encointer-democracy = { default-features = false, version = "7.0.0" }
pallet-encointer-faucet = { default-features = false, version = "7.0.0" }
pallet-encointer-reputation-commitments = { default-features = false, version = "7.0.0" }
pallet-encointer-scheduler = { default-features = false, version = "7.0.0" }
encointer-balances-tx-payment = { default-features = false, version = "~11.1.0" }
encointer-balances-tx-payment-rpc = { version = "~11.1.0" }
encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, version = "~11.1.0" }
encointer-ceremonies-assignment = { version = "~11.1.0" }
encointer-primitives = { default-features = false, version = "~11.2.0" }
pallet-encointer-balances = { default-features = false, version = "~11.1.0" }
pallet-encointer-bazaar = { default-features = false, version = "~11.1.0" }
pallet-encointer-bazaar-rpc = { version = "~11.1.0" }
pallet-encointer-bazaar-rpc-runtime-api = { default-features = false, version = "~11.1.0" }
pallet-encointer-ceremonies = { default-features = false, version = "~11.1.0" }
pallet-encointer-ceremonies-rpc = { version = "~11.1.0" }
pallet-encointer-ceremonies-rpc-runtime-api = { default-features = false, version = "~11.1.0" }
pallet-encointer-communities = { default-features = false, version = "~11.1.0" }
pallet-encointer-communities-rpc = { version = "~11.1.0" }
pallet-encointer-communities-rpc-runtime-api = { default-features = false, version = "~11.1.0" }
pallet-encointer-democracy = { default-features = false, version = "~11.2.0" }
pallet-encointer-faucet = { default-features = false, version = "~11.2.0" }
pallet-encointer-reputation-commitments = { default-features = false, version = "~11.1.0" }
pallet-encointer-scheduler = { default-features = false, version = "~11.1.0" }


# substrate deps
frame-benchmarking = { default-features = false, version = "30.0.0" }
frame-benchmarking-cli = { version = "34.0.0" }
frame-executive = { default-features = false, version = "30.0.0" }
frame-support = { default-features = false, version = "30.0.0" }
frame-system = { default-features = false, version = "30.0.0" }
frame-system-benchmarking = { default-features = false, version = "30.0.0" }
frame-system-rpc-runtime-api = { default-features = false, version = "28.0.0" }
frame-try-runtime = { default-features = false, version = "0.36.0" }
frame-benchmarking = { version = "34.0.0", default-features = false }
frame-benchmarking-cli = { version = "38.0.0" }
frame-executive = { version = "34.0.0", default-features = false }
frame-support = { version = "34.0.0", default-features = false }
frame-system = { version = "34.0.1", default-features = false }
frame-system-benchmarking = { version = "34.0.0", default-features = false }
frame-system-rpc-runtime-api = { version = "32.0.0", default-features = false }
frame-try-runtime = { version = "0.40.0", default-features = false }
hex-literal = { version = "0.4.1" }
jsonrpsee = { version = "0.22.0", features = ["server"] }
pallet-asset-tx-payment = { default-features = false, version = "30.0.0" }
pallet-aura = { default-features = false, version = "29.0.0" }
pallet-balances = { default-features = false, version = "30.0.0" }
pallet-grandpa = { default-features = false, version = "30.0.0" }
pallet-insecure-randomness-collective-flip = { default-features = false, version = "18.0.0" }
pallet-proxy = { default-features = false, version = "30.0.0" }
pallet-scheduler = { default-features = false, version = "31.0.0" }
pallet-sudo = { default-features = false, version = "30.0.0" }
pallet-timestamp = { default-features = false, version = "29.0.0" }
pallet-transaction-payment = { default-features = false, version = "30.0.0" }
pallet-transaction-payment-rpc = { version = "32.0.0" }
pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "30.0.0" }
pallet-treasury = { default-features = false, version = "29.0.0" }
pallet-utility = { default-features = false, version = "30.0.0" }
sc-basic-authorship = { version = "0.36.0" }
sc-chain-spec = "29.0.0"
sc-cli = { version = "0.38.0" }
sc-client-api = { version = "30.0.0" }
sc-consensus = { version = "0.35.0" }
sc-consensus-aura = { version = "0.36.0" }
sc-consensus-grandpa = { version = "0.21.0" }
sc-executor = { version = "0.34.0" }
sc-keystore = { version = "27.0.0" }
sc-network = { version = "0.36.0" }
sc-offchain = { version = "31.0.0" }
sc-rpc = "31.0.0"
sc-rpc-api = "0.35.0"
sc-service = { version = "0.37.0" }
sc-telemetry = { version = "17.0.0" }
sc-transaction-pool = { version = "30.0.0" }
sc-transaction-pool-api = { version = "30.0.0" }
sp-api = { default-features = false, version = "28.0.0" }
sp-application-crypto = { default-features = false, version = "32.0.0" }
sp-arithmetic = { default-features = false, version = "25.0.0" }
sp-block-builder = { default-features = false, version = "28.0.0" }
sp-blockchain = "30.0.0"
sp-consensus = { version = "0.34.0" }
sp-consensus-aura = { default-features = false, version = "0.34.0" }
sp-consensus-grandpa = { version = "15.0.0" }
sp-core = { default-features = false, version = "30.0.0" }
sp-genesis-builder = { default-features = false, version = "0.9.0" }
sp-inherents = { default-features = false, version = "28.0.0" }
sp-io = { default-features = false, version = "32.0.0" }
sp-keyring = "33.0.0"
sp-keystore = "0.36.0"
sp-offchain = { default-features = false, version = "28.0.0" }
sp-rpc = "28.0.0"
sp-runtime = { default-features = false, version = "33.0.0" }
sp-session = { default-features = false, version = "29.0.0" }
sp-staking = { default-features = false, version = "28.0.0" }
sp-std = { default-features = false, version = "14.0.0" }
sp-storage = { default-features = false, version = "20.0.0" }
sp-timestamp = { version = "28.0.0" }
sp-transaction-pool = { default-features = false, version = "28.0.0" }
sp-version = { default-features = false, version = "31.0.0" }
substrate-frame-rpc-system = { version = "30.0.0" }
pallet-asset-tx-payment = { version = "34.0.0", default-features = false }
pallet-aura = { version = "33.0.0", default-features = false }
pallet-balances = { version = "35.0.0", default-features = false }
pallet-grandpa = { version = "34.0.0", default-features = false }
pallet-insecure-randomness-collective-flip = { version = "22.0.0", default-features = false }
pallet-proxy = { version = "34.0.0", default-features = false }
pallet-scheduler = { version = "35.0.0", default-features = false }
pallet-sudo = { version = "34.0.0", default-features = false }
pallet-timestamp = { version = "33.0.0", default-features = false }
pallet-transaction-payment = { version = "34.0.0", default-features = false }
pallet-transaction-payment-rpc = { version = "36.0.0" }
pallet-transaction-payment-rpc-runtime-api = { version = "34.0.0", default-features = false }
pallet-treasury = { version = "33.0.0", default-features = false }
pallet-utility = { version = "34.0.0", default-features = false }
sc-basic-authorship = { version = "0.40.0" }
sc-chain-spec = "33.0.0"
sc-cli = { version = "0.42.0" }
sc-client-api = { version = "34.0.0" }
sc-consensus = { version = "0.39.1" }
sc-consensus-aura = { version = "0.40.0" }
sc-consensus-grandpa = { version = "0.25.0" }
sc-executor = { version = "0.38.0" }
sc-keystore = { version = "31.0.0" }
sc-network = { version = "0.40.0" }
sc-offchain = { version = "35.0.0" }
sc-rpc = "35.0.0"
sc-rpc-api = "0.39.0"
sc-service = { version = "0.41.0" }
sc-telemetry = { version = "20.0.0" }
sc-transaction-pool = { version = "34.0.0" }
sc-transaction-pool-api = { version = "34.0.0" }
sp-api = { version = "32.0.0", default-features = false }
sp-application-crypto = { version = "36.0.0", default-features = false }
sp-arithmetic = { version = "26.0.0", default-features = false }
sp-block-builder = { version = "32.0.0", default-features = false }
sp-blockchain = "34.0.0"
sp-consensus = { version = "0.38.0" }
sp-consensus-aura = { version = "0.38.0", default-features = false }
sp-consensus-grandpa = { version = "19.0.0" }
sp-core = { version = "33.0.1", default-features = false }
sp-genesis-builder = { version = "0.13.0", default-features = false }
sp-inherents = { version = "32.0.0", default-features = false }
sp-io = { version = "36.0.0", default-features = false }
sp-keyring = "37.0.0"
sp-keystore = "0.39.0"
sp-offchain = { version = "32.0.0", default-features = false }
sp-rpc = "31.0.0"
sp-runtime = { version = "37.0.0", default-features = false }
sp-session = { version = "33.0.0", default-features = false }
sp-staking = { version = "32.0.0", default-features = false }
sp-std = { version = "14.0.0", default-features = false }
sp-storage = { version = "21.0.0", default-features = false }
sp-timestamp = { version = "32.0.0" }
sp-transaction-pool = { version = "32.0.0", default-features = false }
sp-version = { version = "35.0.0", default-features = false }
substrate-frame-rpc-system = { version = "34.0.0" }

substrate-wasm-builder = "19.0.0"
substrate-wasm-builder = "22.0.0"
substrate-build-script-utils = "11.0.0"

substrate-api-client = { version = "0.17.0", features = ["jsonrpsee-client"] }
Expand All @@ -125,11 +125,11 @@ substrate-client-keystore = { version = "0.10.0" }
[patch.crates-io]
## api client
# todo: temporary patch until ^0.17.1 is released
ac-compose-macros = { git = "https://github.com/brenzi/substrate-api-client.git", branch = "crates-io-v0.17.0-patch-for-stable" }
ac-node-api = { git = "https://github.com/brenzi/substrate-api-client.git", branch = "crates-io-v0.17.0-patch-for-stable" }
ac-primitives = { git = "https://github.com/brenzi/substrate-api-client.git", branch = "crates-io-v0.17.0-patch-for-stable" }
substrate-api-client = { git = "https://github.com/brenzi/substrate-api-client.git", branch = "crates-io-v0.17.0-patch-for-stable" }
substrate-client-keystore = { git = "https://github.com/brenzi/substrate-api-client.git", branch = "crates-io-v0.17.0-patch-for-stable" }
ac-compose-macros = { git = "https://github.com/brenzi/substrate-api-client.git", branch = "crates-io-v0.17.0-patch-for-stable-sdk-1.12" }
ac-node-api = { git = "https://github.com/brenzi/substrate-api-client.git", branch = "crates-io-v0.17.0-patch-for-stable-sdk-1.12" }
ac-primitives = { git = "https://github.com/brenzi/substrate-api-client.git", branch = "crates-io-v0.17.0-patch-for-stable-sdk-1.12" }
substrate-api-client = { git = "https://github.com/brenzi/substrate-api-client.git", branch = "crates-io-v0.17.0-patch-for-stable-sdk-1.12" }
substrate-client-keystore = { git = "https://github.com/brenzi/substrate-api-client.git", branch = "crates-io-v0.17.0-patch-for-stable-sdk-1.12" }
#ac-node-api = { path = "../../substrate-api-client/node-api" }
#ac-primitives = { path = "../../substrate-api-client/primitives" }
#substrate-api-client = { path = "../../substrate-api-client" }
Expand Down
2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "encointer-client-notee"
authors = ["encointer.org <[email protected]>"]
edition = "2021"
#keep with node version. major, minor and patch
version = "1.8.3"
version = "1.12.0"

[dependencies]
# todo migrate to clap >=3 https://github.com/encointer/encointer-node/issues/107
Expand Down
22 changes: 21 additions & 1 deletion client/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# encointer CLI client

Interact with the encointer chain from the command line

Includes

* keystore (incompatible with polkadot js app json)
* basic balance transfer
* all encointer-specific calls

## examples

```
> encointer-client new_account
> encointer-client 127.0.0.1 transfer 5GpuFm6t1AU9xpTAnQnHXakTGA9rSHz8xNkEvx7RVQz2BVpd 5FkGDttiYa9ZoDAuNxzwEdLzkgt6ngWykSBhobGvoFUcUo8B 12345
Expand All @@ -22,40 +25,47 @@ Find a full ceremony cycle demo [here](./bootstrap_demo_community.py)
# run a local bot community benchmark

start encointer blockchain in dev mode

```bash
./target/release/encointer-node-notee --tmp --dev --enable-offchain-indexing true -lencointer=debug
```

start faucet service

```bash
cd client
./faucet.py
```

initialize bot community

```bash
cd client
./bot-community.py init
```

start phase controller service (fast forwards phase after N idle blocks)

```bash
cd client
./phase.py
```

listen to chain events for debugging (i.e. see failed extrinsics)

```bash
RUST_LOG=encointer_client_notee=info ./target/release/encointer-client-notee listen
```

execute the current phase (without advancing to the next phase)

```bash
cd client
./bot-community.py execute-current-phase
```

benchmark bot community

```bash
cd client
./bot-community.py benchmark
Expand Down Expand Up @@ -84,17 +94,22 @@ ipfs daemon
In IPFS, the community assets and data of businesses and offerings are stored.

You can cat/get the data stored in ipfs locally:

```
ipfs cat <CONTENT_IDENTIFIER>
```

Or if it was stored remotely (on Infura):

```
curl -X POST "https://ipfs.infura.io:5001/api/v0/cat?arg=<CONTENT_IDENTIFIER>"
```

# run bot-community against parachain

The same client can be used against an encointer parachain. Please start the parachain with polkadot-launch from the encointer-parachain repo:
The same client can be used against an encointer parachain. Please start the parachain with polkadot-launch from the
encointer-parachain repo:

```
node ../polkadot-launch/dist/cli.js polkadot-launch/launch-kusama-local-with-encointer.json
```
Expand All @@ -113,26 +128,31 @@ svgcleaner community_icon.svg community_icon.svg
```

using infura:

```
ipfs-upload-client --id <your infura id> --secret <your infura secret> --pin leu.rococo
```

using your own ipfs server

```
ipfs add -rw --pin leu.rococo
```

test if you can fetch the cid through the encointer gateway which will be used by the app

```
wget http://ipfs.encointer.org:8080/api/v0/object/get?arg=QmXydp7gdTGwxkCn24vEtvtSXbR7wSAGBDLQpc8buF6T92/community_icon.svg
```

it may take a while to sync from the server you used for uploading and pinning

## create you community spec file

insert your asset ipfs cid from above

create a proposal:

```
RUST_LOG=info ../target/release/encointer-client-notee -u wss://rococo.api.encointer.org -p 443 new-community test-data/leu.rococo.json
```
Loading

0 comments on commit 6b9acc9

Please sign in to comment.