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

Allow async backing in moonbase #2593

Merged
merged 103 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
e2a33b5
upgrade to polkadot v1.3.0
ahmadkaouk Nov 30, 2023
cd071d3
Temporarily disable kusama and polkadot runtime dependencies
ahmadkaouk Nov 30, 2023
03eb85c
Remove support for Kusama Native Runtime
ahmadkaouk Nov 30, 2023
87bde92
Update evm pin
ahmadkaouk Dec 4, 2023
e4e9eed
update deposit_asset function signature
ahmadkaouk Dec 4, 2023
182cd43
Add Hasher generic parameter to Bounded
ahmadkaouk Dec 7, 2023
65b0b56
Rename InvalidEvmTransactionError to TransactionValidationError
ahmadkaouk Dec 7, 2023
c2dd2a2
Use transfer_allow_death instead of deprecated transfer
ahmadkaouk Dec 7, 2023
a1b3954
fix build issue
ahmadkaouk Dec 7, 2023
01a7a8d
Use pallet_xcm::RuntimeCall
ahmadkaouk Dec 8, 2023
da4826c
BackendReader renamed to Backend in Frontier
ahmadkaouk Dec 8, 2023
f4ca2d1
Update frontier pin
ahmadkaouk Dec 8, 2023
289018e
Temporarily update new missing weight functions
ahmadkaouk Dec 8, 2023
9cbfa27
Adapt to new return type of ValidatedTransaction::apply
ahmadkaouk Dec 8, 2023
af917fe
IdentityInfo in pallet_identity is now generic
ahmadkaouk Dec 8, 2023
8b2d4c4
Associated type Hasher for QueryPreimage, StorePreimage and Bounded
ahmadkaouk Dec 8, 2023
27da143
Update Frontier Pin
ahmadkaouk Dec 8, 2023
fd2d328
fix runtime compilation errors
librelois Dec 8, 2023
4ace443
Rename BackendReader to Backend
ahmadkaouk Dec 8, 2023
6318533
Remove Send and Sync Trait Bounds for Frontier Backend
ahmadkaouk Dec 8, 2023
fb59e55
Implement closest_merkle_tree and child_closest_merkle_tree for Stora…
ahmadkaouk Dec 8, 2023
26fc6ee
Set block_relay to none
ahmadkaouk Dec 8, 2023
d0e8e2b
Use polkadot_primitives v6
ahmadkaouk Dec 9, 2023
4e5d5a1
Annotate EC for Eth::new
ahmadkaouk Dec 9, 2023
cfe9167
Update polkadot-sdk pin
ahmadkaouk Dec 9, 2023
262a880
Use transferAllowDeath instead of transfer in tests
ahmadkaouk Dec 11, 2023
0f78bbb
Update polkadot-sdk pin
ahmadkaouk Dec 11, 2023
7659190
Use transferAllowDeath instead of transfer
ahmadkaouk Dec 11, 2023
b4fae21
fix typescript test
ahmadkaouk Dec 11, 2023
77eb23d
fix typescript tests
ahmadkaouk Dec 12, 2023
d255ba3
Merge remote-tracking branch 'origin/master' into ahmad-upgrade-to-po…
ahmadkaouk Dec 12, 2023
d49f461
Fix zombie tests
ahmadkaouk Dec 12, 2023
41695c4
use async backing moonkit branch
librelois Dec 12, 2023
fe32f14
implement async-backing for moonbase
librelois Dec 12, 2023
f1f2eb9
refactor client part top be compatible with the new nimbus api
librelois Dec 12, 2023
0205afc
update moonkit pin
librelois Dec 13, 2023
91c420b
impl consensus hook in runtimes
librelois Dec 13, 2023
e89331a
update moonkit
librelois Dec 13, 2023
51f4189
enable feature parameterized-consensus-hook globally
librelois Dec 13, 2023
53a225b
Fix test balance Transferable
ahmadkaouk Dec 13, 2023
14a8fca
Temporarily disabled relay-encoder rust tests
ahmadkaouk Dec 13, 2023
4bbc605
Fix Rust Tests build
ahmadkaouk Dec 13, 2023
ae1de11
update moonkit
librelois Dec 13, 2023
4643beb
add cli option --experimental-async-backing
librelois Dec 13, 2023
0018711
Merge remote-tracking branch 'origin/ahmad-upgrade-to-polkadot-v1.3.0…
librelois Dec 13, 2023
59d75d3
fmt
librelois Dec 13, 2023
3eeb2b8
add pallet async-backing to moonbase
librelois Dec 13, 2023
7239fbf
update polkadot-sdk fork
librelois Dec 13, 2023
4b43316
update polkadot-sdk fork
librelois Dec 13, 2023
13fbd0e
improve relay proof mock
librelois Dec 13, 2023
6f66dd5
Fix build with runtime-benchmarks
ahmadkaouk Dec 14, 2023
21a5618
fmt
ahmadkaouk Dec 14, 2023
faa9b6b
Typescript Fmt
ahmadkaouk Dec 14, 2023
c6443ba
Set MaxHolds to 1
ahmadkaouk Dec 14, 2023
7c6770b
Merge branch 'ahmad-upgrade-to-polkadot-v1.3.0' into elois-async-backing
librelois Dec 14, 2023
dd7a8f0
comply editorconfig
librelois Dec 14, 2023
9aa1857
fix democracy TS tests
Agusrodri Dec 14, 2023
bda525f
fix Eslint warning
Agusrodri Dec 14, 2023
339e1cc
Merge branch 'ahmad-upgrade-to-polkadot-v1.3.0' into elois-async-backing
librelois Dec 14, 2023
cf2452f
Fix typescript test
ahmadkaouk Dec 14, 2023
c464778
fix txpool TS test
Agusrodri Dec 14, 2023
3d5fff7
Merge branch 'ahmad-upgrade-to-polkadot-v1.3.0' into elois-async-backing
librelois Dec 14, 2023
805aaf6
fix precompile identity test
Agusrodri Dec 14, 2023
411ff02
Merge branch 'ahmad-upgrade-to-polkadot-v1.3.0' into elois-async-backing
librelois Dec 14, 2023
94f912c
remove unused import
Agusrodri Dec 14, 2023
609d3aa
Merge branch 'ahmad-upgrade-to-polkadot-v1.3.0' into elois-async-backing
librelois Dec 14, 2023
faf4ebe
editorconfig
librelois Dec 14, 2023
678da02
Fix rust tests
ahmadkaouk Dec 15, 2023
48c7567
Fix rust tests (no reserve anymore with preimage)
ahmadkaouk Dec 15, 2023
aa4a0e4
Merge branch 'ahmad-upgrade-to-polkadot-v1.3.0' into elois-async-backing
librelois Dec 15, 2023
301f048
Fix xcm rust tests
ahmadkaouk Dec 15, 2023
48ec22f
reimplement create_inherent_data_providers
librelois Dec 15, 2023
f8387f8
Merge branch 'ahmad-upgrade-to-polkadot-v1.3.0' into elois-async-backing
librelois Dec 15, 2023
f8c4297
editorconfig
librelois Dec 15, 2023
66a3466
compile rust tests
librelois Dec 15, 2023
7723b26
addn rust feature experimental-async-backing
librelois Dec 15, 2023
17ccd0f
Fix build error
ahmadkaouk Dec 15, 2023
5b3a64d
update moonkit pin
librelois Dec 18, 2023
96001d0
Merge branch 'ahmad-upgrade-to-polkadot-v1.3.0' into elois-async-backing
librelois Dec 18, 2023
d33e92c
Update polkadot-sdk pin
ahmadkaouk Dec 18, 2023
e46bd0f
fix collective test
Agusrodri Dec 18, 2023
d3084e5
Add Evm Fix
ahmadkaouk Dec 18, 2023
d646310
Merge remote-tracking branch 'origin/master' into ahmad-upgrade-to-po…
Agusrodri Dec 18, 2023
4b448d0
Update evm pin
ahmadkaouk Dec 19, 2023
308348e
change moonkit branch
librelois Dec 19, 2023
78736cd
Merge branch 'ahmad-upgrade-to-polkadot-v1.3.0' into elois-async-backing
librelois Dec 19, 2023
8aaab4b
simplify idty precompile trait bounds
librelois Dec 19, 2023
c4cd902
Merge branch 'master' into elois-async-backing
librelois Dec 19, 2023
efcf846
update moonkit pin
librelois Dec 19, 2023
62d87f5
use relay slot for evm timestamp and precompiles permit time
librelois Dec 20, 2023
1908a22
use our own impl to compute a reliable timestamp (moonbase only)
librelois Dec 20, 2023
c4bcfe2
improve pov test
librelois Dec 20, 2023
23ffe44
remove useless function set_parachain_inherent_data
librelois Dec 20, 2023
4e21204
improve pov precompile test
librelois Dec 20, 2023
121cbe6
update polkadot-sdk and moonkit forks
librelois Dec 21, 2023
3785768
Inject relay timestamp in relay proof and use it as blockchain timestamp
librelois Dec 21, 2023
70ce80f
fix rust compilation
librelois Dec 21, 2023
faaa8c7
cleanup code
librelois Dec 21, 2023
51b38b4
Merge branch 'master' into elois-async-backing
librelois Dec 21, 2023
ba4db2a
verify if the cause is really MinimumPeriod
librelois Dec 21, 2023
bc0f610
fix rust tests
Agusrodri Dec 21, 2023
1a7b024
reorder moonbase runtime imports
librelois Dec 22, 2023
1275924
Allow same relay number for several parablocks
librelois Dec 22, 2023
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
619 changes: 339 additions & 280 deletions Cargo.lock

