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 to polkadot-v1.0 #195

Merged
merged 65 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
9286cf9
Updated rust toolchain
ToufeeqP Aug 3, 2023
e1aa805
Incorporated upstream changes into frame-system
ToufeeqP Aug 3, 2023
64787cd
Updated packages to use latest support versions
ToufeeqP Aug 7, 2023
098b5d0
Removed uncles & deprecated GenesisConfig
ToufeeqP Aug 7, 2023
dc152df
wip: weights v2 & fixed system pallet tests
ToufeeqP Aug 7, 2023
91f9701
Updated mocks with new frame-system configs
ToufeeqP Aug 8, 2023
8326e83
wip: Added ExtendedBlock with frame & da headers
ToufeeqP Aug 9, 2023
f056800
Updated weights to v2
ToufeeqP Aug 9, 2023
f6b286d
Updated da control mocks to fix tests
ToufeeqP Aug 9, 2023
1019bdf
Updated nomad-updater-manager mocks to fix tests
ToufeeqP Aug 9, 2023
2268485
Updated nomad-home mocks
ToufeeqP Aug 9, 2023
2233d60
Fixed system benchmarkings
ToufeeqP Aug 9, 2023
829b666
fmt & refactor
ToufeeqP Aug 9, 2023
ebca3a7
Added frame-executive as local dep to patch
ToufeeqP Aug 9, 2023
87c5245
fmt fix
ToufeeqP Aug 10, 2023
b7ecdcc
Updated pallet configs
ToufeeqP Aug 11, 2023
cbc7220
Added code comment for rust bug
ToufeeqP Aug 16, 2023
20e6a72
commented nomad-da-bridge tests
ToufeeqP Aug 16, 2023
04925d0
Removed unintended std feature gate on imports
ToufeeqP Aug 17, 2023
968fd27
Updated runtime configs
ToufeeqP Aug 17, 2023
0d99a72
pallets: implement for in
ToufeeqP Aug 21, 2023
9e555bc
pallets: implement `Default` for `GenesisConfig` in `no_std`
ToufeeqP Aug 21, 2023
4dd02a4
Merge branch 'toufeeq/polkadot-v1.0' of https://github.com/availproje…
ToufeeqP Aug 21, 2023
096c487
Added missing configs & functions to runtime
ToufeeqP Aug 22, 2023
3c4f702
Temp: removed da-bridge from runtime
ToufeeqP Aug 22, 2023
23c42cc
Fixed runtime tests
ToufeeqP Aug 22, 2023
b2b64bf
Fixed kate-rpc's
ToufeeqP Aug 22, 2023
8142d01
Fixed compile errors of node service
ToufeeqP Aug 23, 2023
c349071
Merge branch 'develop' into toufeeq/polkadot-v1.0
ToufeeqP Aug 23, 2023
c3f19df
Updated kate-rpc to use default HeaderExtension
ToufeeqP Aug 23, 2023
dacf532
Added header_builder hosted function back
ToufeeqP Aug 23, 2023
aa4fa1b
clippy fixes
ToufeeqP Aug 23, 2023
efc478b
Temporarily removed frame-executive tests
ToufeeqP Aug 23, 2023
d77a7ad
Fixed frame-system try-runtime feature
ToufeeqP Aug 24, 2023
c902fc1
Fixed various features of the workspace
ToufeeqP Aug 24, 2023
9c27cdd
Merge branch 'develop' into toufeeq/polkadot-v1.0
ToufeeqP Aug 25, 2023
d5c9b94
refactoring
ToufeeqP Aug 30, 2023
738b113
Merge branch 'develop' into toufeeq/polkadot-v1.0
ToufeeqP Aug 30, 2023
035a170
Moved (de)serialization of BlockLength to no_std
ToufeeqP Aug 30, 2023
85f54c5
Updated beefy-merkle-tree name
ToufeeqP Aug 31, 2023
3a65b80
Changed Runtime from enum to struct everywhere
ToufeeqP Aug 31, 2023
3be7b05
Re-introduced da-bridge to runtime: welcome back:)
ToufeeqP Aug 31, 2023
4e7869a
Fixed da-bridge pallet benchmarks
ToufeeqP Aug 31, 2023
70ffdd4
Updated RPC port
ToufeeqP Sep 1, 2023
6f58179
Added troubleshooting to readme
ToufeeqP Sep 1, 2023
b8c4863
Commented block_length_proposal from CI e2e
ToufeeqP Sep 1, 2023
7a30978
Merge branch 'develop' into toufeeq/polkadot-v1.0
ToufeeqP Sep 1, 2023
0df2ba8
fmt: weights to v2
ToufeeqP Sep 1, 2023
811cb12
code cleaning & clippy fixes
ToufeeqP Sep 1, 2023
0a62a32
Updated multiplier to check for empty block
ToufeeqP Sep 4, 2023
238a344
Updated api_dev of avail-subxt
ToufeeqP Sep 4, 2023
62878d8
Enabled submit_block_length_proposal test
ToufeeqP Sep 4, 2023
d9e0bb4
bumped spec_version to 12
ToufeeqP Sep 6, 2023
09a681e
Added FRAME pallet migrations
ToufeeqP Sep 7, 2023
60852b4
apply review suggestions
ToufeeqP Sep 7, 2023
a1c246f
Upgrade/polkadot v1.0 (#218)
Leouarz Sep 9, 2023
268456e
merge upstream
Leouarz Sep 9, 2023
133ea82
merge upstream, generate subxt metadata, add block to scheduler migra…
Leouarz Sep 9, 2023
1924710
remove extra sneaky lines
Leouarz Sep 9, 2023
aed79d6
format
Leouarz Sep 9, 2023
dcdfdd7
Moved from nightly version to latest stable
markopoloparadox Sep 11, 2023
568a08f
fmt
ToufeeqP Sep 11, 2023
4fa37f6
Reverted formatting
markopoloparadox Sep 11, 2023
ca9af86
Changed the CI toolchain
markopoloparadox Sep 11, 2023
b0c8877
Merge from develop branch
markopoloparadox Sep 13, 2023
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
4,143 changes: 2,320 additions & 1,823 deletions Cargo.lock

Large diffs are not rendered by default.

234 changes: 115 additions & 119 deletions Cargo.toml

Large diffs are not rendered by default.

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: 1 addition & 1 deletion avail-subxt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sp-core = { version = "21", default-features = false }
codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full", "bit-vec"] }
serde = { version = "1", features = ["derive"] }
serde-hex = "0.1"
scale-info = { version = "2", features = ["bit-vec"] }
scale-info = { version = "2.5.0", features = ["bit-vec"] }


[dev-dependencies]
Expand Down
8 changes: 7 additions & 1 deletion avail-subxt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ Facilities to use `subxt` to connect with a Data-Availability Node.

Once node is updated, we can re-generate the `src/api_dev.rs` file using the following script:

**NOTE:** The script requires a running node at `localhost:9933`
**NOTE:** The script requires a running node at `localhost:9944`

```Bash
#> ./build_api.sh
```

### Troubleshooting

1. If you encounter any warnings or errors related to 'sed' while running the script on macOS, please ensure that you have [gnu-sed](https://medium.com/@bramblexu/install-gnu-sed-on-mac-os-and-set-it-as-default-7c17ef1b8f64) installed.

2. If you're not receiving any error messages, but the code generation process is not producing any output, consider running the individual code generation commands separately to check for any error messages.

# E2E Binary

This binary executes each example on a Data-Availability Node. It launches the node before run any
Expand Down
5 changes: 2 additions & 3 deletions avail-subxt/build_api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
echo "⛓ Installing SubXt..."
cargo install --git https://github.com/paritytech/subxt --tag v0.29.0 subxt-cli || true
echo "🔨 Generating Avail-SubXt API from localhost..."
# TODO: After updating Subxt, verify whether the 'sed' lines can be replaced with the '--attributes-for-type' option.
subxt codegen \
subxt codegen --version 14 \
markopoloparadox marked this conversation as resolved.
Show resolved Hide resolved
--derive Clone \
--derive PartialEq \
--derive Eq \
Expand Down Expand Up @@ -34,7 +33,7 @@ subxt codegen \
--derive-for-type avail_core::AppId=Default \
--derive-for-type avail_core::AppId=Copy \
--derive-for-type avail_core::AppId=derive_more::From \
--url http://localhost:9933 \
--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" \
Expand Down
2 changes: 1 addition & 1 deletion avail-subxt/examples/create_app_key.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use avail_subxt::{
api, api::runtime_types::sp_core::bounded::bounded_vec::BoundedVec, build_client,
api, api::runtime_types::bounded_collections::bounded_vec::BoundedVec, build_client,
primitives::AvailExtrinsicParams, AvailConfig, Opts,
};
use sp_core::crypto::Pair as _;
Expand Down
2 changes: 1 addition & 1 deletion avail-subxt/examples/da_bridge_actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::Result;
use avail_subxt::{
api::{
self, data_availability::calls::types::SubmitData,
runtime_types::sp_core::bounded::bounded_vec::BoundedVec,
runtime_types::bounded_collections::bounded_vec::BoundedVec,
},
build_client, Opts,
};
Expand Down
2 changes: 1 addition & 1 deletion avail-subxt/examples/max_block_submit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::time::Instant;

use anyhow::Result;
use avail_subxt::{
api::{self, runtime_types::sp_core::bounded::bounded_vec::BoundedVec},
api::{self, runtime_types::bounded_collections::bounded_vec::BoundedVec},
build_client,
primitives::AvailExtrinsicParams,
Opts,
Expand Down
4 changes: 2 additions & 2 deletions avail-subxt/examples/submit_block_length_proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use avail_subxt::{
self,
data_availability::events as DaEvent,
runtime_types::{
da_control::pallet::Call as DaCall, pallet_sudo::pallet::Call as SudoCall,
sp_core::bounded::bounded_vec::BoundedVec,
bounded_collections::bounded_vec::BoundedVec, da_control::pallet::Call as DaCall,
pallet_sudo::pallet::Call as SudoCall,
},
sudo::events as SudoEvent,
},
Expand Down
2 changes: 1 addition & 1 deletion avail-subxt/examples/submit_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use avail_subxt::{
api::{
self,
runtime_types::{
da_control::pallet::Call as DaCall, sp_core::bounded::bounded_vec::BoundedVec,
bounded_collections::bounded_vec::BoundedVec, da_control::pallet::Call as DaCall,
},
},
avail::AppUncheckedExtrinsic,
Expand Down
2 changes: 1 addition & 1 deletion avail-subxt/examples/submit_data_and_dispatch_data_root.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use avail_subxt::{
api::{self, runtime_types::sp_core::bounded::bounded_vec::BoundedVec},
api::{self, runtime_types::bounded_collections::bounded_vec::BoundedVec},
build_client,
primitives::AvailExtrinsicParams,
Opts,
Expand Down
2 changes: 1 addition & 1 deletion avail-subxt/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2022-11-15"
channel = "stable-2023-08-24"
components = ["rustfmt", "clippy", "llvm-tools-preview"]
profile = "minimal"
targets = ["wasm32-unknown-unknown"]
Loading
Loading