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

Restoring Sandbox Host Functions for Node Synchronization in Full Mode #478

Draft
wants to merge 17 commits into
base: feat/polkadot-stable2409
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
143 changes: 141 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,28 @@ members = [
"primitives",
"runtime/cere",
"runtime/cere-dev",
"node/runtime-interfaces",
"node/runtime-interface-macro"

]
resolver = "2"

[workspace.dependencies]
# 3rd-party dependencies
Inflector = { version = "0.11.4" }
expander = { version = "2.0.0" }
blake2 = { version = "0.10.6", default-features = false }
bytes = { version = "1.4.0", default-features = false }
impl-trait-for-tuples = { version = "0.2.2" }
primitive-types = { version = "0.12.1", default-features = false }
byte-unit = { version = "4.0.19", default-features = false, features = ["u128"] }
chrono = { version = "0.4.31", default-features = false }
clap = { version = "4.2.5", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive", "max-encoded-len"] }
futures = { version = "0.3.30" }
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
anyhow = { version = "1.0.81", default-features = false }
wasmtime = { version = "8.0.1", default-features = false }
hex-literal = { version = "^0.4.1", default-features = false }
jsonrpsee = { version = "0.24.3", default-features = false, features = ["server"] }
lazy_static = { version = "1.5.0", default-features = false }
Expand All @@ -50,7 +60,14 @@ serde_json = { version = "1.0.128", default-features = false }
static_assertions = { version = "1.1.0" }
url = { version = "2.5.2" }
array-bytes = { version = "6.2.2" }
rustversion = { version = "1.0.17" }
trybuild = { version = "1.0.89" }
polkavm-derive = "0.9.1"
itertools = { version = "0.13.0", default-features = false, features = ["use_alloc"] }
proc-macro-crate = { version = "3.0.0" }
proc-macro2 = { version = "1.0.64" }
quote = { version = "1.0.37" }
syn = { version = "2.0.65" }

# Substrate Dependencies
# Please keey format such that:
Expand Down Expand Up @@ -124,6 +141,7 @@ sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git",
sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sc-consensus-slots = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false }
sc-allocator = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false }
sc-network = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sc-network-common = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
Expand Down Expand Up @@ -151,11 +169,16 @@ sp-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk.g
sp-core = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false, features = ["serde"] }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
#sp-runtime-interface-test-wasm = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-externalities = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
#sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
#sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
Expand All @@ -167,6 +190,7 @@ sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git",
sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-trie = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
sp-wasm-interface = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2409", default-features = false }
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false }
substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-stable2409", default-features = false }
Expand All @@ -179,6 +203,8 @@ cere-dev-runtime = { path = "runtime/cere-dev" }
cere-rpc = { path = "node/rpc" }
cere-runtime = { path = "runtime/cere" }
cere-runtime-common = { path = "runtime/common", default-features = false }
cere-runtime-interfaces = { path = "node/runtime-interfaces" }
cere-wasm-interface = { path = "node/runtime-interface-macro/cere-wasm-interface"}
cere-service = { path = "node/service" }
ddc-primitives = { path = "primitives", default-features = false }
pallet-chainbridge = { path = "pallets/chainbridge", default-features = false }
Expand All @@ -191,6 +217,10 @@ pallet-ddc-staking = { path = "pallets/ddc-staking", default-features = false }
pallet-erc20 = { path = "pallets/erc20", default-features = false }
pallet-erc721 = { path = "pallets/erc721", default-features = false }
pallet-origins = { path = "pallets/origins", default-features = false }
sp-runtime-interface-macro = { path = "node/runtime-interface-macro", default-features = false }
#sp-runtime-interface-test-wasm = { path = "node/runtime-interface-macro/test-wasm", default-features = false, version = "2.0.0" }
sp-runtime-interface-proc-macro-local = { path = "node/runtime-interface-macro/proc-macro", default-features = false }
#sp-runtime-interface-test-wasm-deprecated = { path = "node/runtime-interface-macro/test-wasm-deprecated" , default-features = false}

[profile.release]
panic = "unwind"
1 change: 1 addition & 0 deletions node/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ sp-transaction-pool = { workspace = true, default-features = true }
# Local
cere-dev-runtime = { workspace = true, optional = true }
cere-runtime = { workspace = true, optional = true }
cere-runtime-interfaces = { workspace = true }

[features]
default = ["cere"]
Expand Down
4 changes: 2 additions & 2 deletions node/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ use sp_storage::{ChildInfo, StorageData, StorageKey};
pub type FullBackend = sc_service::TFullBackend<Block>;

#[cfg(not(feature = "runtime-benchmarks"))]
pub type HostFunctions = sp_io::SubstrateHostFunctions;
pub type HostFunctions = (sp_io::SubstrateHostFunctions,cere_runtime_interfaces::sandbox::HostFunctions);

#[cfg(feature = "runtime-benchmarks")]
pub type HostFunctions =
(sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions);
(sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions,cere_runtime_interfaces::sandbox::HostFunctions);

pub type ChainExecutor = WasmExecutor<HostFunctions>;
pub type FullClient<RuntimeApi> = sc_service::TFullClient<Block, RuntimeApi, ChainExecutor>;
Expand Down
Loading
Loading