Sebastian Kunert
df818d2974
Move cumulus zombienet tests to aura & async backing ( #3568 )
...
Cumulus test-parachain node and test runtime were still using relay
chain consensus and 12s blocktimes. With async backing around the corner
on the major chains we should switch our tests too.
Also needed to nicely test the changes coming to collators in #3168 .
### Changes Overview
- Followed the [migration
guide](https://wiki.polkadot.network/docs/maintain-guides-async-backing )
for async backing for the cumulus-test-runtime
- Adjusted the cumulus-test-service to use the correct import-queue,
lookahead collator etc.
- The block validation function now uses the Aura Ext Executor so that
the seal of the block is validated
- Previous point requires that we seal block before calling into
`validate_block`, I introduced a helper function for that
- Test client adjusted to provide a slot to the relay chain proof and
the aura pre-digest
2024-04-09 16:53:30 +00:00
Liam Aharon
0ef37c7540
Fix Mermaid diagram rendering ( #3875 )
...
Closes https://github.com/paritytech/polkadot-sdk/issues/2977
The issue appears to stem from the `aquamarine` crate failing to render
diagrams in re-exported crates.
e.g. as raised
[here](https://github.com/paritytech/polkadot-sdk/issues/2977 ), diagrams
would render at `frame_support::traits::Hooks` but not the re-exported
doc `frame::traits::Hooks`, even if I added `aquamarine` as a `frame`
crate dependency.
To resolve this, I followed advice in
https://github.com/mersinvald/aquamarine/issues/20 to instead render
mermaid diagrams directly using JS by adding an `after-content.js`.
---
Also fixes compile warnings, enables `--all-features` and disallows
future warnings in CI.
---------
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Bastian Köcher <git@kchr.de >
2024-04-04 11:32:01 +00:00
Michal Kucharczyk
8ba7a6aba8
chain-spec: getting ready for native-runtime-free world (#1256 )
...
This PR prepares chains specs for _native-runtime-free_ world.
This PR has following changes:
- `substrate`:
- adds support for:
- JSON based `GenesisConfig` to `ChainSpec` allowing interaction with
runtime `GenesisBuilder` API.
- interacting with arbitrary runtime wasm blob to[
`chain-spec-builder`](https://github.com/paritytech/substrate/blob/3ef576eaeb3f42610e85daecc464961cf1295570/bin/utils/chain-spec-builder/src/lib.rs#L46 )
command line util,
- removes
[`code`](https://github.com/paritytech/substrate/blob/3ef576eaeb3f42610e85daecc464961cf1295570/frame/system/src/lib.rs#L660 )
from `system_pallet`
- adds `code` to the `ChainSpec`
- deprecates
[`ChainSpec::from_genesis`](https://github.com/paritytech/substrate/blob/3ef576eaeb3f42610e85daecc464961cf1295570/client/chain-spec/src/chain_spec.rs#L263 ),
but also changes the signature of this method extending it with `code`
argument.
[`ChainSpec::builder()`](https://github.com/paritytech/substrate/blob/20bee680ed098be7239cf7a6b804cd4de267983e/client/chain-spec/src/chain_spec.rs#L507 )
should be used instead.
- `polkadot`:
- all references to `RuntimeGenesisConfig` in `node/service` are
removed,
- all
`(kusama|polkadot|versi|rococo|wococo)_(staging|dev)_genesis_config`
functions now return the JSON patch for default runtime `GenesisConfig`,
- `ChainSpecBuilder` is used, `ChainSpec::from_genesis` is removed,
- `cumulus`:
- `ChainSpecBuilder` is used, `ChainSpec::from_genesis` is removed,
- _JSON_ patch configuration used instead of `RuntimeGenesisConfig
struct` in all chain specs.
---------
Co-authored-by: command-bot <>
Co-authored-by: Javier Viola <javier@parity.io >
Co-authored-by: Davide Galassi <davxy@datawok.net >
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com >
Co-authored-by: Kevin Krone <kevin@parity.io >
Co-authored-by: Bastian Köcher <git@kchr.de >
2023-11-05 15:19:23 +01:00
Michal Kucharczyk
1c0b437330
cumulus test runtime: remove GenesisExt ( #2147 )
...
This PR removes the `GenesisExt` wrapper over the `GenesisRuntimeConfig`
in `cumulus-test-service`. Initialization of values that were performed
by `GenesisExt::BuildStorage` was moved into `test_pallet` genesis.
---------
Co-authored-by: command-bot <>
Co-authored-by: Bastian Köcher <git@kchr.de >
2023-11-04 11:25:07 +02:00
Przemek Rzad
bfb241d7f3
Add missing licenses and tune the scanning workflow ( #1288 )
...
* Add missing Cumulus licenses
* Typo
* Add missing Substrate licenses
* Single job checking the sub-repos in steps
* Remove dates
* Remove dates
* Add missing (C)
* Update FRAME UI tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update more UI tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-08-30 15:45:49 +03:00
Michal Kucharczyk
94d2e4bc28
GenesisBuild<T,I> deprecated. BuildGenesisConfig added (#2757 )
...
* GenesisBuild<T,I> deprecated. BuildGenesisConfig added
* ".git/.scripts/commands/fmt/fmt.sh"
* integration-tests/emulated: ..Default::default added to genesis configs
* Cargo.lock updated
* Cargo.lock updated
* update lockfile for {"polkadot", "substrate"}
* clippy fixes
* clippy fixes
* clippy fixes again
---------
Co-authored-by: command-bot <>
2023-07-12 12:00:17 +00:00
Juan
d77a8826d1
Companion for Soft deprecate GenesisConfig ( #2636 )
...
* update genesis config
* rebase and fix errors
---------
Co-authored-by: parity-processbot <>
Co-authored-by: joepetrowski <joe@parity.io >
2023-06-16 11:05:45 +00:00
Sebastian Kunert
c047ec900a
Add benchmarks for for import/validation/production ( #2579 )
...
* Add benchmarks
* Remove endowed accounts
* Fix group
* Remove duplicate code
* Comments
* Use execute_block instead of block import
* Apply suggestions from code review
Co-authored-by: Anton <anton.kalyaev@gmail.com >
* Add missing comments
* Clippy
* Reorganize utils
* Remove unused import
* Switch to compiled again
* Apply suggestions from code review
Co-authored-by: Davide Galassi <davxy@datawok.net >
* Refactor local_testnet
* Do not write wasm blob to file
* Remove unnecessary block
* Add comment fixes
* fmt
* lock
---------
Co-authored-by: Anton <anton.kalyaev@gmail.com >
Co-authored-by: Davide Galassi <davxy@datawok.net >
2023-06-05 16:41:20 +02:00
Oliver Tale-Yazdi
299d25ba4b
Fix Clippy ( #2522 )
...
* Import Clippy config from Polkadot
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Auto clippy fix
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* No tabs in comments
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Prefer matches
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Dont drop references
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Trivial
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Refactor
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* add clippy to ci
* Clippy reborrow
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update client/pov-recovery/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* Update client/pov-recovery/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de >
* Partially revert 'Prefer matches'
Using matches! instead of match does give less compiler
checks as per review from @chevdor.
Partially reverts 8c0609677f3ea040f77fffd5be6facf7c3fec95c
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update .cargo/config.toml
Co-authored-by: Chevdor <chevdor@users.noreply.github.com >
* Revert revert 💩
Should be fine to use matches! macro since it is an explicit whitelist,
not wildcard matching.
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: alvicsam <alvicsam@gmail.com >
Co-authored-by: Bastian Köcher <git@kchr.de >
Co-authored-by: Chevdor <chevdor@users.noreply.github.com >
Co-authored-by: parity-processbot <>
2023-05-06 08:01:03 +02:00
Bastian Köcher
98f0e87daf
CI: Check that rustdocs can be generated ( #972 )
2022-02-09 13:24:42 +01:00
Adrian Catangiu
76fdc9d11a
Cumulus companion for substrate #10463 ( #870 )
...
* Companion for substrate #10463
* update lockfile for substrate
* update lockfile for polkadot
Co-authored-by: parity-processbot <>
2022-01-05 20:33:23 +00:00
Gavin Wood
0f10bb0aea
Companion for #10403 : Remove Default for AccountId ( #842 )
...
* author is Some
* Bump
* Lockfile
* Fixes
* Fixes
* Fixes
* Fixes
* Bump
* Update Cargo.lock
* bump substrate and polkadot
* fmt
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-12-14 09:07:51 +00:00
Bastian Köcher
f68c46ef2e
Test-runtime: Support changing the ParaId. ( #858 )
...
Adds support for changing the para id relative easily. While this is currently not needed, we may
need it at some later point.
2021-12-13 14:46:40 +01:00
Bastian Köcher
32a86d8ef4
Adds support for returning a custom header from validate_block ( #825 )
...
* Adds support for returning a custom header from `validate_block`
This adds support for returning a custom header from `validate_block`. Before this, we always
returned the header of the block that was validated (and still do it by default). However, after
this pr it is possible to set a custom header or better custom head data that will be returned
instead from `validate_block`. This can be for example when a chain wants to fork.
* FMT
2021-12-03 12:49:13 +01:00
Dan Shields
3284976a1b
Tweaks from template downstream review #80 ( #705 )
...
* tweaks from template downstream review #80
* more tweaks
* Update parachain-template/node/src/command.rs
* tweaks to template and other chainspecs
* fmt
* update more tweaks from downstream
* fix build
2021-11-11 19:20:39 +00:00
Bastian Köcher
ae12a80b35
Rework the runtime upgrade test ( #727 )
...
* Rework the runtime upgrade test
* Update test/service/tests/runtime_upgrade.rs
* Update test/service/tests/runtime_upgrade.rs
* Update Cargo.lock
* FMT
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-11-09 15:02:34 +01:00
Chevdor
6b20f7a2c5
ci: add quick-check with rustfmt ( #615 )
...
* ci: add quick-check with clippy and rustfmt
* chore: rustfmt round
* chore: set the same rustfmt config than substrate
* chore: fix formatting
* cI: remove clippy
* ci: switch to nightly for the checks
* ci: fix toolchains and naming
* ci: Limit the check to formatting
* chore: fix formatting
* Update .rustfmt.toml
* Update .rustfmt.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-09-16 16:57:52 +02:00
Guillaume Thiolliere
b36e4dbca5
update substrate/polkadot with construct_runtime changes ( #485 )
...
* update substrate/polkadot with construct_runtime changes
* fix update
* Fixes
* More fixes
* fix test, but might be wrong fix
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-06-10 17:50:09 +02:00
Bastian Köcher
acb2bc4f00
Do not include :code in the storage proof if not required ( #480 )
...
This is basically a hack that prevents the inclusion of `:code` in the
storage proof. A proper fix requires some changes to the trie crate to
not include nodes that aren't read.
2021-06-07 16:17:19 +02:00
Bastian Köcher
20e5dfd37a
Update Substrate & Polkadot ( #359 )
...
* Update Substrate & Polkadot
* Remove unused code
2021-03-09 15:11:43 +01:00
Cecile Tonglet
e53a932fe4
Add a command to purge the relay chain only ( #306 )
...
* Add a command to purge the relay chain only
* WIP
* Update rococo-parachains/src/cli.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Move cli stuff to its own crate
* Copyright dates
* Test not working for some reason...
* WIP
* Revert "WIP"
This reverts commit f97cd63742c7df822e4a6e52a29db5e0f56b7bfa.
* Fix test to use provided relay chain
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Add hint about which database could not be purged
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-03-03 13:40:22 +01:00
Bastian Köcher
119e0859b9
The great refactor ( #325 )
...
* Move pallets to pallets folder and rename them
* Move genesis file to service
* Rename primitives to primitives-core
* Delete cumulus-runtime
* Move stuff to client folder and rename
2021-02-10 13:07:21 +01:00
Joshy Orndorff
ed8fc4f4a3
remove borrowed box ( #272 )
2021-01-05 22:34:57 +01:00
Bastian Köcher
e5b4e8cae7
Wait for relay chain block import before validatiing a block announcement ( #227 )
...
* Start with something
* Whatever
* Update
* MOARE
* Make cumulus-network compile and tests work
* Update more and fixes
* More stuff
* More fixes
* Make collator build
* Make test almost work
* Remove contracts runtime
* More test work
* Make service compile
* Fix test-service
* Fix test client
* More fixes
* Fix collator test
* Fix network tests (again)
* Make everything compile, finally
* Fix tests
* Write test that should fail
* Add `WaitOnRelayChainBlock`
* Update git versions
* Make it all work
* Update logging
* Switch to provided method for pushing an extrinsic
* Try to debug CI
* Aaaa
* Only use Debug
* Updates
* Use native execution to hopefully make CI happy...
2020-11-23 00:21:02 +01:00
Cecile Tonglet
7b4ea8d8cb
Uniformize tests ( #220 )
...
* Initial commit
Forked at: 56753b7717
Parent branch: origin/master
* Copy runtime module from rococo
Forked at: 56753b7717
Parent branch: origin/master
* Also copy dependencies pallets and primitives
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* test-service
* Move integration test
* CLEANUP
Forked at: 56753b7717
Parent branch: origin/master
* Not sure what went wrong...
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* CLEANUP
Forked at: 56753b7717
Parent branch: origin/master
* fmt
* CLEANUP
Forked at: 56753b7717
Parent branch: origin/master
* CLEANUP
Forked at: 56753b7717
Parent branch: origin/master
* Remove pallet contracts (not used)
* Remove pallet parachain-info and token-dealer (not used)
* Sort dependencies alphabetically
* CLEANUP
Forked at: 56753b7717
Parent branch: origin/master
* CumulusTestNode for testing
* Speed up block generation
* Fix improper shutdown
* rustfmt
* runtime: replace const by storage
* Fix for previous commit
* Remove some generics
* Move generate_genesis_state to cumulus-primitives
* fmt
* Remove message_example
* fixup! Remove message_example
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* Half the solution to previous commit :(
* Revert "Fix for previous commit"
This reverts commit 60010bab6797487093ac8c790b3a536f7ca0895b.
* Revert "runtime: replace const by storage"
This reverts commit c64b3a46f0325a98922015e0cbf3570e2e431774.
Not working for some reason...
* Use helper
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* Remove test-primitives
* Revert "Half the solution to previous commit :("
This reverts commit 9a8f89f9f06252198e6405057043c6b313f1aea4.
* Revert "Revert "Half the solution to previous commit :(""
This reverts commit 6a93f0f09d74ccdc3738dd78a777c483427c03ce.
* Test with some extra extrinsics
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* CLEANUP
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* WIP
Forked at: 56753b7717
Parent branch: origin/master
* CLEANUP
Forked at: 56753b7717
Parent branch: origin/master
* Remove message broker
2020-10-07 08:51:01 +00:00