Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit df38788

Browse files
committed
Merge branch 'master' into master_statically_register_wasmtime_ffi
2 parents e853225 + 0e6cc56 commit df38788

File tree

123 files changed

+2819
-1040
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+2819
-1040
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ variables: &default-vars
4646
VAULT_AUTH_PATH: "gitlab-parity-io-jwt"
4747
VAULT_AUTH_ROLE: "cicd_gitlab_parity_${CI_PROJECT_NAME}"
4848
SIMNET_FEATURES_PATH: "simnet_tests/tests"
49+
PIPELINE_SCRIPTS_TAG: "v0.4"
4950

5051
default:
5152
cache: {}
@@ -606,6 +607,7 @@ cargo-check-macos:
606607
--substrate
607608
"$DEPENDENT_REPO"
608609
"$GITHUB_PR_TOKEN"
610+
"$CARGO_UPDATE_CRATES"
609611

610612
# Individual jobs are set up for each dependent project so that they can be ran in parallel.
611613
# Arguably we could generate a job for each companion in the PR's description using Gitlab's
@@ -615,11 +617,13 @@ check-dependent-polkadot:
615617
<<: *check-dependent-project
616618
variables:
617619
DEPENDENT_REPO: polkadot
620+
CARGO_UPDATE_CRATES: "sp-io"
618621

619622
check-dependent-cumulus:
620623
<<: *check-dependent-project
621624
variables:
622625
DEPENDENT_REPO: cumulus
626+
CARGO_UPDATE_CRATES: "sp-io polkadot-runtime-common"
623627

624628

