mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-24 12:45:04 +00:00
Fix warning and directory restructure.
This commit is contained in:
1 parent
ac5a750f45
commit
4582038b3d
145 files changed
+129
-123
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/target/
|
||||
**/*.rs.bk
|
||||
*.swp
|
||||
polkadot-runtime/wasm/target/
|
||||
executor/wasm/target/
|
||||
polkadot/runtime/wasm/target/
|
||||
substrate/executor/wasm/target/
|
||||
**/._*
|
||||
+29
-25
@@ -1,3 +1,7 @@
|
||||
[[bin]]
|
||||
name = "polkadot"
|
||||
path = "polkadot/src/main.rs"
|
||||
|
||||
[package]
|
||||
name = "polkadot"
|
||||
version = "0.1.0"
|
||||
@@ -5,34 +9,34 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
error-chain = "0.11"
|
||||
polkadot-cli = { path = "polkadot-cli", version = "0.1" }
|
||||
polkadot-network = { path = "network" }
|
||||
polkadot-cli = { path = "polkadot/cli" }
|
||||
polkadot-network = { path = "polkadot/network" }
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
"client",
|
||||
"codec",
|
||||
"environmental",
|
||||
"executor",
|
||||
"network",
|
||||
"polkadot-candidate-agreement",
|
||||
"polkadot-cli",
|
||||
"polkadot-collator",
|
||||
"polkadot-executor",
|
||||
"polkadot-runtime",
|
||||
"polkadot-primitives",
|
||||
"polkadot-validator",
|
||||
"primitives",
|
||||
"rpc",
|
||||
"rpc-servers",
|
||||
"runtime-io",
|
||||
"runtime-std",
|
||||
"serializer",
|
||||
"state-machine",
|
||||
"substrate/client",
|
||||
"substrate/codec",
|
||||
"substrate/environmental",
|
||||
"substrate/executor",
|
||||
"polkadot/network",
|
||||
"polkadot/candidate-agreement",
|
||||
"polkadot/cli",
|
||||
"polkadot/collator",
|
||||
"polkadot/executor",
|
||||
"polkadot/runtime",
|
||||
"polkadot/primitives",
|
||||
"polkadot/validator",
|
||||
"substrate/primitives",
|
||||
"substrate/rpc",
|
||||
"substrate/rpc-servers",
|
||||
"substrate/runtime-io",
|
||||
"substrate/runtime-std",
|
||||
"substrate/serializer",
|
||||
"substrate/state-machine",
|
||||
]
|
||||
exclude = [
|
||||
"executor/wasm",
|
||||
"polkadot-runtime/wasm",
|
||||
"pwasm-alloc",
|
||||
"pwasm-libc",
|
||||
"substrate/executor/wasm",
|
||||
"polkadot/runtime/wasm",
|
||||
"substrate/pwasm-alloc",
|
||||
"substrate/pwasm-libc",
|
||||
]
|
||||
@@ -1,24 +0,0 @@
|
||||
[package]
|
||||
name = "polkadot-cli"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Polkadot node implementation in Rust."
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "2.27", features = ["yaml"] }
|
||||
env_logger = "0.4"
|
||||
error-chain = "0.11"
|
||||
log = "0.3"
|
||||
hex-literal = "0.1"
|
||||
ed25519 = { path = "../ed25519" }
|
||||
triehash = { version = "0.1" }
|
||||
substrate-client = { path = "../client" }
|
||||
substrate-codec = { path = "../codec" }
|
||||
substrate-runtime-io = { path = "../runtime-io" }
|
||||
substrate-state-machine = { path = "../state-machine" }
|
||||
substrate-executor = { path = "../executor" }
|
||||
substrate-primitives = { path = "../primitives" }
|
||||
substrate-rpc-servers = { path = "../rpc-servers" }
|
||||
polkadot-primitives = { path = "../polkadot-primitives" }
|
||||
polkadot-executor = { path = "../polkadot-executor" }
|
||||
polkadot-runtime = { path = "../polkadot-runtime" }
|
||||
@@ -1,17 +0,0 @@
|
||||
[package]
|
||||
name = "polkadot-executor"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Polkadot node implementation in Rust."
|
||||
|
||||
[dependencies]
|
||||
hex-literal = "0.1"
|
||||
ed25519 = { path = "../ed25519" }
|
||||
triehash = { version = "0.1" }
|
||||
substrate-codec = { path = "../codec" }
|
||||
substrate-runtime-io = { path = "../runtime-io" }
|
||||
substrate-state-machine = { path = "../state-machine" }
|
||||
substrate-executor = { path = "../executor" }
|
||||
substrate-primitives = { path = "../primitives" }
|
||||
polkadot-primitives = { path = "../polkadot-primitives", version = "0.1" }
|
||||
polkadot-runtime = { path = "../polkadot-runtime" }
|
||||
@@ -1,18 +0,0 @@
|
||||
[package]
|
||||
name = "polkadot-runtime"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
substrate-codec = { path = "../codec", version = "0.1" }
|
||||
substrate-runtime-std = { path = "../runtime-std", version = "0.1" }
|
||||
substrate-runtime-io = { path = "../runtime-io", version = "0.1" }
|
||||
substrate-primitives = { path = "../primitives", version = "0.1" }
|
||||
polkadot-primitives = { path = "../polkadot-primitives", version = "0.1" }
|
||||
rustc-hex = "1.0"
|
||||
hex-literal = "0.1.0"
|
||||
log = { version = "0.3", optional = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["substrate-codec/std", "substrate-runtime-std/std", "substrate-runtime-io/std", "substrate-primitives/std", "polkadot-primitives/std", "log"]
|
||||
@@ -1,11 +0,0 @@
|
||||
[package]
|
||||
name = "polkadot-validator"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
error-chain = "0.11"
|
||||
substrate-primitives = { path = "../primitives" }
|
||||
polkadot-primitives = { path = "../polkadot-primitives" }
|
||||
substrate-serializer = { path = "../serializer" }
|
||||
serde = "1.0"
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,24 @@
|
||||
[package]
|
||||
name = "polkadot-cli"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Polkadot node implementation in Rust."
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "2.27", features = ["yaml"] }
|
||||
env_logger = "0.4"
|
||||
error-chain = "0.11"
|
||||
log = "0.3"
|
||||
hex-literal = "0.1"
|
||||
triehash = "0.1"
|
||||
ed25519 = { path = "../../substrate/ed25519" }
|
||||
substrate-client = { path = "../../substrate/client" }
|
||||
substrate-codec = { path = "../../substrate/codec" }
|
||||
substrate-runtime-io = { path = "../../substrate/runtime-io" }
|
||||
substrate-state-machine = { path = "../../substrate/state-machine" }
|
||||
substrate-executor = { path = "../../substrate/executor" }
|
||||
substrate-primitives = { path = "../../substrate/primitives" }
|
||||
substrate-rpc-servers = { path = "../../substrate/rpc-servers" }
|
||||
polkadot-primitives = { path = "../primitives" }
|
||||
polkadot-executor = { path = "../executor" }
|
||||
polkadot-runtime = { path = "../runtime" }
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -5,6 +5,6 @@ authors = ["Parity Technologies <rphmeier@gmail.com>"]
|
||||
description = "Abstract collation logic"
|
||||
|
||||
[dependencies]
|
||||
substrate-primitives = { path = "../primitives", version = "0.1" }
|
||||
polkadot-primitives = { path = "../polkadot-primitives", version = "0.1" }
|
||||
futures = "0.1.17"
|
||||
substrate-primitives = { path = "../../substrate/primitives", version = "0.1" }
|
||||
polkadot-primitives = { path = "../primitives", version = "0.1" }
|
||||
File renamed without changes.
@@ -0,0 +1,17 @@
|
||||
[package]
|
||||
name = "polkadot-executor"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Polkadot node implementation in Rust."
|
||||
|
||||
[dependencies]
|
||||
hex-literal = "0.1"
|
||||
triehash = { version = "0.1" }
|
||||
ed25519 = { path = "../../substrate/ed25519" }
|
||||
substrate-codec = { path = "../../substrate/codec" }
|
||||
substrate-runtime-io = { path = "../../substrate/runtime-io" }
|
||||
substrate-state-machine = { path = "../../substrate/state-machine" }
|
||||
substrate-executor = { path = "../../substrate/executor" }
|
||||
substrate-primitives = { path = "../../substrate/primitives" }
|
||||
polkadot-primitives = { path = "../primitives" }
|
||||
polkadot-runtime = { path = "../runtime" }
|
||||
@@ -40,7 +40,7 @@ impl NativeExecutionDispatch for LocalNativeExecutionDispatch {
|
||||
fn native_equivalent() -> &'static [u8] {
|
||||
// WARNING!!! This assumes that the runtime was built *before* the main project. Until we
|
||||
// get a proper build script, this must be strictly adhered to or things will go wrong.
|
||||
include_bytes!("../../polkadot-runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm")
|
||||
include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm")
|
||||
}
|
||||
|
||||
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
|
||||
@@ -67,8 +67,8 @@ mod tests {
|
||||
UncheckedTransaction, Function, AccountId};
|
||||
use ed25519::Pair;
|
||||
|
||||
const BLOATY_CODE: &[u8] = include_bytes!("../../polkadot-runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.wasm");
|
||||
const COMPACT_CODE: &[u8] = include_bytes!("../../polkadot-runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm");
|
||||
const BLOATY_CODE: &[u8] = include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.wasm");
|
||||
const COMPACT_CODE: &[u8] = include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm");
|
||||
|
||||
// TODO: move into own crate.
|
||||
macro_rules! map {
|
||||
@@ -289,7 +289,7 @@ mod tests {
|
||||
twox_128(&one.to_keyed_vec(b"sta:bal:")).to_vec() => vec![68u8, 0, 0, 0, 0, 0, 0, 0]
|
||||
], };
|
||||
|
||||
let foreign_code = include_bytes!("../../polkadot-runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.wasm");
|
||||
let foreign_code = include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.wasm");
|
||||
let r = WasmExecutor.call(&mut t, &foreign_code[..], "execute_transaction", &vec![].join(&Header::from_block_number(1u64)).join(&tx()));
|
||||
assert!(r.is_err());
|
||||
}
|
||||
@@ -303,7 +303,7 @@ mod tests {
|
||||
twox_128(&one.to_keyed_vec(b"sta:bal:")).to_vec() => vec![111u8, 0, 0, 0, 0, 0, 0, 0]
|
||||
], };
|
||||
|
||||
let foreign_code = include_bytes!("../../polkadot-runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm");
|
||||
let foreign_code = include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm");
|
||||
let r = WasmExecutor.call(&mut t, &foreign_code[..], "execute_transaction", &vec![].join(&Header::from_block_number(1u64)).join(&tx()));
|
||||
assert!(r.is_ok());
|
||||
|
||||
@@ -8,12 +8,6 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
ethcore-network = { git = "https://github.com/paritytech/parity.git" }
|
||||
ethcore-io = { git = "https://github.com/paritytech/parity.git" }
|
||||
substrate-primitives = { path = "../primitives" }
|
||||
substrate-client = { path = "../client" }
|
||||
substrate-state-machine = { path = "../state-machine" }
|
||||
substrate-serializer = { path = "../serializer" }
|
||||
log = "0.3"
|
||||
env_logger = "0.4"
|
||||
rand = "0.3"
|
||||
@@ -27,4 +21,10 @@ bitflags = "1.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
polkadot-primitives = { path = "../polkadot-primitives" }
|
||||
ethcore-network = { git = "https://github.com/paritytech/parity.git" }
|
||||
ethcore-io = { git = "https://github.com/paritytech/parity.git" }
|
||||
substrate-primitives = { path = "../../substrate/primitives" }
|
||||
substrate-client = { path = "../../substrate/client" }
|
||||
substrate-state-machine = { path = "../../substrate/state-machine" }
|
||||
substrate-serializer = { path = "../../substrate/serializer" }
|
||||
polkadot-primitives = { path = "../primitives" }
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -6,12 +6,12 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
[dependencies]
|
||||
serde = { version = "1.0", default_features = false }
|
||||
serde_derive = { version = "1.0", optional = true }
|
||||
substrate-codec = { path = "../codec", default_features = false }
|
||||
substrate-primitives = { path = "../primitives", default_features = false }
|
||||
substrate-runtime-std = { path = "../runtime-std", default_features = false }
|
||||
substrate-codec = { path = "../../substrate/codec", default_features = false }
|
||||
substrate-primitives = { path = "../../substrate/primitives", default_features = false }
|
||||
substrate-runtime-std = { path = "../../substrate/runtime-std", default_features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
substrate-serializer = { path = "../serializer" }
|
||||
substrate-serializer = { path = "../../substrate/serializer" }
|
||||
pretty_assertions = "0.4"
|
||||
|
||||
[features]
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,25 @@
|
||||
[package]
|
||||
name = "polkadot-runtime"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
rustc-hex = "1.0"
|
||||
hex-literal = "0.1.0"
|
||||
log = { version = "0.3", optional = true }
|
||||
substrate-codec = { path = "../../substrate/codec" }
|
||||
substrate-runtime-std = { path = "../../substrate/runtime-std" }
|
||||
substrate-runtime-io = { path = "../../substrate/runtime-io" }
|
||||
substrate-primitives = { path = "../../substrate/primitives" }
|
||||
polkadot-primitives = { path = "../primitives" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"substrate-codec/std",
|
||||
"substrate-runtime-std/std",
|
||||
"substrate-runtime-io/std",
|
||||
"substrate-primitives/std",
|
||||
"polkadot-primitives/std",
|
||||
"log"
|
||||
]
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "polkadot-validator"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
error-chain = "0.11"
|
||||
serde = "1.0"
|
||||
substrate-primitives = { path = "../../substrate/primitives" }
|
||||
substrate-serializer = { path = "../../substrate/serializer" }
|
||||
polkadot-primitives = { path = "../primitives" }
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -41,10 +41,6 @@ extern crate rustc_hex;
|
||||
extern crate triehash;
|
||||
#[macro_use] extern crate log;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate hex_literal;
|
||||
|
||||
#[macro_use]
|
||||
extern crate error_chain;
|
||||
|
||||
+1
@@ -34,6 +34,7 @@ pub trait NativeExecutionDispatch {
|
||||
/// A generic `CodeExecutor` implementation that uses a delegate to determine wasm code equivalence
|
||||
/// and dispatch to native code when possible, falling back on `WasmExecutor` when not.
|
||||
pub struct NativeExecutor<D: NativeExecutionDispatch + Sync + Send> {
|
||||
/// Dummy field to avoid the compiler complaining about us not using `D`.
|
||||
pub _dummy: ::std::marker::PhantomData<D>,
|
||||
}
|
||||
|
||||
+2
-4
@@ -330,11 +330,9 @@ impl CodeExecutor for WasmExecutor {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use rustc_hex::FromHex;
|
||||
use codec::{KeyedVec, Slicable, Joiner};
|
||||
use codec::{Slicable, Joiner};
|
||||
use state_machine::TestExternalities;
|
||||
use primitives::{twox_128, Header};
|
||||
use runtime_io;
|
||||
use ed25519::Pair;
|
||||
use primitives::Header;
|
||||
|
||||
#[test]
|
||||
fn returning_should_work() {
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 145 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user