Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Update for reorganized sov-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
preston-evans98 committed May 17, 2023
1 parent 26bcf30 commit f92d4a0
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/celestia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/da_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -209,7 +209,7 @@ impl DaService for CelestiaService {
fn extract_relevant_txs(
&self,
block: Self::FilteredBlock,
) -> Vec<<Self::Spec as sovereign_sdk::da::DaSpec>::BlobTransaction> {
) -> Vec<<Self::Spec as sovereign_core::da::DaSpec>::BlobTransaction> {
let mut output = Vec::new();
for blob in block.rollup_data.blobs() {
let commitment =
Expand All @@ -235,9 +235,9 @@ impl DaService for CelestiaService {
&self,
block: Self::FilteredBlock,
) -> (
Vec<<Self::Spec as sovereign_sdk::da::DaSpec>::BlobTransaction>,
<Self::Spec as sovereign_sdk::da::DaSpec>::InclusionMultiProof,
<Self::Spec as sovereign_sdk::da::DaSpec>::CompletenessProof,
Vec<<Self::Spec as sovereign_core::da::DaSpec>::BlobTransaction>,
<Self::Spec as sovereign_core::da::DaSpec>::InclusionMultiProof,
<Self::Spec as sovereign_core::da::DaSpec>::CompletenessProof,
) {
let relevant_txs = self.extract_relevant_txs(block.clone());
let etx_proofs = CorrectnessProof::for_block(&block, &relevant_txs);
Expand Down
6 changes: 3 additions & 3 deletions src/shares.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -80,7 +80,7 @@ impl<'de> Deserialize<'de> for Share {
where
D: serde::Deserializer<'de>,
{
let mut share = <sovereign_sdk::Bytes as Deserialize>::deserialize(deserializer)?;
let mut share = <sovereign_core::Bytes as Deserialize>::deserialize(deserializer)?;
if share.len() == B64_SHARE_SIZE {
let mut decoded = BytesMut::with_capacity(SHARE_SIZE);
unsafe { decoded.set_len(SHARE_SIZE) }
Expand Down
2 changes: 1 addition & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/verifier/address.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/verifier/mod.rs
Original file line number Diff line number Diff line change
@@ -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,
};
Expand Down

0 comments on commit f92d4a0

Please sign in to comment.