Skip to content

Commit

Permalink
chore!: Use tendermint-rs instead of celestia-tendermint-rs fork
Browse files Browse the repository at this point in the history
  • Loading branch information
oblique committed Nov 11, 2024
1 parent 89450ce commit 09eff5a
Show file tree
Hide file tree
Showing 76 changed files with 1,366 additions and 449 deletions.
152 changes: 67 additions & 85 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ lumina-node-wasm = { version = "0.6.1", path = "node-wasm" }
celestia-proto = { version = "0.5.0", path = "proto" }
celestia-rpc = { version = "0.7.1", path = "rpc", default-features = false }
celestia-types = { version = "0.8.0", path = "types", default-features = false }
celestia-tendermint = { version = "0.32.2", default-features = false }
celestia-tendermint-proto = "0.32.2"

libp2p = "0.54.0"
nmt-rs = "0.2.1"
prost = "0.12.6"
prost = "0.13.3"
tendermint = { version = "0.40.0", default-features = false }
tendermint-proto = "0.40.0"

[patch.crates-io]
# Uncomment to apply local changes
Expand Down
2 changes: 1 addition & 1 deletion node-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ crate-type = ["cdylib", "rlib"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
blockstore = { workspace = true }
celestia-tendermint = { workspace = true }
celestia-types = { workspace = true }
libp2p = { workspace = true, features = ["serde"] }
lumina-node = { workspace = true }
tendermint = { workspace = true }

anyhow = "1.0.86"
console_error_panic_hook = "0.1.7"
Expand Down
2 changes: 1 addition & 1 deletion node-wasm/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ from_js_value! {

from_display! {
blockstore::Error,
celestia_tendermint::error::Error,
tendermint::error::Error,
libp2p::identity::ParseError,
libp2p::multiaddr::Error,
lumina_node::node::NodeError,
Expand Down
4 changes: 2 additions & 2 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ categories = [

[dependencies]
celestia-proto = { workspace = true }
celestia-tendermint = { workspace = true }
celestia-tendermint-proto = { workspace = true }
celestia-types = { workspace = true }
libp2p = { workspace = true, features = [
"autonat",
Expand All @@ -32,6 +30,8 @@ libp2p = { workspace = true, features = [
"request-response",
"kad",
] }
tendermint = { workspace = true }
tendermint-proto = { workspace = true }

async-trait = "0.1.80"
beetswap = "0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion node/src/daser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ use std::cmp::min;
use std::collections::HashSet;
use std::sync::Arc;

use celestia_tendermint::Time;
use futures::future::BoxFuture;
use futures::stream::FuturesUnordered;
use futures::{FutureExt, StreamExt};
use rand::Rng;
use tendermint::Time;
use tokio::select;
use tokio_util::sync::CancellationToken;
use tracing::{debug, error, warn};
Expand Down
6 changes: 3 additions & 3 deletions node/src/p2p.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use std::time::Duration;

use blockstore::Blockstore;
use celestia_proto::p2p::pb::{header_request, HeaderRequest};
use celestia_tendermint_proto::Protobuf;
use celestia_types::nmt::{Namespace, NamespacedSha2Hasher};
use celestia_types::row::{Row, RowId};
use celestia_types::row_namespace_data::{RowNamespaceData, RowNamespaceDataId};
Expand All @@ -48,6 +47,7 @@ use libp2p::{
Multiaddr, PeerId,
};
use smallvec::SmallVec;
use tendermint_proto::Protobuf;
use tokio::select;
use tokio::sync::{mpsc, oneshot, watch};
use tokio_util::sync::CancellationToken;
Expand Down Expand Up @@ -131,7 +131,7 @@ pub enum P2pError {

/// ProtoBuf message failed to be decoded.
#[error("ProtoBuf decoding error: {0}")]
ProtoDecodeFailed(#[from] celestia_tendermint_proto::Error),
ProtoDecodeFailed(#[from] tendermint_proto::Error),

/// An error propagated from [`celestia_types`] that is related to [`Cid`].
#[error("CID error: {0}")]
Expand Down Expand Up @@ -182,7 +182,7 @@ impl From<oneshot::error::RecvError> for P2pError {

impl From<prost::DecodeError> for P2pError {
fn from(value: prost::DecodeError) -> Self {
P2pError::ProtoDecodeFailed(celestia_tendermint_proto::Error::decode_message(value))
P2pError::ProtoDecodeFailed(tendermint_proto::Error::decode_message(value))
}
}

Expand Down
Loading

0 comments on commit 09eff5a

Please sign in to comment.