Skip to content
This repository was archived by the owner on Oct 5, 2022. It is now read-only.

Bump substrate to commit 7c63420 #48

Merged
merged 7 commits into from
Feb 4, 2022
Merged
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
353 changes: 231 additions & 122 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-fe
sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-consensus-aura = { version = "0.10.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = { version = "4.1.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-runtime = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
Expand Down
1 change: 1 addition & 0 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
state_version: 0,
};

pub const MILLISECS_PER_BLOCK: u64 = 6000;
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2021-10-16"
channel = "nightly-2021-11-10"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the toolchain that old? To match sgx?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sad story..

targets = ["wasm32-unknown-unknown"]
profile = "default" # include rustfmt, clippy
profile = "default" # include rustfmt, clippy
6 changes: 3 additions & 3 deletions substrate-sgx/externalities/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ serde = { version = "1.0", default-features = false, features = ["derive", "allo
postcard = { version = "0.7.2", default-features = false, features = ["alloc"] }

# sgx dependencies
sgx_tstd = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git", features = ["untrusted_fs","net","backtrace"], optional = true }
sgx_types = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
sgx_tstd = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git", features = ["untrusted_fs","net","backtrace"], optional = true }
sgx_types = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git" }

[features]
default = ["std"]
Expand All @@ -28,4 +28,4 @@ std = [
]
sgx = [
"sgx_tstd",
]
]
22 changes: 11 additions & 11 deletions substrate-sgx/sp-io/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sp-io"
version = "4.0.0-dev"
version = "5.0.0"
authors = ["Integritee AG <hello@integritee.network> and Parity Technologies <admin@parity.io>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -10,26 +10,26 @@ codec = { package = "parity-scale-codec", version = "2.0.0", default-features =
hash-db = { version = "0.15.2", default-features = false }
libsecp256k1 = { version = "0.7.0", default-features = false, features = ["static-context"] }
futures = { version = "0.3.1", features = ["thread-pool"], optional = true }
parking_lot = { version = "0.11.1", optional = true }
parking_lot = { version = "0.12.0", optional = true }
tracing = { version = "0.1.25", default-features = false }
tracing-core = { version = "0.1.17", default-features = false}
log = { version = "0.4", default-features = false }

environmental = { version = "1.1.3", default-features = false }
sgx_tstd = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git", features = ["untrusted_fs","net","backtrace"], optional = true}
sgx_types = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git", optional = true}
sgx_tstd = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git", features = ["untrusted_fs","net","backtrace"], optional = true }
sgx_types = { branch = "master", git = "https://github.com/apache/teaclave-sgx-sdk.git", optional = true }
sgx-externalities = { default-features = false, path = "../externalities", optional = true }

# Substrate dependencies
sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = { version = "4.1.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", features=["full_crypto"], branch = "master" }
sp-state-machine = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master", optional = true}
sp-runtime-interface = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-wasm-interface = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-core = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", features=["full_crypto"], branch = "master" }
sp-state-machine = { version = "0.11.0", git = "https://github.com/paritytech/substrate.git", branch = "master", optional = true}
sp-runtime-interface = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-wasm-interface = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-tracing = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-trie = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master", optional = true }
sp-keystore = { version = "0.10.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master", optional = true }
sp-externalities = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master", optional = true }
sp-trie = { version = "5.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master", optional = true }
sp-keystore = { version = "0.11.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master", optional = true }
sp-externalities = { version = "0.11.0", git = "https://github.com/paritytech/substrate.git", branch = "master", optional = true }

[dev-dependencies]
hex-literal = { version = "0.3.4" }
Expand Down
17 changes: 10 additions & 7 deletions substrate-sgx/sp-io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,15 @@ pub mod misc {
/// Interfaces for working with crypto related types from within the runtime.
pub mod crypto {
use super::*;
use sp_core::H512;
pub fn ed25519_public_keys(id: KeyTypeId) -> Vec<ed25519::Public> {
warn!("crypto::ed25519_public_keys unimplemented");
vec![ed25519::Public::default()]
vec![ed25519::Public::from_h256(H256::default())]
}

pub fn ed25519_generate(id: KeyTypeId, seed: Option<Vec<u8>>) -> ed25519::Public {
warn!("crypto::ed25519_generate unimplemented");
ed25519::Public::default()
ed25519::Public::from_h256(H256::default())
}

pub fn ed25519_sign(
Expand All @@ -417,7 +418,8 @@ pub mod crypto {
msg: &[u8],
) -> Option<ed25519::Signature> {
warn!("crypto::ed25519_sign unimplemented");
Some(ed25519::Signature::default())

Some(ed25519::Signature::from_raw(H512::default().into()))
}

pub fn ed25519_verify(sig: &ed25519::Signature, msg: &[u8], pub_key: &ed25519::Public) -> bool {
Expand Down Expand Up @@ -461,12 +463,12 @@ pub mod crypto {

pub fn sr25519_public_keys(id: KeyTypeId) -> Vec<sr25519::Public> {
warn!("crypto::sr25519_public_key unimplemented");
vec![sr25519::Public::default()]
vec![sr25519::Public::from_h256(H256::default())]
}

pub fn sr25519_generate(id: KeyTypeId, seed: Option<Vec<u8>>) -> sr25519::Public {
warn!("crypto::sr25519_generate unimplemented");
sr25519::Public::default()
sr25519::Public::from_h256(H256::default())
}

pub fn sr25519_sign(
Expand All @@ -475,7 +477,7 @@ pub mod crypto {
msg: &[u8],
) -> Option<sr25519::Signature> {
warn!("crypto::sr25519_sign unimplemented");
Some(sr25519::Signature::default())
Some(sr25519::Signature::from_raw(H512::default().into()))
}

/// Verify `sr25519` signature.
Expand All @@ -499,7 +501,8 @@ pub mod crypto {
/// Returns the public key.
pub fn ecdsa_generate(id: KeyTypeId, seed: Option<Vec<u8>>) -> ecdsa::Public {
warn!("crypto::ecdsa_generate unimplemented");
ecdsa::Public::default()
let raw: [u8; 33] = [0; 33];
ecdsa::Public::from_raw(raw)
}

/// Sign the given `msg` with the `ecdsa` key that corresponds to the given public key and
Expand Down
2 changes: 1 addition & 1 deletion test-no-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ libc = { version = "0.2", default-features = false }
sgx-runtime = { path = "../runtime", default-features = false }
sp-io = { path = "../substrate-sgx/sp-io", default-features = false, features = ["disable_oom", "disable_panic_handler", "disable_allocator", "sgx"] }
sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false, features = ["full_crypto"] }
sp-core = { version = "4.1.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false, features = ["full_crypto"] }
sp-core = { version = "5.0.0", git = "https://github.com/paritytech/substrate.git", branch = "master", default-features = false, features = ["full_crypto"] }