Skip to content

Commit

Permalink
Only use litentry-primitives in worker (#2939)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kailai-Wang authored Jul 29, 2024
1 parent a4bba37 commit 3d3c4c8
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 16 deletions.
1 change: 0 additions & 1 deletion bitacross-worker/Cargo.lock

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

1 change: 0 additions & 1 deletion bitacross-worker/enclave-runtime/Cargo.lock

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

4 changes: 1 addition & 3 deletions bitacross-worker/litentry/core/direct-call/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ bc-signer-registry = { path = "../../../bitacross/core/bc-signer-registry", defa
itp-sgx-crypto = { path = "../../../core-primitives/sgx/crypto", default-features = false }
itp-stf-primitives = { path = "../../../core-primitives/stf-primitives", default-features = false }
litentry-primitives = { path = "../../primitives", default-features = false }
parentchain-primitives = { package = "core-primitives", path = "../../../../primitives/core", default-features = false }

log = { version = "0.4", default-features = false }

Expand All @@ -33,7 +32,7 @@ itp-sgx-crypto = { path = "../../../core-primitives/sgx/crypto", features = ["mo
[features]
default = ["std"]
development = [
"parentchain-primitives/development",
"litentry-primitives/development",
]
sgx = [
"sgx_tstd",
Expand All @@ -54,7 +53,6 @@ std = [
"litentry-primitives/std",
"sp-core/std",
"sp-io/std",
"parentchain-primitives/std",
]
test = [
"itp-sgx-crypto/mocks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use bc_enclave_registry::EnclaveRegistryLookup;
use bc_musig2_ceremony::CeremonyCommand;
use codec::Encode;
use parentchain_primitives::Identity;
use litentry_primitives::Identity;

#[derive(Encode, Debug)]
pub enum KillCeremonyError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use crate::handler::nonce_share::NonceShareError::InvalidSigner;
use bc_enclave_registry::EnclaveRegistryLookup;
use bc_musig2_ceremony::{CeremonyCommand, CeremonyId, PubNonce};
use codec::Encode;
use litentry_primitives::Identity;
use log::debug;
use parentchain_primitives::Identity;
use std::sync::Arc;

#[derive(Encode, Debug)]
Expand Down Expand Up @@ -59,7 +59,7 @@ pub mod test {
use bc_enclave_registry::{EnclaveRegistry, EnclaveRegistryUpdater};
use bc_musig2_ceremony::SignBitcoinPayload;
use itp_sgx_crypto::{key_repository::AccessKey, schnorr::Pair as SchnorrPair, Error};
use parentchain_primitives::Identity;
use litentry_primitives::Identity;
use sp_core::{sr25519, Pair};

struct SignerAccess {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use crate::handler::partial_signature_share::PartialSignatureShareError::Invalid
use bc_enclave_registry::EnclaveRegistryLookup;
use bc_musig2_ceremony::{CeremonyCommand, CeremonyId, PartialSignature};
use codec::Encode;
use litentry_primitives::Identity;
use log::debug;
use parentchain_primitives::Identity;
use std::sync::Arc;

#[derive(Encode, Debug)]
Expand Down Expand Up @@ -60,7 +60,7 @@ pub mod test {
use bc_enclave_registry::{EnclaveRegistry, EnclaveRegistryUpdater};
use bc_musig2_ceremony::SignBitcoinPayload;
use itp_sgx_crypto::{key_repository::AccessKey, schnorr::Pair as SchnorrPair, Error};
use parentchain_primitives::Identity;
use litentry_primitives::Identity;
use sp_core::{sr25519, Pair};

struct SignerAccess {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use bc_musig2_ceremony::{CeremonyCommand, PublicKey, SignBitcoinPayload, Signers
use bc_relayer_registry::RelayerRegistryLookup;
use bc_signer_registry::SignerRegistryLookup;
use codec::Encode;
use parentchain_primitives::Identity;
use litentry_primitives::Identity;
use std::sync::Arc;

#[derive(Encode, Debug)]
Expand Down Expand Up @@ -68,7 +68,7 @@ pub mod test {
use bc_relayer_registry::{RelayerRegistry, RelayerRegistryUpdater};
use bc_signer_registry::{PubKey, SignerRegistryLookup};
use itp_sgx_crypto::{key_repository::AccessKey, schnorr::Pair as SchnorrPair, Error};
use parentchain_primitives::{Address32, Identity};
use litentry_primitives::{Address32, Identity};
use sp_core::{sr25519, Pair};

struct SignersRegistryMock {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use crate::PrehashedEthereumMessage;
use bc_relayer_registry::RelayerRegistryLookup;
use codec::Encode;
use itp_sgx_crypto::{ecdsa::Pair, key_repository::AccessKey};
use litentry_primitives::Identity;
use log::error;
use parentchain_primitives::Identity;

#[derive(Encode, Debug)]
pub enum SignEthereumError {
Expand Down Expand Up @@ -54,7 +54,7 @@ pub mod test {
use bc_relayer_registry::{RelayerRegistry, RelayerRegistryUpdater};
use itp_sgx_crypto::{ecdsa::Pair as EcdsaPair, mocks::KeyRepositoryMock};
use k256::{ecdsa::SigningKey, elliptic_curve::rand_core};
use parentchain_primitives::Identity;
use litentry_primitives::Identity;
use sp_core::{sr25519, Pair};

#[test]
Expand Down
3 changes: 1 addition & 2 deletions bitacross-worker/litentry/core/direct-call/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ extern crate sgx_tstd as std;
use bc_musig2_ceremony::SignBitcoinPayload;
use codec::{Decode, Encode};
use itp_stf_primitives::types::KeyPair;
use litentry_primitives::{LitentryMultiSignature, RequestAesKey, ShardIdentifier};
use parentchain_primitives::Identity;
use litentry_primitives::{Identity, LitentryMultiSignature, RequestAesKey, ShardIdentifier};
use sp_io::hashing::blake2_256;

pub mod handler;
Expand Down

0 comments on commit 3d3c4c8

Please sign in to comment.