Commit Graph

14298 Commits

Author SHA1 Message Date
eskimor 23a2b7b5b3 Fix wrong ref counting (#1358)
* Fix wrong ref counting

in case of multiple inserts at same height.

* More warn

---------

Co-authored-by: eskimor <eskimor@no-such-url.com>
2023-09-01 21:56:09 +03:00
s0me0ne-unkn0wn a2b6470607 Use cached session index to obtain executor params (#1190)
* Import changes from archieved repo

* Revert erroneous changes

* Fix more tests

* Resolve discussions

* Fix MORE tests

* approval-voting: launch_approval better interface (#1355)

---------

Co-authored-by: Javier Viola <javier@parity.io>
Co-authored-by: ordian <noreply@reusable.software>
Co-authored-by: ordian <write@reusable.software>
2023-09-01 21:07:32 +03:00
Sacha Lansky ccdf636c49 fix typos (#1339) 2023-09-01 17:54:03 +02:00
Davide Galassi 0d6ef3e6c2 Use bandersnatch-vrfs with locked dependencies ref (#1342)
* Use bandersnatch-vrfs with locked dependencies ref

* Update ark-scale to 0.0.10

* Bump ark-substrate crates version
2023-09-01 15:58:46 +02:00
dependabot[bot] a846813493 Bump bs58 from 0.4.0 to 0.5.0 (#1293)
Bumps [bs58](https://github.com/Nullus157/bs58-rs) from 0.4.0 to 0.5.0.
- [Changelog](https://github.com/Nullus157/bs58-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Nullus157/bs58-rs/compare/0.4.0...0.5.0)

---
updated-dependencies:
- dependency-name: bs58
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 16:44:14 +03:00
Cyrill Leutwiler 24c41f10bb Contracts: seal0::balance should return the free balance (#1254) 2023-09-01 15:33:15 +03:00
Andrei Sandu e165eacd58 Logs: add extra debug log for negative rep changes (#1205)
* refactor and more debug

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* review

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* fix

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* 🤦

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
2023-09-01 14:55:23 +03:00
Branislav Kontur 15cb0af58c Added short-benchmarks for cumulus (#1183)
* Added short-benchmarks for cumulus

* Added `--bin` flag for short-benchmarks

* fix dependency for short-benchmark-cumulus

* Fixed benchmark with new XCM::V3 `MAX_INSTRUCTIONS_TO_DECODE`

* Fixed benchmark for bridge messages pallets

---------

Co-authored-by: alvicsam <alvicsam@gmail.com>
Co-authored-by: Javier Viola <javier@parity.io>
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
2023-09-01 14:27:18 +03:00
Ignacio Palacios 241601b1c1 [xcm-emulator] Improve hygiene and clean up (#1301)
* improve hygiene & clean up

* improve hygiene & clean up - xcm-emulator

* improve hygiene & clean up - common

* improve hygiene & clean up - tests

* improve hygiene & clean up - tests 2

* last hygiene bits

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: command-bot <>
2023-09-01 12:44:06 +02:00
dependabot[bot] 12443589e3 Bump the known_good_semver group with 1 update (#1347)
Bumps the known_good_semver group with 1 update: [clap](https://github.com/clap-rs/clap).

- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.1...v4.4.2)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: known_good_semver
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 03:22:35 -07:00
gupnik 16fe5be02f Renames API (#1186)
Co-authored-by: Javier Viola <javier@parity.io>
2023-09-01 12:16:07 +05:30
Bastian Köcher a33d7922f8 Rename polkadot-parachain to polkadot-parachain-primitives (#1334)
* Rename `polkadot-parachain` to `polkadot-parachain-primitives`

While doing this it also fixes some last `rustdoc` issues and fixes
another Cargo warning related to `pallet-paged-list`.

* Fix compilation

* ".git/.scripts/commands/fmt/fmt.sh"

* Fix XCM docs

---------

Co-authored-by: command-bot <>
2023-08-31 23:53:29 +02:00
Kevin Krone ea5792508e Add README to project root (#1253)
* Added root README.md draft

* Modified Contribution section to reflect unified guidelines

* Update README.md

Co-authored-by: Squirrel <gilescope@gmail.com>

* Expand Substrate description

* Added Badges and Upstream deps

* Fixed badge links

* Fixed CONTRIBUTING.md links, added security and resources section to root README.md

* Moved runtimes link to Polkadot section

---------

Co-authored-by: Squirrel <gilescope@gmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-08-31 20:45:14 +03:00
Francisco Aguirre 995d81fd84 Add environmental variable to track decoded instructions (#1320)
* Add environmental variable to track decoded instructions

* Fix doc tests

* Fix manifest formatting

* ".git/.scripts/commands/fmt/fmt.sh"

* Add one more test

* Add SetAppendix in test

---------

Co-authored-by: command-bot <>
2023-08-31 13:42:32 -03:00
Lulu aedd280874 Fix polkadot-node-core-pvf-prepare-worker build with jemalloc (#1315)
* Fix polkadot-node-core-pvf-prepare-worker build with jemalloc

The jemalloc feature on polkadot-node-core-pvf-prepare-worker depended
on some feature gated code in polkadot-node-core-pvf-common but there
way no way to enable this feature gate.

This commit adds the feature and makes prepare-worker enable it.

* More jemalloc-allocator fixes

* Fix jemalloc-allocator feature dep

* Run `zepter format features`

---------

Co-authored-by: Marcin S <marcin@realemail.net>
2023-08-31 17:13:09 +02:00
Davide Galassi f1f793718a Sassafras primitives (#1249)
* Introduce Sassafras primitives

* Keystore workaround

* Fix doc

* Use  in keystore

* Improve bandersnatch vrf docs

* Apply review suggestions

* Update README

* Docs improvement

* Docs fix
2023-08-31 13:38:11 +02:00
Juan bdbe982970 Restructure dispatch macro related exports (#1162)
* restructure dispatch macro related exports

* moved Dispatchable to lib.rs

* fix .gitignore final newline

* ".git/.scripts/commands/fmt/fmt.sh"

* fix rustdocs

* wip

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Co-authored-by: command-bot <>
Co-authored-by: ordian <write@reusable.software>
2023-08-31 14:08:44 +03:00
Alin Dima d6af073aa5 backing: move the min votes threshold to the runtime (#1200)
* move min backing votes const to runtime

also cache it per-session in the backing subsystem

Signed-off-by: alindima <alin@parity.io>

* add runtime migration

* introduce api versioning for min_backing votes

also enable it for rococo/versi for testing

* also add min_backing_votes runtime calls to statement-distribution

this dependency has been recently introduced by async backing

* remove explicit version runtime API call

this is not needed, as the RuntimeAPISubsystem already takes care
of versioning and will return NotSupported if the version is not
right.

* address review comments

- parametrise backing votes runtime API with session index
- remove RuntimeInfo usage in backing subsystem, as runtime API
caches the min backing votes by session index anyway.
- move the logic for adjusting the configured needed backing votes with the size of the backing group
to a primitives helper.
- move the legacy min backing votes value to a primitives helper.
- mark JoinMultiple error as fatal, since the Canceled (non-multiple) counterpart is also fatal.
- make backing subsystem handle fatal errors for new leaves update.
- add HostConfiguration consistency check for zeroed backing votes threshold
- add cumulus accompanying change

* fix cumulus test compilation

* fix tests

* more small fixes

* fix merge

* bump runtime api version for westend and rollback version for rococo

---------

Signed-off-by: alindima <alin@parity.io>
Co-authored-by: Javier Viola <javier@parity.io>
2023-08-31 14:01:36 +03:00
dependabot[bot] f1845f725d Bump zstd from 0.11.2+zstd.1.5.2 to 0.12.4 (#1326)
Bumps [zstd](https://github.com/gyscos/zstd-rs) from 0.11.2+zstd.1.5.2 to 0.12.4.
- [Release notes](https://github.com/gyscos/zstd-rs/releases)
- [Commits](https://github.com/gyscos/zstd-rs/commits)

---
updated-dependencies:
- dependency-name: zstd
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-31 12:48:59 +02:00
Oliver Tale-Yazdi dfc0d1bc83 Remove substrate_test_utils::test (#1321)
* Directly use tokio::test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove old code

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Delete substrate-test-utils-test-crate

Also not needed anymore.

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: Bastian Köcher <git@kchr.de>
2023-08-31 12:48:39 +02:00
Ignacio Palacios 80a19bec6a remove disable-runtime-api (#1328) 2023-08-31 12:48:01 +02:00
Alexander Samusev aabed6757e [ci] add more jobs for pipeline cancel, cleanup (#1314) 2023-08-31 12:36:38 +03:00
Marcin S 7cef7cdfb0 PVF: Take back a stolen right (#1207) 2023-08-31 10:48:16 +02:00
Alexandru Gheorghe 5559b752b4 substrate: peer_store: log warn on disconnecting because of reputation (#1299)
* substrate: peer_store: log error on disconnecting because of reputation

Disconnecting and banning a peer because of negative reputation is
usually an indicative of one of two things:
1. We've got a bug that forces disconnects.
2. We've got malicious peers that try to attack us.

We both cases I don't think we should hide this behind a trace log
and we should log errors, so that things are easy to notice and
debug/mitigated.

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>

* Move from error to warn

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>

---------

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
2023-08-31 09:40:40 +03:00
Gavin Wood 109287f4ca Put GetWeight where it belongs (#1212)
* Put `GetWeight` where it belongs

* add GetWeight to v2

* Re-export unchanged trait

---------

Co-authored-by: Just van Stam <just.van.stam@gmail.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
2023-08-31 09:16:57 +03:00
Oliver Tale-Yazdi 36b4f2583e Fix CI (#1316)
* Fix deterministic WASM check

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix build-staking-miner

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove Kusama and Polkadot runtime-migration checks

Will be removed in https://github.com/paritytech/polkadot-sdk/pull/1304 anyway.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-08-30 21:55:41 +02:00
Ikko Eltociear Ashimine 5462409cc0 Fix typo in statement-store/README.md (#1317)
absense -> absence
2023-08-30 21:43:16 +02:00
Andrei Sandu 73915d3459 add missing feature (#1310)
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
2023-08-30 20:06:42 +02:00
Javier Viola af432f0fc3 fix chain-spec path for substrate tests (#1307)
* fix chain-spec path for substrate tests

* update chain-spec path for cumulus test
2023-08-30 14:38:03 -03:00
Lulu 43c0c09bcb Symlink chain-specs json files to crate where they are used (#1171)
When publishing crates, each crate becomes it's own tarball that can't
access files from other crates. So symlink the files to be crate local
and cargo will replace the symlinks with real files at publish time.

We can't just move all of them as it makes the package larger than the
max crates.io package size.

Co-authored-by: Javier Viola <javier@parity.io>
2023-08-30 18:04:21 +03:00
Andrei Sandu b46f07ff71 Fix polkadot zombienet tests (#1276)
* fix tests

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* ZOMBIENET_INTEGRATION_TEST_SECONDARY_IMAGE

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* deleted by mistake

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* remove LOCAL_DIR override

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Fix secondary image

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* fix get BUILD_RELEASE_VERSION in pipeline

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Co-authored-by: Javier Viola <javier@parity.io>
2023-08-30 17:58:37 +03:00
Lulu 31c79470a3 Rename squatted crates (#1241)
* Rename squatted crates

This commit adds the staging- prefix to squatted crates so we can go forward and publish them to crates.io.

Using the staging- prefix is a temp fix until we decide on replacement names.
https://forum.parity.io/t/renaming-squated-crates-in-substrate-polkadot-cumulus/1964/6

* Fix test after crate renames

* Update Lockfile
2023-08-30 17:57:49 +03:00
Sacha Lansky be7f1244c9 Fix links in contributing and PR template docs (#1300)
* add link to labels doc

* add absolute links in PR template

* Update docs/CONTRIBUTING.md
2023-08-30 16:08:47 +03: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
Oliver Tale-Yazdi 7768b77d53 Remove old UI test (#1289)
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
2023-08-30 11:32:34 +02:00
dependabot[bot] c5060a5d5a Bump the known_good_semver group with 2 updates (#1284)
Bumps the known_good_semver group with 2 updates: [serde](https://github.com/serde-rs/serde) and [clap](https://github.com/clap-rs/clap).


Updates `serde` from 1.0.186 to 1.0.188
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.186...v1.0.188)

Updates `clap` from 4.4.0 to 4.4.1
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.4.0...v4.4.1)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: known_good_semver
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: known_good_semver
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-30 10:54:15 +02:00
Bastian Köcher cbd745c846 Fix node-metrics test (#1287) 2023-08-30 09:48:29 +02:00
Alexander Samusev d81c8cbaa7 [ci] Fix buildah and reorder test-doc dag (#1275) 2023-08-30 09:37:13 +02:00
Liam Aharon 2f49252bcd Rename VersionedRuntimeUpgrade to VersionedMigration (#1187)
* rename VersionedRuntimeUpgrade to VersionedMigration

* doc lint

* rename test filename

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-08-30 07:28:03 +03:00
dependabot[bot] b4ee6f2aa9 Bump chrono from 0.4.26 to 0.4.27 (#1286)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.26 to 0.4.27.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.26...v0.4.27)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-30 11:20:35 +10:00
Bastian Köcher 844eda7626 pallet-scheduler: Send CallUnavailable event if the call isn't present (#1161)
The event was already send before, but it was done at the wrong
position. The pull request all changes the `execute_dispatch` signature
to highlight that there is only one error type.

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Javier Viola <javier@parity.io>
2023-08-29 22:42:54 +02:00
Lulu 1c7ef1f232 Set test crates to nopublish (#1240)
* Set test crates to nopublish

* Don't publish more crates

* Set even more crates to nopublish

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-08-29 21:40:33 +02:00
Maksym H ee78e3a2a6 fix licenses (#1267) 2023-08-29 21:32:24 +02:00
Oliver Tale-Yazdi ebf6e66b02 Revive Dependabot (#1264)
Closes https://github.com/paritytech/polkadot-sdk/issues/1174

Configures dependabot to run daily but group some dependencies
together that I assume to be sember abiding.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-08-29 21:30:18 +02:00
Bastian Köcher 9acb06717e Fix test-rustdoc (#1266)
* Fix `test-rustdoc`

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: command-bot <>
2023-08-29 21:23:38 +02:00
Nazar Mokrynskyi 430edd7535 Relax genesis config to not require Default impl (#1221)
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-08-29 20:36:45 +03:00
Alexandru Vasile 62f0a729cf chainSpec: Stabilize chainSpec methods to V1 (#1206)
* chainSpec: Stabilize chainSpec methods to V1

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* chainSpec/api: Remove unstable documentation

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: James Wilson <james@jsdw.me>
2023-08-29 18:49:16 +03:00
Javier Bullrich 6bb9ad4b1a PRCR - temporary disabled Audit rule (#1239)
@the-right-joyce has requested to disable the Audit rule until we can fix the problem that it always request reviewers (even if the user belongs to the `prevent-review-request` field.
2023-08-29 18:49:00 +03:00
Adrian Catangiu 562557a948 sc-consensus-beefy: reuse instead of recreate GossipEngine (#1262)
"sc-consensus-beefy: restart voter on pallet reset #14821" introduced
a mechanism to reinitialize the BEEFY worker on certain errors; but
re-creating the GossipEngine doesn't play well with
"Rework the event system of sc-network #14197".

So this PR slightly changes the re-initialization logic to reuse the original
GossipEngine and not recreate it.

Signed-off-by: Adrian Catangiu <adrian@parity.io>
2023-08-29 18:47:05 +03:00
Oliver Tale-Yazdi cd10c46146 Cleanup some files (#1166)
* Remove .cargo folders

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove rustfmt.toml

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Hide rustfmt.toml file

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Merge .gitignore files

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update commit hash after history-rewrite

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Try to hot-fix license scanner

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update .gitignore

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

* Undo changes to check-license

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: Chevdor <chevdor@users.noreply.github.com>
2023-08-29 18:35:36 +03:00