625629
build-linux-substrate:

Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/node-template/pallets/template/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
2-
name = 'pallet-template'
2+
name = "pallet-template"
33
version = "3.0.0"
44
description = "FRAME pallet template for defining custom runtime logic."
5-
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
5+
authors = ["Substrate DevHub <https://github.com/substrate-developer-hub>"]
66
homepage = "https://substrate.io/"
7-
edition = '2018'
7+
edition = "2021"
88
license = "Unlicense"
99
publish = false
1010
repository = "https://github.com/substrate-developer-hub/substrate-node-template/"
@@ -27,14 +27,14 @@ sp-io = { default-features = false, version = "4.0.0-dev", path = "../../../../p
2727
sp-runtime = { default-features = false, version = "4.0.0-dev", path = "../../../../primitives/runtime" }
2828

2929
[features]
30-
default = ['std']
30+
default = ["std"]
3131
std = [
32-
'codec/std',
33-
'scale-info/std',
34-
'frame-support/std',
35-
'frame-system/std',
36-
'frame-benchmarking/std',
32+
"codec/std",
33+
"scale-info/std",
34+
"frame-support/std",
35+
"frame-system/std",
36+
"frame-benchmarking/std",
3737
]
3838

39-
runtime-benchmarks = ["frame-benchmarking"]
39+
runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
4040
try-runtime = ["frame-support/try-runtime"]

bin/node-template/runtime/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "node-template-runtime"
33
version = "3.0.0"
4-
description = 'A fresh FRAME-based Substrate runtime, ready for hacking.'
4+
description = "A fresh FRAME-based Substrate runtime, ready for hacking."
55
authors = ["Substrate DevHub <https://github.com/substrate-developer-hub>"]
66
homepage = "https://substrate.io/"
77
edition = "2021"
@@ -83,7 +83,7 @@ std = [
8383
"sp-version/std",
8484
]
8585
runtime-benchmarks = [
86-
"frame-benchmarking",
86+
"frame-benchmarking/runtime-benchmarks",
8787
"frame-support/runtime-benchmarks",
8888
"frame-system-benchmarking",
8989
"frame-system/runtime-benchmarks",

bin/node-template/runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ pub type Executive = frame_executive::Executive<
323323
Block,
324324
frame_system::ChainContext<Runtime>,
325325
Runtime,
326-
AllPallets,
326+
AllPalletsWithSystem,
327327
>;
328328

329329
impl_runtime_apis! {

bin/node/executor/tests/basic.rs

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,13 @@ fn full_native_block_import_works() {
378378
let events = vec![
379379
EventRecord {
380380
phase: Phase::ApplyExtrinsic(0),
381-
event: Event::System(frame_system::Event::ExtrinsicSuccess(DispatchInfo {
382-
weight: timestamp_weight,
383-
class: DispatchClass::Mandatory,
384-
..Default::default()
385-
})),
381+
event: Event::System(frame_system::Event::ExtrinsicSuccess {
382+
dispatch_info: DispatchInfo {
383+
weight: timestamp_weight,
384+
class: DispatchClass::Mandatory,
385+
..Default::default()
386+
},
387+
}),
386388
topics: vec![],
387389
},
388390
EventRecord {
@@ -412,15 +414,14 @@ fn full_native_block_import_works() {
412414
},
413415
EventRecord {
414416
phase: Phase::ApplyExtrinsic(1),
415-
event: Event::Treasury(pallet_treasury::Event::Deposit(fees * 8 / 10)),
417+
event: Event::Treasury(pallet_treasury::Event::Deposit { value: fees * 8 / 10 }),
416418
topics: vec![],
417419
},
418420
EventRecord {
419421
phase: Phase::ApplyExtrinsic(1),
420-
event: Event::System(frame_system::Event::ExtrinsicSuccess(DispatchInfo {
421-
weight: transfer_weight,
422-
..Default::default()
423-
})),
422+
event: Event::System(frame_system::Event::ExtrinsicSuccess {
423+
dispatch_info: DispatchInfo { weight: transfer_weight, ..Default::default() },
424+
}),
424425
topics: vec![],
425426
},
426427
];
@@ -448,11 +449,13 @@ fn full_native_block_import_works() {
448449
let events = vec![
449450
EventRecord {
450451
phase: Phase::ApplyExtrinsic(0),
451-
event: Event::System(frame_system::Event::ExtrinsicSuccess(DispatchInfo {
452-
weight: timestamp_weight,
453-
class: DispatchClass::Mandatory,
454-
..Default::default()
455-
})),
452+
event: Event::System(frame_system::Event::ExtrinsicSuccess {
453+
dispatch_info: DispatchInfo {
454+
weight: timestamp_weight,
455+
class: DispatchClass::Mandatory,
456+
..Default::default()
457+
},
458+
}),
456459
topics: vec![],
457460
},
458461
EventRecord {
@@ -482,15 +485,14 @@ fn full_native_block_import_works() {
482485
},
483486
EventRecord {
484487
phase: Phase::ApplyExtrinsic(1),
485-
event: Event::Treasury(pallet_treasury::Event::Deposit(fees * 8 / 10)),
488+
event: Event::Treasury(pallet_treasury::Event::Deposit { value: fees * 8 / 10 }),
486489
topics: vec![],
487490
},
488491
EventRecord {
489492
phase: Phase::ApplyExtrinsic(1),
490-
event: Event::System(frame_system::Event::ExtrinsicSuccess(DispatchInfo {
491-
weight: transfer_weight,
492-
..Default::default()
493-
})),
493+
event: Event::System(frame_system::Event::ExtrinsicSuccess {
494+
dispatch_info: DispatchInfo { weight: transfer_weight, ..Default::default() },
495+
}),
494496
topics: vec![],
495497
},
496498
EventRecord {
@@ -520,15 +522,14 @@ fn full_native_block_import_works() {
520522
},
521523
EventRecord {
522524
phase: Phase::ApplyExtrinsic(2),
523-
event: Event::Treasury(pallet_treasury::Event::Deposit(fees * 8 / 10)),
525+
event: Event::Treasury(pallet_treasury::Event::Deposit { value: fees * 8 / 10 }),
524526
topics: vec![],
525527
},
526528
EventRecord {
527529
phase: Phase::ApplyExtrinsic(2),
528-
event: Event::System(frame_system::Event::ExtrinsicSuccess(DispatchInfo {
529-
weight: transfer_weight,
530-
..Default::default()
531-
})),
530+
event: Event::System(frame_system::Event::ExtrinsicSuccess {
531+
dispatch_info: DispatchInfo { weight: transfer_weight, ..Default::default() },
532+
}),
532533
topics: vec![],
533534
},
534535
];

bin/node/runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ std = [
176176
"sp-io/std"
177177
]
178178
runtime-benchmarks = [
179-
"frame-benchmarking",
179+
"frame-benchmarking/runtime-benchmarks",
180180
"frame-support/runtime-benchmarks",
181181
"frame-system/runtime-benchmarks",
182182
"pallet-election-provider-multi-phase/runtime-benchmarks",

bin/node/runtime/src/lib.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
2626
use frame_support::{
2727
construct_runtime, parameter_types,
2828
traits::{
29-
ConstU32, Currency, EqualPrivilegeOnly, Everything, Imbalance, InstanceFilter,
29+
ConstU32, Currency, EnsureOneOf, EqualPrivilegeOnly, Everything, Imbalance, InstanceFilter,
3030
KeyOwnerProofSystem, LockIdentifier, Nothing, OnUnbalanced, U128CurrencyToVote,
3131
},
3232
weights::{
@@ -37,7 +37,7 @@ use frame_support::{
3737
};
3838
use frame_system::{
3939
limits::{BlockLength, BlockWeights},
40-
EnsureOneOf, EnsureRoot,
40+
EnsureRoot,
4141
};
4242
pub use node_primitives::{AccountId, Signature};
4343
use node_primitives::{AccountIndex, Balance, BlockNumber, Hash, Index, Moment};
@@ -535,7 +535,6 @@ impl pallet_staking::Config for Runtime {
535535
type SlashDeferDuration = SlashDeferDuration;
536536
/// A super-majority of the council can cancel the slash.
537537
type SlashCancelOrigin = EnsureOneOf<
538-
AccountId,
539538
EnsureRoot<AccountId>,
540539
pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>,
541540
>;
@@ -726,7 +725,6 @@ impl pallet_democracy::Config for Runtime {
726725
// To cancel a proposal before it has been passed, the technical committee must be unanimous or
727726
// Root must agree.
728727
type CancelProposalOrigin = EnsureOneOf<
729-
AccountId,
730728
EnsureRoot<AccountId>,
731729
pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>,
732730
>;
@@ -817,7 +815,6 @@ impl pallet_collective::Config<TechnicalCollective> for Runtime {
817815
}
818816

819817
type EnsureRootOrHalfCouncil = EnsureOneOf<
820-
AccountId,
821818
EnsureRoot<AccountId>,
822819
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>,
823820
>;
@@ -857,12 +854,10 @@ impl pallet_treasury::Config for Runtime {
857854
type PalletId = TreasuryPalletId;
858855
type Currency = Balances;
859856
type ApproveOrigin = EnsureOneOf<
860-
AccountId,
861857
EnsureRoot<AccountId>,
862858
pallet_collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>,
863859
>;
864860
type RejectOrigin = EnsureOneOf<
865-
AccountId,
866861
EnsureRoot<AccountId>,
867862
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>,
868863
>;
@@ -1268,6 +1263,8 @@ construct_runtime!(
12681263
Utility: pallet_utility,
12691264
Babe: pallet_babe,
12701265
Timestamp: pallet_timestamp,
1266+
// Authorship must be before session in order to note author in the correct session and era
1267+
// for im-online and staking.
12711268
Authorship: pallet_authorship,
12721269
Indices: pallet_indices,
12731270
Balances: pallet_balances,
@@ -1345,7 +1342,7 @@ pub type Executive = frame_executive::Executive<
13451342
Block,
13461343
frame_system::ChainContext<Runtime>,
13471344
Runtime,
1348-
AllPallets,
1345+
AllPalletsWithSystem,
13491346
pallet_bags_list::migrations::CheckCounterPrefix<Runtime>,
13501347
>;
13511348

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Substrate authority discovery.
1+
# Substrate authority discovery
22

33
This crate enables Substrate authorities to discover and directly connect to
44
other authorities. It is split into two components the [`Worker`] and the
55
[`Service`].
66

77
See [`Worker`] and [`Service`] for more documentation.
88

9-
License: GPL-3.0-or-later WITH Classpath-exception-2.0
9+
License: GPL-3.0-or-later WITH Classpath-exception-2.0
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
fn main() {
2-
prost_build::compile_protos(&["src/worker/schema/dht.proto"], &["src/worker/schema"]).unwrap();
2+
prost_build::compile_protos(
3+
&["src/worker/schema/dht-v1.proto", "src/worker/schema/dht-v2.proto"],
4+
&["src/worker/schema"],
5+
)
6+
.unwrap();
37
}

0 commit comments

Comments
 (0)