Skip to content

Commit

Permalink
Upgrade to latest polkadot-v0.9.33
Browse files Browse the repository at this point in the history
  • Loading branch information
jasl committed Dec 5, 2022
1 parent 984e7af commit 48728fa
Show file tree
Hide file tree
Showing 29 changed files with 1,061 additions and 1,001 deletions.
711 changes: 364 additions & 347 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ rocket = { version = "0.5.0-rc.2", git = "https://github.com/SergioBenitez/Rocke
derive_more = { version = "0.99.17", git = "https://github.com/JelteF/derive_more" }

# For pink-extension-runtime, it will introduce Substrate from crates-io which usually different with polkadot-branch
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
20 changes: 10 additions & 10 deletions crates/phactory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ phala-crypto = { path = "../phala-crypto", features = ["getrandom", "stream"] }
prpc = { path = "../prpc" }
pink = { path = "../pink" }

sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", features = ["disable_panic_handler", "disable_oom", "disable_allocator"] }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", features = ["disable_target_static_assertions"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", features = ["disable_panic_handler", "disable_oom", "disable_allocator"] }
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", features = ["disable_target_static_assertions"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
parity-scale-codec = { package = "parity-scale-codec", version = "3.1", default-features = false, features = ["derive", "full", "chain-error"] }
scopeguard = { version = "1.1", default-features = false }

Expand All @@ -54,11 +54,11 @@ derive_more = "0.99.0"
hash-db = { version = "0.15.2", default-features = false }
num = { package = "num-traits", version = "0.2", default-features = false }
finality-grandpa = { version = "0.16.0", default-features = false, features = ["derive-codec"] }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }

fixed = "1.9.0"
fixed-sqrt = "0.2.4"
Expand Down
10 changes: 5 additions & 5 deletions crates/phactory/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ phala-crypto = { path = "../../../crates/phala-crypto" }
phala-mq = { path = "../../../crates/phala-mq" }
chain = { path = "../../../standalone/runtime", default-features = false, package = "phala-node-runtime" }

sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false, features = ["full_crypto"] }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false, features = ["full_crypto"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false, features = ["full_crypto"] }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false, features = ["full_crypto"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }

# for pruntime_client
async-trait = "0.1.57"
Expand Down
4 changes: 2 additions & 2 deletions crates/phala-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition = "2018"
resolver = "2"

[dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }

ring = { version = "0.16.20", default-features = false, features = ["alloc"] }
curve25519-dalek = { version = "2.0", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/phala-mq/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ hex = { version = "0.4.3", default-features = false, features = ['alloc'] }
derive_more = { version = "0.99", default-features = false, features = ["display"] }
parity-scale-codec = { version = "3.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.0", default-features = false, features = ["derive"] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
serde = { version = "1.0", default-features = false, features = ["derive"] }

spin = { version = "0.9", default-features = false, features = ["mutex", "use_ticket_mutex"], optional = true }
Expand Down
12 changes: 6 additions & 6 deletions crates/phala-node-rpc-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ codec = { package = "parity-scale-codec", version = "3.1" }
scale-info = { version = "2.1", default-features = false }

# primitives
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }

# client dependencies
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }

