Skip to content

Commit

Permalink
Merge pull request #36 from centrifuge/polkadot-v0.9.29
Browse files Browse the repository at this point in the history
Polkadot v0.9.29
  • Loading branch information
mustermeiszer authored Sep 21, 2022
2 parents 212d66a + 45194cb commit 1362f03
Show file tree
Hide file tree
Showing 13 changed files with 1,553 additions and 1,124 deletions.
1,679 changes: 623 additions & 1,056 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
members = [
"core",
"core/src/builder/companion",
"core/src/tests/test-parachain",
"fudge",
"integration_test"
]
98 changes: 49 additions & 49 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,65 +18,65 @@ tracing = "0.1.3"
fudge-companion = { path = "./src/builder/companion"}

# Substrate primitives dependencies
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-database = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-database = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }

# Substarte client dependencies
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-service = { git = "https://github.com/paritytech/substrate", features = ["test-helpers"], branch = "polkadot-v0.9.28" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
node-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-service = { git = "https://github.com/paritytech/substrate", features = ["test-helpers"], branch = "polkadot-v0.9.29" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
node-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }

# Substrate frame dependencies
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }

# Polkadot dependencies
polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
## Currently only needed to make cumulus-relay-chain-inprocess-interface compile, not sure why cumulus works though
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }

# Cumulus dependencies
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-relay-chain-inprocess-interface= { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }
cumulus-relay-chain-inprocess-interface= { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }

[dev-dependencies]
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
tokio = { version = "1.15", features = ["macros"] }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
tracing-subscriber = "0.2"
centrifuge-runtime = {git = "https://github.com/gruberb/centrifuge-chain", branch = "polkadot-v0.9.28"}
pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
fudge-test-runtime = {path = "./src/tests/test-parachain", default-features = true}
6 changes: 2 additions & 4 deletions core/src/provider/state_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ where
pub fn from_db(path: PathBuf) -> Self {
// TODO: Maybe allow to set these settings
let settings = DatabaseSettings {
state_cache_size: 0,
state_cache_child_ratio: None,
trie_cache_maximum_size: None,
state_pruning: Some(PruningMode::ArchiveAll),
source: DatabaseSource::RocksDb {
path: path.clone(),
Expand Down Expand Up @@ -108,8 +107,7 @@ where
fn with_in_mem_db() -> Result<Self, ()> {
// TODO: Maybe allow to set these settings
let settings = DatabaseSettings {
state_cache_size: 0,
state_cache_child_ratio: None,
trie_cache_maximum_size: None,
state_pruning: Some(PruningMode::ArchiveAll),
source: DatabaseSource::Custom {
db: Arc::new(MemDb::new()),
Expand Down
4 changes: 2 additions & 2 deletions core/src/tests/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

use centrifuge_runtime::{
use frame_support::traits::GenesisBuild;
use fudge_test_runtime::{
AuraId, Block as PTestBlock, Runtime as PRuntime, RuntimeApi as PTestRtApi,
WASM_BINARY as PCODE,
};
use frame_support::traits::GenesisBuild;
use polkadot_core_primitives::{Block as RTestBlock, Header as RTestHeader};
use polkadot_parachain::primitives::Id;
use polkadot_runtime::{Runtime as RRuntime, RuntimeApi as RTestRtApi, WASM_BINARY as RCODE};
Expand Down
2 changes: 1 addition & 1 deletion core/src/tests/relay_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

use centrifuge_runtime::WASM_BINARY as PARA_CODE;
use fudge_test_runtime::WASM_BINARY as PARA_CODE;
use polkadot_parachain::primitives::{HeadData, Id, ValidationCode};
use polkadot_runtime::{Block as TestBlock, Runtime, RuntimeApi as TestRtApi, WASM_BINARY as CODE};
use polkadot_runtime_parachains::paras;
Expand Down
128 changes: 128 additions & 0 deletions core/src/tests/test-parachain/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
[package]
name = "fudge-test-runtime"
version = "0.10.12"
edition = "2021"
build = "build.rs"
license = "LGPL-3.0"

[dependencies]
# third-party dependencies
codec = { package = "parity-scale-codec", version = "3.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.0", default-features = false, features = ["derive"] }
integer-sqrt = { version = "0.1.2" }
safe-mix = { version = "1.0", default-features = false }
smallvec = "1.6.1"
static_assertions = "1.1.0"
hex-literal = { version = "0.2.1", optional = true }
rustc-hex = { version = "2.0", optional = true }
serde = { version = "1.0.102", optional = true }

# parachain
parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.29" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.29" }
cumulus-primitives-core = {git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.29" }
cumulus-primitives-utility = {git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.29" }
cumulus-pallet-aura-ext = {git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.29" }
cumulus-primitives-timestamp = {git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.29" }
pallet-collator-selection = {git = "https://github.com/paritytech/cumulus", default-features = false, branch = "polkadot-v0.9.29" }

# polkadot dependencies
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" }

# primitives
sp-authority-discovery = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-consensus-babe = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.29" }
sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
node-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-version = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.29" }

# frame dependencies
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.29" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , optional = true , branch = "polkadot-v0.9.29" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["historical"] , branch = "polkadot-v0.9.29" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
pallet-identity = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.29" }
pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.29" }
pallet-preimage = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.29" }
pallet-treasury = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.29" }

[build-dependencies]
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }

[features]
default = ["std"]
std = [
"sp-authority-discovery/std",
"pallet-authorship/std",
"pallet-balances/std",
"sp-block-builder/std",
"codec/std",
"frame-executive/std",
"sp-inherents/std",
"pallet-scheduler/std",
"node-primitives/std",
"sp-offchain/std",
"sp-core/std",
"sp-std/std",
"serde",
"pallet-session/std",
"sp-api/std",
"sp-runtime/std",
"sp-staking/std",
"sp-session/std",
"frame-support/std",
"frame-system/std",
"pallet-timestamp/std",
"pallet-transaction-payment/std",
"sp-transaction-pool/std",
"sp-version/std",
"sp-arithmetic/std",
"sp-io/std",
"rustc-hex",
"safe-mix/std",
"cumulus-pallet-parachain-system/std",
"cumulus-primitives-timestamp/std",
"pallet-collator-selection/std",
"parachain-info/std",
"cumulus-pallet-aura-ext/std",
"pallet-aura/std",
"sp-consensus-aura/std",
"polkadot-runtime-common/std",
"pallet-treasury/std",
"pallet-preimage/std",
"pallet-identity/std",
"pallet-sudo/std"
]

# A feature that should be enabled when the runtime should be build for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller like logging for example.
on-chain-release-build = [
"sp-api/disable-logging",
]

# Set timing constants (e.g. session period) to faster versions to speed up testing.
fast-runtime = []
Loading

0 comments on commit 1362f03

Please sign in to comment.