Skip to content

Commit

Permalink
Skip sidechain block import confirmation (#3134)
Browse files Browse the repository at this point in the history
* Skip sidechain block import confirmation

* use consistent url crate in enclave

* try to address crate version in lockfile
  • Loading branch information
Kailai-Wang authored and BillyWooo committed Oct 18, 2024
1 parent 2346273 commit 5608b36
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 69 deletions.
26 changes: 13 additions & 13 deletions tee-worker/Cargo.lock

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

2 changes: 1 addition & 1 deletion tee-worker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ musig2 = { git = "https://github.com/kziemianek/musig2", branch = "master", feat
rlp = { version = "0.5", default-features = false }
sha3 = { version = "0.10", default-features = false }

url = { git = "https://github.com/domenukk/rust-url", branch = "no_std", default-features = false, features = ["alloc", "no_std_net"] }
url = { git = "https://github.com/domenukk/rust-url", rev = "316c868", default-features = false, features = ["alloc", "no_std_net"] }
substrate-api-client = { git = "https://github.com/scs/substrate-api-client", branch = "polkadot-v0.9.42-tag-v0.14.0", default-features = false, features = ["sync-api"] }
substrate-client-keystore = { git = "https://github.com/scs/substrate-api-client.git", branch = "polkadot-v0.9.42-tag-v0.14.0" }

Expand Down
51 changes: 6 additions & 45 deletions tee-worker/bitacross/enclave-runtime/Cargo.lock

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

2 changes: 1 addition & 1 deletion tee-worker/bitacross/enclave-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
ipfs-unixfs = { default-features = false, git = "https://github.com/whalelephant/rust-ipfs", branch = "w-nstd" }
lazy_static = { version = "1.1.0", features = ["spin_no_std"] }
primitive-types = { version = "0.12.1", default-features = false, features = ["codec", "serde_no_std"] }
url = { git = "https://github.com/integritee-network/rust-url", branch = "sgx-no-std", default-features = false, features = ["alloc"] }
url = { git = "https://github.com/domenukk/rust-url", rev = "316c868", default-features = false, features = ["alloc", "no_std_net"] }

# scs / integritee
jsonrpc-core = { default-features = false, git = "https://github.com/scs/jsonrpc", branch = "no_std_v18" }
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/common/core/tls-websocket-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sp-core = { workspace = true, features = ["full_crypto"] }
[dev-dependencies]
env_logger = { workspace = true }
rustls = { workspace = true, features = ["dangerous_configuration"] }
url = { version = "2.0.0" } # no workspace dep
url = { version = "2.0.0" }

[features]
default = ["std"]
Expand Down
8 changes: 4 additions & 4 deletions tee-worker/identity/enclave-runtime/Cargo.lock

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

2 changes: 1 addition & 1 deletion tee-worker/identity/enclave-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
ipfs-unixfs = { default-features = false, git = "https://github.com/whalelephant/rust-ipfs", branch = "w-nstd" }
lazy_static = { version = "1.1.0", features = ["spin_no_std"] }
primitive-types = { version = "0.12.1", default-features = false, features = ["codec", "serde_no_std"] }
url = { git = "https://github.com/domenukk/rust-url", branch = "no_std", default-features = false, features = ["alloc", "no_std_net"] }
url = { git = "https://github.com/domenukk/rust-url", rev = "316c868", default-features = false, features = ["alloc", "no_std_net"] }

# scs / integritee
jsonrpc-core = { default-features = false, git = "https://github.com/scs/jsonrpc", branch = "no_std_v18" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ where
}

/// Sidechain peer block sync implementation.
#[allow(dead_code)]
pub struct PeerBlockSync<
ParentchainBlock,
SignedSidechainBlock,
Expand Down Expand Up @@ -218,9 +219,14 @@ where

// We confirm the successful block import. Only in this case, not when we're in
// on-boarding and importing blocks that were fetched from a peer.
if let Err(e) = self.import_confirmation_handler.confirm_import(sidechain_block.block().header(), &shard_identifier) {
error!("Failed to confirm sidechain block import: {:?}", e);
}
//
// Litentry: disable it for now, see P-1091
// the parachain storage is not updated upon shard migration, so submitting this extrinsic with new shard will fail.
// Additionally, confirmation of sidechain block import doesn't bring anything right now
//
// if let Err(e) = self.import_confirmation_handler.confirm_import(sidechain_block.block().header(), &shard_identifier) {
// error!("Failed to confirm sidechain block import: {:?}", e);
// }

Ok(latest_parentchain_header)
},
Expand Down

0 comments on commit 5608b36

Please sign in to comment.