From 8f12ea8c70aba1ba7a06a203bd4ae9abca722f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Zwoli=C5=84ski?= Date: Tue, 9 Jan 2024 13:36:58 +0100 Subject: [PATCH] fix: align importing of celestia_tendermint_proto in celestia_tendermint --- .github/workflows/test.yml | 4 ++-- proto/src/prelude.rs | 1 + tendermint/src/abci/event.rs | 8 ++++---- tendermint/src/abci/request/info.rs | 8 ++++---- tendermint/src/abci/request/prepare_proposal.rs | 4 ++-- tendermint/src/abci/request/process_proposal.rs | 4 ++-- tendermint/src/abci/request/set_option.rs | 4 ++-- tendermint/src/abci/response/info.rs | 2 +- tendermint/src/abci/response/prepare_proposal.rs | 4 ++-- tendermint/src/abci/response/process_proposal.rs | 4 ++-- tendermint/src/abci/response/set_option.rs | 4 ++-- tendermint/src/abci/types.rs | 8 ++++---- tendermint/src/account.rs | 2 +- tendermint/src/block.rs | 6 +++--- tendermint/src/block/commit.rs | 2 +- tendermint/src/block/data.rs | 6 +++--- tendermint/src/block/header.rs | 6 +++--- tendermint/src/block/height.rs | 2 +- tendermint/src/block/id.rs | 2 +- tendermint/src/block/meta.rs | 2 +- tendermint/src/block/parts.rs | 2 +- tendermint/src/block/signed_header.rs | 2 +- tendermint/src/block/size.rs | 8 ++++---- tendermint/src/chain/id.rs | 2 +- tendermint/src/consensus/params.rs | 8 ++++---- tendermint/src/consensus/state.rs | 2 +- tendermint/src/evidence.rs | 4 ++-- tendermint/src/hash.rs | 2 +- tendermint/src/merkle/proof.rs | 2 +- tendermint/src/proposal.rs | 4 ++-- tendermint/src/proposal/msg_type.rs | 2 +- tendermint/src/proposal/sign_proposal.rs | 2 +- tendermint/src/proto_macros.rs | 8 ++++---- tendermint/src/serializers.rs | 2 +- tendermint/src/signature.rs | 2 +- tendermint/src/time.rs | 2 +- tendermint/src/tx/proof.rs | 4 ++-- tendermint/src/v0_34/abci/request.rs | 4 ++-- tendermint/src/v0_34/abci/response.rs | 4 ++-- tendermint/src/v0_37/abci/request.rs | 4 ++-- tendermint/src/v0_37/abci/response.rs | 4 ++-- tendermint/src/validator.rs | 4 ++-- tendermint/src/vote.rs | 4 ++-- tendermint/src/vote/canonical_vote.rs | 4 ++-- tendermint/src/vote/sign_vote.rs | 2 +- 45 files changed, 86 insertions(+), 85 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 385b1ce50..18019f5dc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test-all-features - args: -p tendermint + args: -p celestia-tendermint # tendermint-rpc: # runs-on: ubuntu-latest @@ -70,7 +70,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test-all-features - args: -p tendermint-proto + args: -p celestia-tendermint-proto # tendermint-light-client: # runs-on: ubuntu-latest diff --git a/proto/src/prelude.rs b/proto/src/prelude.rs index aa9a20b65..8fb402687 100644 --- a/proto/src/prelude.rs +++ b/proto/src/prelude.rs @@ -1,5 +1,6 @@ // Re-export according to alloc::prelude::v1 because it is not yet stabilized // https://doc.rust-lang.org/src/alloc/prelude/v1.rs.html +#[allow(unused)] pub use alloc::{ borrow::ToOwned, boxed::Box, diff --git a/tendermint/src/abci/event.rs b/tendermint/src/abci/event.rs index 38b9352c7..98fb3a321 100644 --- a/tendermint/src/abci/event.rs +++ b/tendermint/src/abci/event.rs @@ -202,8 +202,8 @@ mod v0_34 { use crate::prelude::*; use core::convert::{TryFrom, TryInto}; - use tendermint_proto::v0_34::abci as pb; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_34::abci as pb; + use celestia_tendermint_proto::Protobuf; impl From for pb::EventAttribute { fn from(event: EventAttribute) -> Self { @@ -264,8 +264,8 @@ mod v0_37 { use crate::prelude::*; use core::convert::{TryFrom, TryInto}; - use tendermint_proto::v0_37::abci as pb; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_37::abci as pb; + use celestia_tendermint_proto::Protobuf; impl From for pb::EventAttribute { fn from(event: EventAttribute) -> Self { diff --git a/tendermint/src/abci/request/info.rs b/tendermint/src/abci/request/info.rs index f9be161b6..874f5749f 100644 --- a/tendermint/src/abci/request/info.rs +++ b/tendermint/src/abci/request/info.rs @@ -19,8 +19,8 @@ pub struct Info { mod v0_34 { use super::Info; - use tendermint_proto::v0_34::abci as pb; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_34::abci as pb; + use celestia_tendermint_proto::Protobuf; impl From for pb::RequestInfo { fn from(info: Info) -> Self { @@ -50,8 +50,8 @@ mod v0_34 { mod v0_37 { use super::Info; - use tendermint_proto::v0_37::abci as pb; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_37::abci as pb; + use celestia_tendermint_proto::Protobuf; impl From for pb::RequestInfo { fn from(info: Info) -> Self { diff --git a/tendermint/src/abci/request/prepare_proposal.rs b/tendermint/src/abci/request/prepare_proposal.rs index 8928e2d32..3eb6b981a 100644 --- a/tendermint/src/abci/request/prepare_proposal.rs +++ b/tendermint/src/abci/request/prepare_proposal.rs @@ -15,8 +15,8 @@ pub struct PrepareProposal { mod v0_34 { use super::PrepareProposal; use crate::{prelude::*, Error}; - use tendermint_proto::v0_34::abci as pb; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_34::abci as pb; + use celestia_tendermint_proto::Protobuf; impl From for pb::RequestPrepareProposal { fn from(value: PrepareProposal) -> Self { diff --git a/tendermint/src/abci/request/process_proposal.rs b/tendermint/src/abci/request/process_proposal.rs index 088fe09eb..ab02c3108 100644 --- a/tendermint/src/abci/request/process_proposal.rs +++ b/tendermint/src/abci/request/process_proposal.rs @@ -15,8 +15,8 @@ pub struct ProcessProposal { mod v0_34 { use super::ProcessProposal; use crate::{prelude::*, Error}; - use tendermint_proto::v0_34::abci as pb; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_34::abci as pb; + use celestia_tendermint_proto::Protobuf; impl From for pb::RequestProcessProposal { fn from(value: ProcessProposal) -> Self { diff --git a/tendermint/src/abci/request/set_option.rs b/tendermint/src/abci/request/set_option.rs index 3f2f5397c..74820cfb2 100644 --- a/tendermint/src/abci/request/set_option.rs +++ b/tendermint/src/abci/request/set_option.rs @@ -13,8 +13,8 @@ pub struct SetOption { // The SetOption request has been removed after 0.34. -use tendermint_proto::v0_34::abci as pb; -use tendermint_proto::Protobuf; +use celestia_tendermint_proto::v0_34::abci as pb; +use celestia_tendermint_proto::Protobuf; impl From for pb::RequestSetOption { fn from(message: SetOption) -> Self { diff --git a/tendermint/src/abci/response/info.rs b/tendermint/src/abci/response/info.rs index af2b98cea..6ce76a101 100644 --- a/tendermint/src/abci/response/info.rs +++ b/tendermint/src/abci/response/info.rs @@ -1,5 +1,5 @@ use crate::{block, prelude::*, AppHash}; -use tendermint_proto::v0_37::abci as pb; +use celestia_tendermint_proto::v0_37::abci as pb; use serde::{Deserialize, Serialize}; diff --git a/tendermint/src/abci/response/prepare_proposal.rs b/tendermint/src/abci/response/prepare_proposal.rs index fc7b7b10f..0674f6fd2 100644 --- a/tendermint/src/abci/response/prepare_proposal.rs +++ b/tendermint/src/abci/response/prepare_proposal.rs @@ -14,8 +14,8 @@ pub struct PrepareProposal { mod v0_34 { use super::PrepareProposal; use crate::{prelude::*, Error}; - use tendermint_proto::v0_34::abci as pb; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_34::abci as pb; + use celestia_tendermint_proto::Protobuf; impl From for pb::ResponsePrepareProposal { fn from(value: PrepareProposal) -> Self { diff --git a/tendermint/src/abci/response/process_proposal.rs b/tendermint/src/abci/response/process_proposal.rs index 8685e1ca6..d58a41786 100644 --- a/tendermint/src/abci/response/process_proposal.rs +++ b/tendermint/src/abci/response/process_proposal.rs @@ -26,8 +26,8 @@ pub enum ProcessProposalResult { mod v0_34 { use super::{ProcessProposal, ProcessProposalResult}; use crate::Error; - use tendermint_proto::v0_34::abci as pb; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_34::abci as pb; + use celestia_tendermint_proto::Protobuf; impl From for pb::ResponseProcessProposal { fn from(value: ProcessProposal) -> pb::ResponseProcessProposal { diff --git a/tendermint/src/abci/response/set_option.rs b/tendermint/src/abci/response/set_option.rs index 98399dbb1..2f44ede3d 100644 --- a/tendermint/src/abci/response/set_option.rs +++ b/tendermint/src/abci/response/set_option.rs @@ -15,8 +15,8 @@ pub struct SetOption { // The SetOption request has been removed after 0.34. -use tendermint_proto::v0_34::abci as pb; -use tendermint_proto::Protobuf; +use celestia_tendermint_proto::v0_34::abci as pb; +use celestia_tendermint_proto::Protobuf; impl From for pb::ResponseSetOption { fn from(message: SetOption) -> Self { diff --git a/tendermint/src/abci/types.rs b/tendermint/src/abci/types.rs index f3abf5dca..15badba01 100644 --- a/tendermint/src/abci/types.rs +++ b/tendermint/src/abci/types.rs @@ -121,8 +121,8 @@ pub struct Snapshot { mod v0_34 { use super::{CommitInfo, Misbehavior, MisbehaviorKind, Snapshot, Validator, VoteInfo}; use crate::{prelude::*, Error}; - use tendermint_proto::v0_34::abci as pb; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_34::abci as pb; + use celestia_tendermint_proto::Protobuf; use bytes::Bytes; @@ -280,8 +280,8 @@ mod v0_34 { mod v0_37 { use super::{CommitInfo, Misbehavior, MisbehaviorKind, Snapshot, Validator, VoteInfo}; use crate::{prelude::*, Error}; - use tendermint_proto::v0_37::abci as pb; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_37::abci as pb; + use celestia_tendermint_proto::Protobuf; use bytes::Bytes; diff --git a/tendermint/src/account.rs b/tendermint/src/account.rs index 677038326..cf6af2b17 100644 --- a/tendermint/src/account.rs +++ b/tendermint/src/account.rs @@ -11,7 +11,7 @@ use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use subtle::{self, ConstantTimeEq}; use subtle_encoding::hex; -use tendermint_proto::Protobuf; +use celestia_tendermint_proto::Protobuf; use crate::serializers::cow_str::CowStr; use crate::{error::Error, prelude::*}; diff --git a/tendermint/src/block.rs b/tendermint/src/block.rs index bf352adbe..5a43e0770 100644 --- a/tendermint/src/block.rs +++ b/tendermint/src/block.rs @@ -12,8 +12,8 @@ mod round; pub mod signed_header; mod size; +use celestia_tendermint_proto::v0_34::types::Block as RawBlock; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_34::types::Block as RawBlock; pub use self::{ commit::*, @@ -53,8 +53,8 @@ pub struct Block { mod v0_34 { use super::{Block, Commit, Header}; use crate::{prelude::*, Error}; - use tendermint_proto::v0_34::types::Block as RawBlock; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_34::types::Block as RawBlock; + use celestia_tendermint_proto::Protobuf; impl Protobuf for Block {} diff --git a/tendermint/src/block/commit.rs b/tendermint/src/block/commit.rs index 2a14e5bc0..440d4ae75 100644 --- a/tendermint/src/block/commit.rs +++ b/tendermint/src/block/commit.rs @@ -1,7 +1,7 @@ //! Commits to a Tendermint blockchain +use celestia_tendermint_proto::v0_37::types::Commit as RawCommit; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::types::Commit as RawCommit; use crate::{ block::{commit_sig::CommitSig, Height, Id, Round}, diff --git a/tendermint/src/block/data.rs b/tendermint/src/block/data.rs index 59430a3fb..2636293d8 100644 --- a/tendermint/src/block/data.rs +++ b/tendermint/src/block/data.rs @@ -1,5 +1,5 @@ +use celestia_tendermint_proto::v0_34::types::Data as RawData; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_34::types::Data as RawData; use crate::prelude::*; @@ -15,8 +15,8 @@ pub struct Data { mod v0_34 { use super::Data; use crate::{prelude::*, Error}; - use tendermint_proto::v0_34::types::Data as RawData; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_34::types::Data as RawData; + use celestia_tendermint_proto::Protobuf; impl Protobuf for Data {} diff --git a/tendermint/src/block/header.rs b/tendermint/src/block/header.rs index 31d376b68..baf40d7fb 100644 --- a/tendermint/src/block/header.rs +++ b/tendermint/src/block/header.rs @@ -1,11 +1,11 @@ //! Block headers -use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::{ +use celestia_tendermint_proto::v0_37::{ types::{BlockId as RawBlockId, Header as RawHeader}, version::Consensus as RawConsensusVersion, }; -use tendermint_proto::Protobuf; +use celestia_tendermint_proto::Protobuf; +use serde::{Deserialize, Serialize}; use crate::{ account, block, chain, diff --git a/tendermint/src/block/height.rs b/tendermint/src/block/height.rs index cc98cc22d..ddcccb69e 100644 --- a/tendermint/src/block/height.rs +++ b/tendermint/src/block/height.rs @@ -4,8 +4,8 @@ use core::{ str::FromStr, }; +use celestia_tendermint_proto::Protobuf; use serde::{de::Error as _, Deserialize, Deserializer, Serialize, Serializer}; -use tendermint_proto::Protobuf; use crate::serializers::cow_str::CowStr; use crate::{error::Error, prelude::*}; diff --git a/tendermint/src/block/id.rs b/tendermint/src/block/id.rs index c88f7a1a4..cd8c52471 100644 --- a/tendermint/src/block/id.rs +++ b/tendermint/src/block/id.rs @@ -3,8 +3,8 @@ use core::{ str::{self, FromStr}, }; +use celestia_tendermint_proto::v0_37::types::BlockId as RawBlockId; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::types::BlockId as RawBlockId; use crate::{ block::parts::Header as PartSetHeader, diff --git a/tendermint/src/block/meta.rs b/tendermint/src/block/meta.rs index 4dbed2cdb..3165b32a5 100644 --- a/tendermint/src/block/meta.rs +++ b/tendermint/src/block/meta.rs @@ -1,7 +1,7 @@ //! Block metadata +use celestia_tendermint_proto::v0_37::types::BlockMeta as RawMeta; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::types::BlockMeta as RawMeta; use super::{Header, Id}; use crate::prelude::*; diff --git a/tendermint/src/block/parts.rs b/tendermint/src/block/parts.rs index 7635034f4..1bffdef64 100644 --- a/tendermint/src/block/parts.rs +++ b/tendermint/src/block/parts.rs @@ -1,7 +1,7 @@ //! Block parts +use celestia_tendermint_proto::v0_37::types::PartSetHeader as RawPartSetHeader; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::types::PartSetHeader as RawPartSetHeader; use crate::{error::Error, prelude::*, Hash}; diff --git a/tendermint/src/block/signed_header.rs b/tendermint/src/block/signed_header.rs index 4cd852920..c2858f316 100644 --- a/tendermint/src/block/signed_header.rs +++ b/tendermint/src/block/signed_header.rs @@ -2,8 +2,8 @@ //! It is what the rpc endpoint /commit returns and hence can be used by a //! light client. +use celestia_tendermint_proto::v0_37::types::SignedHeader as RawSignedHeader; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::types::SignedHeader as RawSignedHeader; use crate::{block, Error}; diff --git a/tendermint/src/block/size.rs b/tendermint/src/block/size.rs index 52204eec5..4d8a52637 100644 --- a/tendermint/src/block/size.rs +++ b/tendermint/src/block/size.rs @@ -30,10 +30,10 @@ impl Size { mod v0_34 { use super::Size; use crate::error::Error; - use tendermint_proto::v0_34::{ + use celestia_tendermint_proto::v0_34::{ abci::BlockParams as RawAbciSize, types::BlockParams as RawSize, }; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::Protobuf; impl Protobuf for Size {} @@ -94,8 +94,8 @@ mod v0_34 { mod v0_37 { use super::Size; use crate::error::Error; - use tendermint_proto::v0_37::types::BlockParams as RawSize; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::v0_37::types::BlockParams as RawSize; + use celestia_tendermint_proto::Protobuf; impl Protobuf for Size {} diff --git a/tendermint/src/chain/id.rs b/tendermint/src/chain/id.rs index a2807e987..2b0aa13a1 100644 --- a/tendermint/src/chain/id.rs +++ b/tendermint/src/chain/id.rs @@ -8,8 +8,8 @@ use core::{ str::{self, FromStr}, }; +use celestia_tendermint_proto::Protobuf; use serde::{de::Error as _, Deserialize, Deserializer, Serialize, Serializer}; -use tendermint_proto::Protobuf; use crate::serializers::cow_str::CowStr; use crate::{error::Error, prelude::*}; diff --git a/tendermint/src/consensus/params.rs b/tendermint/src/consensus/params.rs index ac6295c60..57d935bf7 100644 --- a/tendermint/src/consensus/params.rs +++ b/tendermint/src/consensus/params.rs @@ -55,14 +55,14 @@ fn key_type(s: &str) -> public_key::Algorithm { } mod v0_34 { - use tendermint_proto::v0_34::{ + use celestia_tendermint_proto::v0_34::{ abci::ConsensusParams as RawAbciParams, types::{ ConsensusParams as RawParams, ValidatorParams as RawValidatorParams, VersionParams as RawVersionParams, }, }; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::Protobuf; use super::{key_type, Params, ValidatorParams, VersionParams}; use crate::{error::Error, prelude::*, public_key}; @@ -186,11 +186,11 @@ mod v0_34 { } mod v0_37 { - use tendermint_proto::v0_37::types::{ + use celestia_tendermint_proto::v0_37::types::{ ConsensusParams as RawParams, ValidatorParams as RawValidatorParams, VersionParams as RawVersionParams, }; - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::Protobuf; use super::{key_type, Params, ValidatorParams, VersionParams}; use crate::{error::Error, prelude::*, public_key}; diff --git a/tendermint/src/consensus/state.rs b/tendermint/src/consensus/state.rs index 658f99ba1..4ca3ddbe5 100644 --- a/tendermint/src/consensus/state.rs +++ b/tendermint/src/consensus/state.rs @@ -26,7 +26,7 @@ pub struct State { pub step: i8, /// Block ID being proposed (if available) - #[serde(with = "tendermint_proto::serializers::optional")] + #[serde(with = "celestia_tendermint_proto::serializers::optional")] pub block_id: Option, } diff --git a/tendermint/src/evidence.rs b/tendermint/src/evidence.rs index 8476fc7aa..d42fc767a 100644 --- a/tendermint/src/evidence.rs +++ b/tendermint/src/evidence.rs @@ -5,9 +5,9 @@ use core::{ slice, }; +use celestia_tendermint_proto::google::protobuf::Duration as RawDuration; +use celestia_tendermint_proto::Protobuf; use serde::{Deserialize, Serialize}; -use tendermint_proto::google::protobuf::Duration as RawDuration; -use tendermint_proto::Protobuf; use crate::{ block::{signed_header::SignedHeader, Height}, diff --git a/tendermint/src/hash.rs b/tendermint/src/hash.rs index 147c8ddcd..1787b25b8 100644 --- a/tendermint/src/hash.rs +++ b/tendermint/src/hash.rs @@ -7,9 +7,9 @@ use core::{ }; use bytes::Bytes; +use celestia_tendermint_proto::Protobuf; use serde::{de::Error as _, Deserialize, Deserializer, Serialize, Serializer}; use subtle_encoding::{Encoding, Hex}; -use tendermint_proto::Protobuf; use crate::serializers::cow_str::CowStr; use crate::{error::Error, prelude::*}; diff --git a/tendermint/src/merkle/proof.rs b/tendermint/src/merkle/proof.rs index 903c1471c..d78489080 100644 --- a/tendermint/src/merkle/proof.rs +++ b/tendermint/src/merkle/proof.rs @@ -1,7 +1,7 @@ //! Merkle proofs +use celestia_tendermint_proto::v0_37::crypto::Proof as RawProof; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::crypto::Proof as RawProof; use crate::{prelude::*, serializers, Hash}; diff --git a/tendermint/src/proposal.rs b/tendermint/src/proposal.rs index 9d0700639..97d9069b6 100644 --- a/tendermint/src/proposal.rs +++ b/tendermint/src/proposal.rs @@ -7,10 +7,10 @@ mod sign_proposal; use core::convert::Infallible; use bytes::BufMut; +use celestia_tendermint_proto::v0_37::types::CanonicalProposal as RawCanonicalProposal; +use celestia_tendermint_proto::{Error as ProtobufError, Protobuf}; pub use msg_type::Type; pub use sign_proposal::{SignProposalRequest, SignedProposalResponse}; -use tendermint_proto::v0_37::types::CanonicalProposal as RawCanonicalProposal; -use tendermint_proto::{Error as ProtobufError, Protobuf}; pub use self::canonical_proposal::CanonicalProposal; use crate::{ diff --git a/tendermint/src/proposal/msg_type.rs b/tendermint/src/proposal/msg_type.rs index 08ff88efc..ac0f961b1 100644 --- a/tendermint/src/proposal/msg_type.rs +++ b/tendermint/src/proposal/msg_type.rs @@ -1,7 +1,7 @@ use core::convert::TryFrom; +use celestia_tendermint_proto::Protobuf; use serde::{de::Error as _, Deserialize, Deserializer, Serialize, Serializer}; -use tendermint_proto::Protobuf; use crate::{error::Error, prelude::*}; diff --git a/tendermint/src/proposal/sign_proposal.rs b/tendermint/src/proposal/sign_proposal.rs index fb4f0ff21..9e7401c83 100644 --- a/tendermint/src/proposal/sign_proposal.rs +++ b/tendermint/src/proposal/sign_proposal.rs @@ -1,5 +1,5 @@ use bytes::BufMut; -use tendermint_proto::Error as ProtobufError; +use celestia_tendermint_proto::Error as ProtobufError; use super::Proposal; use crate::{chain::Id as ChainId, prelude::*, privval::RemoteSignerError}; diff --git a/tendermint/src/proto_macros.rs b/tendermint/src/proto_macros.rs index 49948a02b..1dc3a05d2 100644 --- a/tendermint/src/proto_macros.rs +++ b/tendermint/src/proto_macros.rs @@ -5,16 +5,16 @@ macro_rules! tendermint_pb_modules { $($contents:item)* } => { mod v0_34 { - use tendermint_proto::v0_34 as pb; + use celestia_tendermint_proto::v0_34 as pb; #[allow(unused_imports)] - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::Protobuf; $($contents)* } mod v0_37 { - use tendermint_proto::v0_37 as pb; + use celestia_tendermint_proto::v0_37 as pb; #[allow(unused_imports)] - use tendermint_proto::Protobuf; + use celestia_tendermint_proto::Protobuf; $($contents)* } diff --git a/tendermint/src/serializers.rs b/tendermint/src/serializers.rs index 8a0efc8b9..74fd09b1b 100644 --- a/tendermint/src/serializers.rs +++ b/tendermint/src/serializers.rs @@ -5,7 +5,7 @@ //! CAUTION: There are no guarantees for backwards compatibility, this module should be considered //! an internal implementation detail which can vanish without further warning. Use at your own //! risk. -pub use tendermint_proto::serializers::*; +pub use celestia_tendermint_proto::serializers::*; pub mod apphash; pub mod hash; diff --git a/tendermint/src/signature.rs b/tendermint/src/signature.rs index e95b0a892..da928df17 100644 --- a/tendermint/src/signature.rs +++ b/tendermint/src/signature.rs @@ -4,7 +4,7 @@ pub use ed25519::Signature as Ed25519Signature; #[cfg(feature = "secp256k1")] pub use k256::ecdsa::Signature as Secp256k1Signature; -use tendermint_proto::Protobuf; +use celestia_tendermint_proto::Protobuf; use crate::{error::Error, prelude::*}; diff --git a/tendermint/src/time.rs b/tendermint/src/time.rs index cf026f901..e1e69edb8 100644 --- a/tendermint/src/time.rs +++ b/tendermint/src/time.rs @@ -8,10 +8,10 @@ use core::{ time::Duration, }; +use celestia_tendermint_proto::{google::protobuf::Timestamp, serializers::timestamp, Protobuf}; #[cfg(all(feature = "clock", target_arch = "wasm32", feature = "wasm-bindgen"))] use instant::SystemTime; use serde::{Deserialize, Serialize}; -use tendermint_proto::{google::protobuf::Timestamp, serializers::timestamp, Protobuf}; use time::{ format_description::well_known::Rfc3339, macros::{datetime, offset}, diff --git a/tendermint/src/tx/proof.rs b/tendermint/src/tx/proof.rs index 98af54590..9d7a892d5 100644 --- a/tendermint/src/tx/proof.rs +++ b/tendermint/src/tx/proof.rs @@ -1,6 +1,6 @@ +use celestia_tendermint_proto::v0_37::types::TxProof as RawTxProof; +use celestia_tendermint_proto::Protobuf; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::types::TxProof as RawTxProof; -use tendermint_proto::Protobuf; use crate::{merkle, prelude::*, Error, Hash}; diff --git a/tendermint/src/v0_34/abci/request.rs b/tendermint/src/v0_34/abci/request.rs index ea6699546..54d93df11 100644 --- a/tendermint/src/v0_34/abci/request.rs +++ b/tendermint/src/v0_34/abci/request.rs @@ -1,5 +1,5 @@ -use tendermint_proto::v0_34::abci as pb; -use tendermint_proto::Protobuf; +use celestia_tendermint_proto::v0_34::abci as pb; +use celestia_tendermint_proto::Protobuf; use crate::abci::request::{ConsensusRequest, InfoRequest, MempoolRequest, SnapshotRequest}; use crate::abci::MethodKind; diff --git a/tendermint/src/v0_34/abci/response.rs b/tendermint/src/v0_34/abci/response.rs index 8b6719e84..dbd1791d1 100644 --- a/tendermint/src/v0_34/abci/response.rs +++ b/tendermint/src/v0_34/abci/response.rs @@ -147,8 +147,8 @@ impl TryFrom for SnapshotResponse { // Protobuf conversions // ============================================================================= -use tendermint_proto::v0_34::abci as pb; -use tendermint_proto::Protobuf; +use celestia_tendermint_proto::v0_34::abci as pb; +use celestia_tendermint_proto::Protobuf; impl From for pb::Response { fn from(response: Response) -> pb::Response { diff --git a/tendermint/src/v0_37/abci/request.rs b/tendermint/src/v0_37/abci/request.rs index 619fa7d44..3b2fe7c25 100644 --- a/tendermint/src/v0_37/abci/request.rs +++ b/tendermint/src/v0_37/abci/request.rs @@ -1,5 +1,5 @@ -use tendermint_proto::v0_37::abci as pb; -use tendermint_proto::Protobuf; +use celestia_tendermint_proto::v0_37::abci as pb; +use celestia_tendermint_proto::Protobuf; use crate::abci::request::{ConsensusRequest, InfoRequest, MempoolRequest, SnapshotRequest}; use crate::abci::MethodKind; diff --git a/tendermint/src/v0_37/abci/response.rs b/tendermint/src/v0_37/abci/response.rs index 2c6c25803..5336b0b9f 100644 --- a/tendermint/src/v0_37/abci/response.rs +++ b/tendermint/src/v0_37/abci/response.rs @@ -144,8 +144,8 @@ impl TryFrom for SnapshotResponse { // Protobuf conversions // ============================================================================= -use tendermint_proto::v0_37::abci as pb; -use tendermint_proto::Protobuf; +use celestia_tendermint_proto::v0_37::abci as pb; +use celestia_tendermint_proto::Protobuf; impl From for pb::Response { fn from(response: Response) -> pb::Response { diff --git a/tendermint/src/validator.rs b/tendermint/src/validator.rs index c4cd17c82..cf1fd799b 100644 --- a/tendermint/src/validator.rs +++ b/tendermint/src/validator.rs @@ -1,8 +1,8 @@ //! Tendermint validators +use celestia_tendermint_proto::v0_37::types::SimpleValidator as RawSimpleValidator; +use celestia_tendermint_proto::Protobuf; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::types::SimpleValidator as RawSimpleValidator; -use tendermint_proto::Protobuf; use crate::{ account, diff --git a/tendermint/src/vote.rs b/tendermint/src/vote.rs index 804fbe302..9f3117882 100644 --- a/tendermint/src/vote.rs +++ b/tendermint/src/vote.rs @@ -9,9 +9,9 @@ use core::convert::Infallible; use core::{fmt, str::FromStr}; use bytes::BufMut; +use celestia_tendermint_proto::v0_37::types::{CanonicalVote as RawCanonicalVote, Vote as RawVote}; +use celestia_tendermint_proto::{Error as ProtobufError, Protobuf}; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::types::{CanonicalVote as RawCanonicalVote, Vote as RawVote}; -use tendermint_proto::{Error as ProtobufError, Protobuf}; pub use self::{ canonical_vote::CanonicalVote, power::Power, sign_vote::*, validator_index::ValidatorIndex, diff --git a/tendermint/src/vote/canonical_vote.rs b/tendermint/src/vote/canonical_vote.rs index c3afd918d..f7100bd60 100644 --- a/tendermint/src/vote/canonical_vote.rs +++ b/tendermint/src/vote/canonical_vote.rs @@ -1,5 +1,5 @@ +use celestia_tendermint_proto::v0_37::types::CanonicalVote as RawCanonicalVote; use serde::{Deserialize, Serialize}; -use tendermint_proto::v0_37::types::CanonicalVote as RawCanonicalVote; use crate::{block, chain::Id as ChainId, prelude::*, Time}; @@ -93,7 +93,7 @@ impl CanonicalVote { mod tests { tendermint_pb_modules! { - use tendermint_proto::google::protobuf::Timestamp; + use celestia_tendermint_proto::google::protobuf::Timestamp; use pb::types::{ CanonicalBlockId as RawCanonicalBlockId, CanonicalPartSetHeader as RawCanonicalPartSetHeader, diff --git a/tendermint/src/vote/sign_vote.rs b/tendermint/src/vote/sign_vote.rs index e4707150c..d59e9b950 100644 --- a/tendermint/src/vote/sign_vote.rs +++ b/tendermint/src/vote/sign_vote.rs @@ -1,5 +1,5 @@ use bytes::BufMut; -use tendermint_proto::Error as ProtobufError; +use celestia_tendermint_proto::Error as ProtobufError; use crate::{chain, prelude::*, privval::RemoteSignerError, Vote};