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

Upgrade/polkadot v1.0 #218

Merged
merged 10 commits into from
Sep 9, 2023
55 changes: 55 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ frame-system-rpc-runtime-api = { path = "pallets/system/rpc/runtime-api" }
frame-system-benchmarking = { path = "pallets/system/benchmarking" }

# DA Primitives
# TODO: Once the companion PR 'substrate/upgrade-v1.0.0' is merged, change reference to tag
avail-core = { version = "0.5", git="https://github.com/availproject/avail-core", branch = "substrate/upgrade-v1.0.0" }
kate = { version = "0.8", git="https://github.com/availproject/avail-core", branch = "substrate/upgrade-v1.0.0" }
kate-recovery = { version = "0.9", git="https://github.com/availproject/avail-core", branch = "substrate/upgrade-v1.0.0" }
Expand Down Expand Up @@ -125,6 +126,8 @@ pallet-preimage = { git = "https://github.com/paritytech/substrate.git", branch
pallet-nomination-pools = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }


## RPCs
sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Since we have block size limits, runtime upgrade is a three step process. Prefer
For development purposes, its possible to use sudo calls with unchecked weight to increase block size limits and upload new runtime. In that case, steps are:

1. Use `sudo/sudoCall` to invoke `dataAvailability/submit_block_length_proposal` with increased block limits (eg. 512 rows x 256 columns)
2. Use `sudo/sudoUncheckedWeight(call, weight)` with 0 weight to invoke `system/set_code` and upload `da_runtime.compact.wasm`
2. Use `sudo/sudoUncheckedWeight(call, weight)` with 0 weight to invoke `system/set_code` and upload `da_runtime.compact.compressed.wasm`
3. Use `sudo/sudoCall` to invoke `dataAvailability/submit_block_length_proposal` and revert block limits to initial setting

### Verify upgrade
Expand Down
2 changes: 2 additions & 0 deletions avail-subxt/build_api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ subxt codegen --version 14 \
--derive-for-type avail_core::AppId=derive_more::From \
--url http://localhost:9944 \
| sed -En "s/pub struct KateCommitment/#\[serde\(rename_all = \"camelCase\"\)\] \0/p" \
| sed -En "s/pub struct HeaderExtension/#\[serde\(rename_all = \"camelCase\"\)\] \0/p" \
| sed -En "s/pub struct DataLookupItem/#\[serde\(rename_all = \"camelCase\"\)\] \0/p" \
| sed -E '1i \#\[allow(clippy::all)]' \
| rustfmt --edition=2021 --emit=stdout > src/api_dev.rs
echo "🎁 Avail-SubXt API generated in 'src/api_dev.rs'"
Loading