Using taplo, fixes all our broken and inconsistent toml formatting and
adds CI to keep them tidy.
If people want we can customise the format rules as described here
https://taplo.tamasfe.dev/configuration/formatter-options.html
@ggwpez, I suggest zepter is used only for checking features are
propagated, and leave formatting for taplo to avoid duplicate work and
conflicts.
TODO
- [x] Use `exclude = [...]` syntax in taplo file to ignore zombienet
tests instead of deleting the dir
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
Since the Polkadot and Kusama runtimes are no longer in the repo, the
relevant systems parachains runtimes also need to be removed. More
context [here](https://github.com/paritytech/polkadot-sdk/issues/603)
and [here](https://github.com/paritytech/polkadot-sdk/pull/1731).
Removes the following:
- `asset-hub-kusama` and `asset-hub-polkadot`
- `bridge-hub-kusama` and `bridge-hub-polkadot`
- `collectives-polkadot`
- `glutton-kusama`
Partially solves #603 and adds to #1731.
**Overview:**
Adding an extra malus variant focusing on disputing finalized blocks. It
will:
- wrap around approval-voting
- listen to `OverseerSignal::BlockFinalized` and when encountered start
a dispute for the `dispute_offset`th ancestor
- simply pass through all other messages and signals
Add zombienet tests testing various edgecases:
- disputing freshly finalized blocks
- disputing stale finalized blocks
- disputing eagerly pruned finalized blocks (might be separate PR)
**TODO:**
- [x] Register new malus variant
- [x] Simple pass through wrapper (approval-voting)
- [x] Simple network definition
- [x] Listen to block finalizations
- [x] Fetch ancestor hash
- [x] Fetch session index
- [x] Fetch candidate
- [x] Construct and send dispute message
- [x] zndsl test 1 checking that disputes on fresh finalizations resolve
valid Closes#1365
- [x] zndsl test 2 checking that disputes for too old finalized blocks
are not possible Closes#1364
- [ ] zndsl test 3 checking that disputes for candidates with eagerly
pruned relay parent state are handled correctly #1359 (deferred to a
separate PR)
- [x] Unit tests for new malus variant (testing cli etc)
- [x] Clean/streamline error handling
- [ ] ~~Ensure it tests properly on session boundaries~~
---------
Co-authored-by: Javier Viola <javier@parity.io>
Co-authored-by: Marcin S. <marcin@realemail.net>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>
Add `build-push-image-polkadot-debug` job to needs since we changed to
use the polkadot-debug image from the current branch for cumulus test
and we need to be sure that the image is ready. Fix issues like
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4481059
cc: @bkchr
Co-authored-by: Bastian Köcher <git@kchr.de>
Westend Asset Hub currently failing because the spec name is being
changed next runtime upgrade
(https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4413125).
This also fixes an idempotency issue with a staking pallet migration.
Similar issues will be caught automatically now that we've also updated
to try-runtime-cli v0.5.0 which checks for idempotency issues.
This also enables try-state checks running in the CI.
Westend Collectives migration CI check can be fixed once we have
https://github.com/paritytech/try-runtime-cli/pull/58, will open another
PR once it is available.
- [x] Remove deprecated `DmpQueue` pallet from Rococo Contracts, the
migration is complete
- [x] Fix Asset Hub Rococo storage versions
- [x] Add migration check CI for Asset Hub Rococo and Westend Bridge Hub
Add collectives and glutton parachain westend runtimes to prepare for
#1737.
The removal of system parachain native runtimes #1737 is blocked until
chainspecs and runtime APIs can be dealt with cleanly (merge of #1256
and follow up PRs).
In the meantime, these additions are ready to be merged to `master`, so
I have separated them out into this PR.
Also marked `bridge-hub-westend` as unimplemented in line with [this
issue](https://github.com/paritytech/parity-bridges-common/issues/2602).
TODO
- [x] add to `command-bot` benchmarks
- [x] add to `command-bot-scripts` benchmarks
- [x] generate weights
---------
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Muharem <ismailov.m.h@gmail.com>
Co-authored-by: command-bot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
PR prepares CI to the GitHub Merge Queues. All github actions that were
running in PR adjusted so they can run in the merge queues. Zombienet
jobs will do nothing during PRs but they will run during merge queues.
Jobs that will be skipped during PR:
- all zombienet jobs
- all publish docker jobs
Jobs that will be skipped during merge queue:
- check-labels
- check-prdoc
- pr-custom-review
- review trigger
cc https://github.com/paritytech/ci_cd/issues/862
**_PR migrated from https://github.com/paritytech/polkadot/pull/6782_**
This PR will upgrade the network protocol to version 3 -> VStaging which
will later be renamed to V3. This version introduces a new kind of
assignment certificate that will be used for tranche0 assignments.
Instead of issuing/importing one tranche0 assignment per candidate,
there will be just one certificate per relay chain block per validator.
However, we will not be sending out the new assignment certificates,
yet. So everything should work exactly as before. Once the majority of
the validators have been upgraded to the new protocol version we will
enable the new certificates (starting at a specific relay chain block)
with a new client update.
There are still a few things that need to be done:
- [x] Use bitfield instead of Vec<CandidateIndex>:
https://github.com/paritytech/polkadot/pull/6802
- [x] Fix existing approval-distribution and approval-voting tests
- [x] Fix bitfield-distribution and statement-distribution tests
- [x] Fix network bridge tests
- [x] Implement todos in the code
- [x] Add tests to cover new code
- [x] Update metrics
- [x] Remove the approval distribution aggression levels: TBD PR
- [x] Parachains DB migration
- [x] Test network protocol upgrade on Versi
- [x] Versi Load test
- [x] Add Zombienet test
- [x] Documentation updates
- [x] Fix for sending DistributeAssignment for each candidate claimed by
a v2 assignment (warning: Importing locally an already known assignment)
- [x] Fix AcceptedDuplicate
- [x] Fix DB migration so that we can still keep old data.
- [x] Final Versi burn in
---------
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
Co-authored-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
This pull request changes how `check-each-crate.py` is working. Instead
of passing the name of the crate via `-p`, we now jump into the
directory of the crate and call there `cargo check`. This should fix
issues like https://github.com/paritytech/polkadot-sdk/issues/2013 where
a crate is present twice in the `Cargo.lock`.
Besides that it also changes `core/Cargo.toml` to not always pull in
bandersnatch.
Adds a config file that allows to run `zepter` without any arguments in
the workspace to address all issues.
A secondary workflow for the CI is provided as `zepter run check`. Both
the formatting and linting are now in one check for efficiancy.
The latest version also detects some more things that `featalign` was
already showing.
Error message [in the
CI](https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3916205)
now looks like this:
```pre
...
crate 'test-parachains' (/Users/vados/Documents/work/polkadot-sdk/polkadot/parachain/test-parachains/Cargo.toml)
feature 'std'
must propagate to:
parity-scale-codec
Found 55 issues (run with --fix to fix).
Error: Command 'lint propagate-feature' failed with exit code 1
Polkadot-SDK uses the Zepter CLI to detect abnormalities in the feature configuration.
It looks like one more more checks failed; please check the console output. You can try to automatically address them by running `zepter`.
Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you.
For more information, see:
- https://github.com/paritytech/polkadot-sdk/issues/1831
- https://github.com/ggwpez/zepter
```
TODO:
- [x] Check that CI fails correctly
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
`cargo install` takes a long time in CI. We want to run it relatively
frequently without chewing through so much compute (see
https://github.com/paritytech/ci_cd/issues/771) so I added automatic
binary releases to the try-runtime-cli repo.
A small added benefit is we can use it in our existing
`on-runtime-upgrade` checks, which should cut their execution time by
about half.
This commit adds Rococo Asset Hub dedicated runtime so we can test new
features here, before merging them in Kusama Asset Hub.
Also adds one such feature: asset transfer over bridge (Rococo AssetHub
<> Wococo AssetHub)
- clone `asset-hub-kusama-runtime` -> `asset-hub-rococo-runtime`
- make it use Rococo primitives, names, assets, constants, etc
- add asset-transfer-over-bridge support to Rococo AssetHub <> Wococo
AssetHub
Fixes#1128
---------
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Makes SPs first class citizens along with the relay chains in the
context of our CI runtime upgrade checks.
## Code changes
- Sets missing current storage version in `uniques` pallet
- Adds multisig V1 migration to run where it was missing
- Removes executed migration whos pre/post hooks were failing from
collectives runtime
- Initializes storage versions for SP pallets added after genesis
- Originally I was going to wait for
https://github.com/paritytech/polkadot-sdk/pull/1297 to be merged so
this wouldn't need to be done manually, but it doesn't seem like it'll
be merged any time soon so I've decided to set them manually to unblock
this
## CI changes
- Removed dependency of `westend` runtime upgrades being complete prior
to other ones running. I assume it is supposed to cache the
`try-runtime` build for a performance benefit, but it seems it wasn't
working. Maybe someone from the CI team can look into this or explain
why it needs to be there?
- Adds check-runtime-migration jobs for Parity asset-hubs, bridge-hubs
and contract chains
- Updated VARIABLES to accomodate the `kusama-runtime` package being
renamed to `staging-kusama-runtime` in
https://github.com/paritytech/polkadot-sdk/pull/1241
- Added `EXTRA_ARGS` variable to `check-runtime-migration`, and set
`--no-weight-warnings` to the relay chain runtime upgrade checks (relay
chains don't have weight restrictions).
This pull request is removing the Kusama and Polkadot runtime crates. As
still some crates dependent on the runtime crates, this pull request is
doing some more changes.
- It removes the `hostperfcheck` CLI command. This CLI command could
compare the current node against the standard hardware by doing some
checks. Later we added the hardware benchmark feature to Substrate. This
hardware benchmark is running on every node startup and prints a warning
if the current node is too slow. This makes this CLI command a duplicate
that was also depending on the kusama runtime.
- The pull request is removing the emulated integration tests that were
requiring the Kusama or Polkadot runtime crates.
[`RococoGenesisExt`](https://github.com/paritytech/polkadot-sdk/blob/a414ea7515c9cdc81f1d12410e646afc148250e8/polkadot/node/service/src/chain_spec.rs#L152-L171)
is removed. It was the hack to allow overwriting
`EpochDurationInBlocks`. Removal of `RococGenesisExt` prevents from
manipulating the state to change the runtime constants.
Changes:
- Environment variable which controls the `time::EpochDurationInBlocks`
value was added: `ROCOCO_EPOCH_DURATION` (epoch duration will be set to
the value of env),
- `10,100,600` versions of rococo-runtime are built in CI and put into `polkadot-debug` docker image.
`rococo-runtime` building examples:
- to build runtime for `versi_staging_testnet` which had
EpochDurationInBlocks set to 100:
```
ROCOCO_EPOCH_DURATION=100 cargo build --features=fast-runtime -p
rococo-runtime
```
- to build runtime for `wococo_development`
```
ROCOCO_EPOCH_DURATION=10 cargo build --features=fast-runtime -p
rococo-runtime
```
- to build `versi-staging` chain spec:
```
ROCOCO_EPOCH_DURATION=100 cargo run -p polkadot --features=fast-runtime
-- build-spec --chain versi-staging --raw
```
- to build `wococo-dev` chain spec:
```
ROCOCO_EPOCH_DURATION=10 cargo run -p polkadot --features=fast-runtime
-- build-spec --chain wococo-dev --raw
```
It is also possible to change the epoch duration by replacing the `code` field in the chain spec with the hex dump of pre-built runtime wasm blob (because the epoch duration is hard-coded into wasm blob).
---------
Co-authored-by: Bastian Köcher <git@kchr.de>
- Async-backing related primitives are stable `primitives::v6`
- Async-backing API is now part of `api_version(7)`
- It's enabled on Rococo and Westend runtimes
---------
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
Add debug_assertions to WASM builds in the short-benchmarks CI job.
Disallow warnings, show a full backtrace and remove the WASM output
colour to improve information from this CI step in the event of a failure.
This is motivated by a
[case](https://github.com/paritytech/polkadot-sdk/pull/1676/commits/23d64918be3ca68413050383c5d8a73f63d451dd)
where a benchmark was misconfigured in master and failing to send
notifications, but passing CI. We don't want this to fail if the problem
happens in production, but ideally we'd know from the CI if it was
misconfigured and the messages weren't getting sent, as that could
(would?) affect the weights that the benchmark generates.
Enabling debug-assertions in WASM builds for the short-benchmarks would
catch "soft" failures like this in future.
- Updated ./docs/CONTRIBUTION.md to clarify how to use command bot and
update ui-tests locally or in PR
- Moved update-ui-tests.sh to a root of project to run them along for
substrate and polkadot together
---------
Co-authored-by: Mira Ressel <mira@parity.io>
This pull request removes the Polkadot and Kusama native runtime from
the polkadot node. This brings some implications with it:
There are no more kusama/polkadot-dev chain specs available. We will
need to write some tooling in the fellowship repo to provide them
easily.
The try-runtime job for polkadot & kusama is not available anymore as we
don't have the dev chain specs anymore.
Certain benchmarking commands will also not work until we migrate them
to use a runtime api.
Some crates in utils are still depending on the polkadot/kusama native
runtime that will also need to be fixed.
Port of: https://github.com/paritytech/polkadot/pull/7467
Add logic to check if the `BUILD_RELEASE_VERSION` tag is available in
docker registry, if not calculate the previous version to use as
secondary image. This fix the issue in test using the `secondary image`
and bumping the `NODE_VERSION`. (e.g #1495)
Changes:
- Disable runtime logging in benchmarks by building with a specific
profile
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
When `process_file` is run by `xargs`, it is executed inside a new shell
without access to variables defined outside of its scope.
This resulted in `script_content` being an empty string.
By exporting `script_content` prior to running `xargs` it is available
inside the new shells.