From f92d4a00a5ebf530a2ff42d05c6423ad8e2be50b Mon Sep 17 00:00:00 2001 From: Preston Evans Date: Wed, 17 May 2023 17:56:39 -0500 Subject: [PATCH] Update for reorganized sov-sdk --- Cargo.toml | 2 +- src/celestia.rs | 2 +- src/da_service.rs | 10 +++++----- src/shares.rs | 6 +++--- src/types.rs | 2 +- src/verifier/address.rs | 2 +- src/verifier/mod.rs | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 406e261..34772a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ serde_json = "1" tokio = { version = "1", features = ["full"], optional = true } tracing = "0.1.37" -sovereign-core = { git = "https://github.com/Sovereign-Labs/sovereign.git", branch = "research" } +sovereign-core = { git = "https://github.com/Sovereign-Labs/sovereign.git", branch = "throwaway" } nmt-rs = { git = "https://github.com/Sovereign-Labs/nmt-rs.git", rev = "dd37588444fca72825d11fe4a46838f66525c49f", features = ["serde", "borsh"] } [dev-dependencies] diff --git a/src/celestia.rs b/src/celestia.rs index ff1c483..59314b8 100644 --- a/src/celestia.rs +++ b/src/celestia.rs @@ -5,7 +5,7 @@ use borsh::{BorshDeserialize, BorshSerialize}; use nmt_rs::NamespacedHash; use prost::{bytes::Buf, Message}; use serde::{Deserialize, Serialize}; -use sovereign_sdk::core::traits::{ +use sovereign_core::traits::{ AddressTrait as Address, BlockHeaderTrait as BlockHeader, CanonicalHash, }; pub use tendermint::block::Header as TendermintHeader; diff --git a/src/da_service.rs b/src/da_service.rs index b62a996..7c6d42b 100644 --- a/src/da_service.rs +++ b/src/da_service.rs @@ -5,7 +5,7 @@ use jsonrpsee::{ http_client::{HeaderMap, HttpClient}, }; use nmt_rs::NamespaceId; -use sovereign_sdk::services::da::DaService; +use sovereign_core::services::da::DaService; use tracing::{debug, info, span, Level}; // 0x736f762d74657374 = b"sov-test" @@ -209,7 +209,7 @@ impl DaService for CelestiaService { fn extract_relevant_txs( &self, block: Self::FilteredBlock, - ) -> Vec<::BlobTransaction> { + ) -> Vec<::BlobTransaction> { let mut output = Vec::new(); for blob in block.rollup_data.blobs() { let commitment = @@ -235,9 +235,9 @@ impl DaService for CelestiaService { &self, block: Self::FilteredBlock, ) -> ( - Vec<::BlobTransaction>, - ::InclusionMultiProof, - ::CompletenessProof, + Vec<::BlobTransaction>, + ::InclusionMultiProof, + ::CompletenessProof, ) { let relevant_txs = self.extract_relevant_txs(block.clone()); let etx_proofs = CorrectnessProof::for_block(&block, &relevant_txs); diff --git a/src/shares.rs b/src/shares.rs index 7046415..1c5b12a 100644 --- a/src/shares.rs +++ b/src/shares.rs @@ -9,8 +9,8 @@ use prost::{ DecodeError, }; use serde::{de::Error, Deserialize, Serialize}; -use sovereign_sdk::{ - core::crypto::hash::{sha2, Sha2Hash}, +use sovereign_core::{ + crypto::hash::{sha2, Sha2Hash}, Bytes, }; use tracing::error; @@ -80,7 +80,7 @@ impl<'de> Deserialize<'de> for Share { where D: serde::Deserializer<'de>, { - let mut share = ::deserialize(deserializer)?; + let mut share = ::deserialize(deserializer)?; if share.len() == B64_SHARE_SIZE { let mut decoded = BytesMut::with_capacity(SHARE_SIZE); unsafe { decoded.set_len(SHARE_SIZE) } diff --git a/src/types.rs b/src/types.rs index 943baf5..0fd635b 100644 --- a/src/types.rs +++ b/src/types.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use anyhow::ensure; use borsh::{BorshDeserialize, BorshSerialize}; use serde::{Deserialize, Serialize}; -use sovereign_sdk::{services::da::SlotData, Bytes}; +use sovereign_core::{services::da::SlotData, Bytes}; use tendermint::{crypto::default::Sha256, merkle}; pub use nmt_rs::NamespaceId; diff --git a/src/verifier/address.rs b/src/verifier/address.rs index ff2def2..f28963d 100644 --- a/src/verifier/address.rs +++ b/src/verifier/address.rs @@ -1,6 +1,6 @@ use borsh::{BorshDeserialize, BorshSerialize}; use serde::{Deserialize, Serialize}; -use sovereign_sdk::core::traits::AddressTrait; +use sovereign_core::traits::AddressTrait; use std::fmt::{Display, Formatter}; #[derive(Debug, PartialEq, Clone, Eq, Serialize, Deserialize, BorshDeserialize, BorshSerialize)] diff --git a/src/verifier/mod.rs b/src/verifier/mod.rs index 1a5c79b..5350e18 100644 --- a/src/verifier/mod.rs +++ b/src/verifier/mod.rs @@ -1,6 +1,6 @@ use nmt_rs::NamespaceId; use serde::{Deserialize, Serialize}; -use sovereign_sdk::{ +use sovereign_core::{ da::{self, BlobTransactionTrait, BlockHashTrait as BlockHash, DaSpec}, Bytes, };