phala-mq = { path = "../../crates/phala-mq" }
phala-pallets = { path = "../../pallets/phala" }
Expand Down
7 changes: 4 additions & 3 deletions crates/phala-node-rpc-ext/src/storage_changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ where
.into_par_iter()
.map(|(id, mut header)| -> Result<_, Error> {
let api = client.runtime_api();
let hash = client.expect_block_hash_from_id(&id).expect("Should get the block hash");
if (*header.number()).into() == 0u64 {
let state = backend
.state_at(&client.expect_block_hash_from_id(&id).expect("Should get the block hash"))
.state_at(hash)
.map_err(|e| Error::invalid_block(id, e))?;
return Ok(StorageChanges {
main_storage_changes: state
Expand All @@ -125,7 +126,7 @@ where
}

let extrinsics = client
.block_body(&id)
.block_body(hash)
.map_err(|e| Error::invalid_block(id, e))?
.ok_or_else(|| Error::invalid_block(id, "block body not found"))?;
let parent_hash = *header.parent_hash();
Expand All @@ -140,7 +141,7 @@ where
.map_err(|e| Error::invalid_block(id, e))?;

let state = backend
.state_at(&client.expect_block_hash_from_id(&id).expect("Should get the block hash"))
.state_at(hash)
.map_err(|e| Error::invalid_block(parent_id, e))?;

let storage_changes = api
Expand Down
2 changes: 1 addition & 1 deletion crates/phala-serde-more/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

[dependencies]
serde = { version = "1.0.130", default-features = false, features = ["derive", "alloc"] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
scale = { package = "parity-scale-codec", version = "3.1", default-features = false }
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }

Expand Down
10 changes: 5 additions & 5 deletions crates/phala-trie-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ repository = "https://github.com/Phala-Network/phala-blockchain"
[dependencies]
parity-scale-codec = { version = "3.0", default-features = false }
scale-info = { version = "2.0", default-features = false, features = ["derive"] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", features = ["full_crypto"] }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", features = ["full_crypto"] }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }

serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true }
hash-db = "0.15.2"
Expand All @@ -21,8 +21,8 @@ im = { version = "15", features = ["serde"] }
parity-util-mem = "0.12.0"

[dev-dependencies]
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", features = ["full_crypto"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", features = ["full_crypto"] }
hash256-std-hasher = { version = "0.15", default-features = false }
hex = "0.4"
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/phala-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ hex = { version = "0.4", default-features = false, features = ["alloc"] }
serde = { version = "1.0.101", default-features = false, optional = true }
codec = { package = "parity-scale-codec", version = "3.1", default-features = false, features = ["full"] }
scale-info = { version = "2.1", default-features = false, features = ["derive"] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }

phala-mq = { path = "../../crates/phala-mq", default-features = false }
prpc = { path = "../../crates/prpc", default-features = false }
Expand Down
32 changes: 16 additions & 16 deletions crates/pink/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ edition = "2021"
[dependencies]
sha2 = "0.10.2"
log = "0.4.14"
pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
pallet-contracts-proc-macro = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-contracts-proc-macro = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }

frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }

sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-sandbox = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-sandbox = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }

scale = { package = "parity-scale-codec", version = "3.1", default-features = false, features = ["derive"] }
scale-info = { version = "2.1", default-features = false, features = ["derive", "serde", "decode"] }
Expand Down
2 changes: 2 additions & 0 deletions crates/pink/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use frame_support::weights::Weight;
use pallet_contracts_primitives::StorageDeposit;
use pallet_contracts::Determinism;
use scale::{Decode, Encode};
use sp_runtime::DispatchError;

Expand Down Expand Up @@ -296,6 +297,7 @@ impl Contract {
storage_deposit_limit,
input_data,
false,
Determinism::AllowIndeterminism,
)
},
);
Expand Down
3 changes: 2 additions & 1 deletion crates/pink/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use crate::{
};
use frame_support::traits::Currency;
use frame_system::RawOrigin;
use pallet_contracts::Determinism;
use phala_crypto::sr25519::Sr25519SecretKey;
use phala_trie_storage::{deserialize_trie_backend, serialize_trie_backend, MemoryDB};
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -167,7 +168,7 @@ where
code: Vec<u8>,
) -> Result<Hash, DispatchError> {
self.execute_mut(false, None, || {
crate::runtime::Contracts::bare_upload_code(account.clone(), code, None)
crate::runtime::Contracts::bare_upload_code(account.clone(), code, None, Determinism::AllowIndeterminism)
})
.0
.map(|v| v.code_hash)
Expand Down
22 changes: 11 additions & 11 deletions pallets/offchain-rollup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ codec = { package = "parity-scale-codec", version = "3.1", default-features = fa
scale-info = { version = "2.1", default-features = false, features = ["derive"] }

primitive-types = { version = "0.12.1", default-features = false, features = ["codec", "byteorder"] }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false, optional = true }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false, optional = true }
log = { version = "0.4.14", default-features = false }

hex = { version = "0.4", default-features = false }
hex-literal = "0.3.4"

[dev-dependencies]
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
frame-support-test = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
assert_matches = "1.4.0"

[features]
Expand Down
Loading

0 comments on commit 48728fa

Please sign in to comment.