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

omni-node: add metadata checks for runtime/parachain compatibility #6450

Merged
merged 71 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
9cd1a7c
(wip) cumulus/omninode-lib: parachain system check
iulianbarbu Oct 5, 2024
0053b5a
polish a bit the pallet existance check
iulianbarbu Oct 23, 2024
f0055ea
break line length
iulianbarbu Oct 24, 2024
8b99816
adjust message length
iulianbarbu Oct 24, 2024
350985d
wip: testing why metadata decoding doesn't work
iulianbarbu Oct 29, 2024
40141d1
fix runtime metadata decoding
iulianbarbu Nov 11, 2024
0631349
remove left over chain spec
iulianbarbu Nov 12, 2024
00757ef
merge with master
iulianbarbu Nov 12, 2024
5cbcb26
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 14, 2024
149defd
made small adjustments with comments
iulianbarbu Nov 14, 2024
1f8128a
check frame-metadata storage block number
iulianbarbu Nov 15, 2024
bbe6e42
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 15, 2024
f869f32
added tests
iulianbarbu Nov 17, 2024
36861c0
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 17, 2024
6740b97
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 18, 2024
fe0887c
add docs for runtime conventions
iulianbarbu Nov 18, 2024
337ac48
add prdoc & remove leftover dir
iulianbarbu Nov 18, 2024
2d40797
remove decode feature
iulianbarbu Nov 18, 2024
5849e12
fix some weird Cargo.toml changes
iulianbarbu Nov 18, 2024
3dc55ad
fix compilation
iulianbarbu Nov 19, 2024
5583014
some more fixes
iulianbarbu Nov 19, 2024
8945e9d
fix linting
iulianbarbu Nov 19, 2024
cc0b3d1
fix typo
iulianbarbu Nov 19, 2024
c30917d
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 19, 2024
18aa6c7
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 27, 2024
993d264
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 27, 2024
6e747c1
udpate Cargo.lock
iulianbarbu Nov 27, 2024
f3a779f
revert litep2p version
iulianbarbu Nov 27, 2024
5f969cd
fix Cargo.lock
iulianbarbu Nov 27, 2024
08576d5
Merge branch 'master' of github.com:paritytech/polkadot-sdk into ib-o…
iulianbarbu Nov 28, 2024
3f2cef3
revert Cargo.toml
iulianbarbu Nov 28, 2024
ab564ba
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 28, 2024
58790cc
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 29, 2024
ba0096a
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 29, 2024
c5a6d09
revert to master Cargo.lock
iulianbarbu Nov 29, 2024
b657f81
corrected doc link
iulianbarbu Nov 29, 2024
fcfa988
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Nov 30, 2024
8df94e5
update prdoc
iulianbarbu Nov 30, 2024
8c2c693
check metadata earlier
iulianbarbu Dec 4, 2024
ea95f47
update benchmarking-cli
iulianbarbu Dec 4, 2024
ccd8187
fixed scrambled code
iulianbarbu Dec 4, 2024
a5c71ef
style fixes
iulianbarbu Dec 4, 2024
55d84d1
add sp-io dev dep
iulianbarbu Dec 5, 2024
4523b1c
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Dec 5, 2024
384bc82
updated Cargo.toml
iulianbarbu Dec 5, 2024
ce713f9
fix umbrella
iulianbarbu Dec 5, 2024
7e97c7a
update cargo.lock
iulianbarbu Dec 5, 2024
3581f46
more style fixes
iulianbarbu Dec 5, 2024
0c5f785
redo import
iulianbarbu Dec 5, 2024
11c39dd
taplo format
iulianbarbu Dec 5, 2024
e064430
umbrella fixes
iulianbarbu Dec 5, 2024
c858bfe
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Dec 5, 2024
b425b6c
more umbrella Cargo.toml fmt
iulianbarbu Dec 5, 2024
08e63bd
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Dec 5, 2024
ec9b04b
Update cumulus/polkadot-omni-node/lib/src/common/runtime.rs
iulianbarbu Dec 5, 2024
0ed4f59
Update cumulus/polkadot-omni-node/lib/src/common/runtime.rs
iulianbarbu Dec 5, 2024
9279e6e
add new crate to prdoc
iulianbarbu Dec 6, 2024
cf29ed2
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Dec 6, 2024
0ba6ecb
fixes from seb & michal reviews
iulianbarbu Dec 10, 2024
5e1ef1e
update prdoc
iulianbarbu Dec 10, 2024
1aa4d3d
rephrased public do
iulianbarbu Dec 10, 2024
c6e9f8c
remove redundant dependency
iulianbarbu Dec 11, 2024
0261c3b
avoid exposing APIs around metadata inspection for now
iulianbarbu Dec 11, 2024
1cb5361
Update docs/sdk/src/reference_docs/omni_node.rs
iulianbarbu Dec 11, 2024
4d469da
Update docs/sdk/src/reference_docs/omni_node.rs
iulianbarbu Dec 11, 2024
6354748
this builds fine too
iulianbarbu Dec 11, 2024
16a43e5
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Dec 11, 2024
4fd9df5
updated prdoc
iulianbarbu Dec 11, 2024
2a7b404
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Dec 12, 2024
6ae6615
Merge branch 'master' into ib-omni-node-ps-check
iulianbarbu Dec 12, 2024
7deb995
change back formatting in Cargo.toml
iulianbarbu Dec 12, 2024
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
6 changes: 3 additions & 3 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion cumulus/polkadot-omni-node/lib/src/common/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub mod metadata {

/// Checks if pallet exists in runtime's metadata.
///
/// Metadata (as plain byte array) is decoded with `frame_metadata::Decode` and
/// Metadata (as plain byte array) is decoded with `sp_core::Decode` and
/// pallets existance is checked by looking for pallets with certain names.
pub fn pallet_exists<'a>(
mut metadata: &'a [u8],
Expand Down
7 changes: 7 additions & 0 deletions cumulus/polkadot-omni-node/lib/src/common/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ pub(crate) trait NodeSpec: BaseNodeSpec {

// Best effort check of parachain-system pallet by pallet name.
let best_block = client.chain_info().finalized_hash;
// The `Metadata::metadata()` API returns only metadata according
// to V14 schema. It would be great to return the latest stable
// version in the future. There is an alternative to pick the latest
// by going through `metadata_versions` and then pick the maximum
// with `metadata_at_version`, but that's more code for no real benefit.
// The following code is fine with whichever metadata version
// contains pallet information, includding their names.
iulianbarbu marked this conversation as resolved.
Show resolved Hide resolved
let metadata = client
.runtime_api()
.metadata(best_block)
Expand Down
Loading