Large diffs are not rendered by default.

30 changes: 18 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
exclude = [ "bin/utils/moonkey" ]
exclude = ["bin/utils/moonkey"]
members = [
"bin/utils/moonkey",
"client/rpc/finality",
Expand Down Expand Up @@ -40,7 +40,7 @@ members = [
resolver = "2"

[workspace.package]
authors = [ "PureStake" ]
authors = ["PureStake"]
repository = "https://github.com/PureStake/moonbeam"

[workspace.dependencies]
Expand Down Expand Up @@ -158,6 +158,7 @@ sp-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch =
sp-application-crypto = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
sp-block-builder = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
sp-consensus-babe = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
sp-consensus-slots = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
sp-core = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
sp-debug-derive = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
sp-externalities = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
Expand Down Expand Up @@ -258,7 +259,9 @@ fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch =

# Cumulus (wasm)
cumulus-pallet-dmp-queue = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
cumulus-pallet-parachain-system = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
cumulus-pallet-parachain-system = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false, features = [
"parameterized-consensus-hook",
] }
cumulus-pallet-xcm = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
cumulus-pallet-xcmp-queue = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
cumulus-primitives-core = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
Expand All @@ -272,6 +275,7 @@ parachain-info = { git = "https://github.com/moonbeam-foundation/polkadot-sdk",
cumulus-client-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" }
cumulus-client-collator = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" }
cumulus-client-consensus-common = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" }
cumulus-client-consensus-proposer = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" }
cumulus-client-consensus-relay-chain = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" }
cumulus-client-network = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" }
cumulus-client-service = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" }
Expand All @@ -282,8 +286,8 @@ cumulus-relay-chain-rpc-interface = { git = "https://github.com/moonbeam-foundat

# Polkadot / XCM (wasm)
orml-traits = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
orml-xcm-support = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
orml-xtokens = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
orml-xcm-support = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
orml-xtokens = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
pallet-xcm = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
pallet-xcm-benchmarks = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
polkadot-core-primitives = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
Expand All @@ -305,8 +309,10 @@ westend-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk",
xcm-simulator = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" }

# Moonkit (wasm)
async-backing-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
pallet-async-backing = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false }
Expand All @@ -324,7 +330,9 @@ async-trait = { version = "0.1.42" }
blake2-rfc = { version = "0.2.18", default-features = false }
derive_more = "0.99"
environmental = { version = "1.1.2", default-features = false }
frame-metadata = { version = "16.0.0", default-features = false, features = ["current"] }
frame-metadata = { version = "16.0.0", default-features = false, features = [
"current",
] }
hex = { version = "0.4.3", default-features = false }
hex-literal = { version = "0.3.4" }
impl-serde = { version = "0.3.1", default-features = false }
Expand All @@ -339,17 +347,15 @@ serde = { version = "1.0.101", default-features = false }
sha3 = { version = "0.10", default-features = false }
slices = "0.2.0"
smallvec = "1.8.0"
strum = { version = "0.24", default-features = false, features = [ "derive" ] }
strum = { version = "0.24", default-features = false, features = ["derive"] }
strum_macros = "0.24"

# Other (client)
ansi_term = "0.12.1"
assert_cmd = "2.0.10"
async-io = "1.3"
bip32 = { version = "0.5.1", default-features = false, features = [
"bip39",
] }
clap = { version = "4.0.9", features = [ "derive" ] }
bip32 = { version = "0.5.1", default-features = false, features = ["bip39"] }
clap = { version = "4.0.9", features = ["derive"] }
exit-future = "0.2"
flume = "0.10.9"
futures = { version = "0.3.21" }
Expand Down Expand Up @@ -451,7 +457,7 @@ opt-level = 3
panic = "unwind"

[profile.testnet]
debug = 1 # debug symbols are useful for profilers
debug = 1 # debug symbols are useful for profilers
debug-assertions = true
inherits = "release"
overflow-checks = true
2 changes: 1 addition & 1 deletion core-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ version = "0.1.1"

[dependencies]
account = { workspace = true }

fp-self-contained = { workspace = true }
hex-literal = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }

Expand Down
7 changes: 7 additions & 0 deletions core-primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ pub type Address = AccountId;
pub type AccountIndex = u32;
/// Digest item type.
pub type DigestItem = generic::DigestItem;

pub mod well_known_relay_keys {
use hex_literal::hex;

pub const TIMESTAMP_NOW: &[u8] =
&hex!["f0c365c3cf59d671eb72da0e7a4113c49f1f0515f462cdcf84e0f1d6045dfcbb"];
}
5 changes: 5 additions & 0 deletions node/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ pub struct RunCmd {
/// Removes moonbeam prefix from Prometheus metrics
#[clap(long)]
pub no_prometheus_prefix: bool,

/// Enable asynchronous backing (for collators only)
/// This feature is still experimental, please don't use it in production.
#[clap(hide = true, long = "experimental-async-backing")]
pub async_backing: bool,
}

impl RunCmd {
Expand Down
3 changes: 3 additions & 0 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,7 @@ pub fn run() -> Result<()> {
collator_options,
id,
rpc_config,
cli.run.async_backing,
hwbench,
)
.await
Expand All @@ -806,6 +807,7 @@ pub fn run() -> Result<()> {
collator_options,
id,
rpc_config,
cli.run.async_backing,
hwbench,
)
.await
Expand All @@ -821,6 +823,7 @@ pub fn run() -> Result<()> {
collator_options,
id,
rpc_config,
cli.run.async_backing,
hwbench,
)
.await
Expand Down
2 changes: 2 additions & 0 deletions node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ pallet-ethereum = { workspace = true, features = [
] }

# Cumulus / Nimbus
async-backing-primitives = { workspace = true }
cumulus-client-cli = { workspace = true }
cumulus-client-collator = { workspace = true }
cumulus-client-consensus-common = { workspace = true }
cumulus-client-consensus-proposer = { workspace = true }
cumulus-client-consensus-relay-chain = { workspace = true }
cumulus-client-network = { workspace = true }
cumulus-client-service = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions node/service/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub trait RuntimeApiCollection:
+ nimbus_primitives::NimbusApi<Block>
+ cumulus_primitives_core::CollectCollationInfo<Block>
+ session_keys_primitives::VrfApi<Block>
+ async_backing_primitives::UnincludedSegmentApi<Block>
{
}

Expand All @@ -65,6 +66,7 @@ impl<Api> RuntimeApiCollection for Api where
+ nimbus_primitives::NimbusApi<Block>
+ cumulus_primitives_core::CollectCollationInfo<Block>
+ session_keys_primitives::VrfApi<Block>
+ async_backing_primitives::UnincludedSegmentApi<Block>
{
}

Expand Down
Loading
Loading