diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index ed00b79d9..76dc27f2a 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -11,9 +11,9 @@ jobs: security_audit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Cache cargo bin - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~/.cargo/bin key: ${{ runner.os }}-cargo-audit diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7342584ae..cbed68a99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,81 +7,31 @@ on: paths-ignore: - "docs/**" branches: - - main - - 'v*.*.*' + - 'v*.*.*-celestia' jobs: - cleanup-runs: - runs-on: ubuntu-latest - steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" - - tendermint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: build-all - - build-light-client-wasm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - target: wasm32-unknown-unknown - - uses: actions-rs/cargo@v1 - with: - command: build-wasm-tendermint - - uses: actions-rs/cargo@v1 - with: - command: build-wasm-light-client - - tools: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: build-tools - # As per https://github.com/informalsystems/tendermint-rs/issues/1014 generated-protos-compile: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Install protoc run: | curl -Lo /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-x86_64.zip unzip /tmp/protoc.zip -d ${HOME}/.local echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV export PATH="${PATH}:${HOME}/.local/bin" + - name: Install buf run: | curl -sSL https://github.com/bufbuild/buf/releases/download/v1.15.1/buf-Linux-x86_64 \ -o /usr/local/bin/buf chmod +x /usr/local/bin/buf + - name: Regenerate proto definitions working-directory: ./tools/proto-compiler/ run: cargo run - - name: Ensure that generated proto definitions compile - uses: actions-rs/cargo@v1 - with: - command: build-all + + - name: Ensure that generated proto builds + run: cargo build diff --git a/.github/workflows/no-std.yaml b/.github/workflows/no-std.yaml index af18ad797..919fa8275 100644 --- a/.github/workflows/no-std.yaml +++ b/.github/workflows/no-std.yaml @@ -1,22 +1,23 @@ -name: no_std check -on: - pull_request: {} - push: - branches: main +# name: no_std check +# on: +# pull_request: {} +# push: +# branches: +# - 'v*.*.*-celestia' -jobs: - check-no-std-panic-conflict: - name: Check no_std panic conflict - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - run: | - cd tools/no-std-check - make check-panic-conflict +# jobs: +# check-no-std-panic-conflict: +# name: Check no_std panic conflict +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# - uses: actions-rs/toolchain@v1 +# with: +# toolchain: stable +# override: true +# - run: | +# cd tools/no-std-check +# make check-panic-conflict # Disabled until sp-io removes this feature which was removed in latest nightlies: # https://github.com/paritytech/substrate/blob/b5846ccc8480806aa6035ae4d2e89d61930f697e/primitives/io/src/lib.rs#L22 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index e8927642f..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Attempts to perform a release when a particular tag is pushed. This uses the -# release.sh script in the root of the repository, and assumes that the -# CRATES_TOKEN secret has been set and contains an API token with which we can -# publish our crates to crates.io. -# -# If release operation fails partway through due to a temporary error (e.g. the -# crate being published depends on the crate published just prior, but the -# prior crate isn't yet available via crates.io), one can simply rerun this -# workflow. The release.sh script aims to be an idempotent operation, skipping -# the publishing of crates that have already been published. -name: Release - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v0.26.0, v1.0.0 - - "v[0-9]+.[0-9]+.[0-9]+-pre.[0-9]+" # e.g. v0.26.0-pre.1 - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Publish crates - run: ./release.sh - env: - CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} - diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a553be420..845229ab3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,72 +7,31 @@ on: paths-ignore: - "docs/**" branches: - - main - - 'v*.*.*' + - 'v*.*.*-celestia' jobs: - cleanup-runs: - runs-on: ubuntu-latest - steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" - fmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - # This job creates the "clippy-results" GitHub Action that lists the clippy results in a nice format. - clippy-json-output: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: clippy - override: true - - uses: actions-rs/clippy-check@v1 - with: - name: clippy-results - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features --all-targets -- -Dwarnings -Drust-2018-idioms + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Run clippy + run: cargo fmt --all -- --check - clippy-tools-output: + clippy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: clippy - override: true - - uses: actions-rs/clippy-check@v1 - with: - name: clippy-tools-results - token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path tools/kvstore-test/Cargo.toml --all-features --all-targets -- -Dwarnings -Drust-2018-idioms + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Run clippy + run: cargo clippy --all --all-targets docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly-2023-03-01 # regression prevents docs from building - override: true - - uses: actions-rs/cargo@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - name: Cargo doc + run: cargo doc --all-features env: RUSTDOCFLAGS: "--cfg docsrs" - with: - command: doc - args: --all-features + # toolchain: nightly-2023-03-01 # regression prevents docs from building diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ab533a5c5..fe5f05e7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,172 +7,28 @@ on: paths-ignore: - "docs/**" branches: - - main - - 'v*.*.*' + - 'v*.*.*-celestia' jobs: - cleanup-runs: - runs-on: ubuntu-latest - steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" - default-features: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Test + run: cargo test - # TODO(shonfeder): remove duplication once GitHub addresses one of these - # - https://github.community/t/support-for-yaml-anchors/16128/15 - # - https://github.community/t/reusing-sharing-inheriting-steps-between-jobs-declarations/16851/13 - # - https://github.community/t/using-matrix-variable-in-docker-image-name/17296 tendermint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test-all-features - args: -p tendermint - - tendermint-rpc: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test-all-features - args: -p tendermint-rpc + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Test all features + run: cargo test --all-features -p celestia-tendermint tendermint-proto: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test-all-features - args: -p tendermint-proto - - tendermint-light-client: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - # NOTE: We test with default features to make sure things work without "unstable". - - uses: actions-rs/cargo@v1 - name: Test with default features - with: - command: test - args: -p tendermint-light-client - - uses: actions-rs/cargo@v1 - name: Test with all features - with: - command: test-all-features - args: -p tendermint-light-client - - # From https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/continuous-integration.html#github-actions - tendermint-light-client-js: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install wasm-pack - run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - - run: wasm-pack test --headless --chrome ./light-client-js/ - - run: wasm-pack test --headless --firefox ./light-client-js/ - - tendermint-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test-all-features - args: -p tendermint-test - - tendermint-testgen: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test-all-features - args: -p tendermint-testgen - - kvstore-integration-stable: - runs-on: ubuntu-latest - services: - tendermint: - image: informaldev/tendermint:0.34.21 - ports: - - 26656:26656 - - 26657:26657 - - 26660:26660 - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test-all-features - args: --manifest-path tools/kvstore-test/Cargo.toml -- --nocapture - env: - RUST_LOG: debug - - nightly-coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2022-09-18 - override: true - - uses: actions-rs/cargo@v1 - with: - command: test-all-features - env: - RUSTFLAGS: '-Zinstrument-coverage' - LLVM_PROFILE_FILE: '%p-%m.profraw' - - name: Install grcov - run: | - rustup component add llvm-tools-preview - curl -L https://github.com/mozilla/grcov/releases/download/v0.8.11/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - - - name: Run grcov - run: | - ./grcov . --source-dir . --binary-path ./target/debug/ --output-type lcov --output-path ./lcov.info --branch --ignore-not-existing - - name: Upload to Codecov - run: | - bash <(curl -s https://codecov.io/bash) -f ./lcov.info + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Test all features + run: cargo test --all-features -p celestia-tendermint-proto diff --git a/Cargo.toml b/Cargo.toml index 0e88ddc1b..a92880998 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,12 @@ [workspace] +resolver = "2" members = [ + "proto", + "tendermint", +] + +exclude = [ "abci", "config", "light-client", @@ -10,15 +16,10 @@ members = [ "light-client-js", "p2p", "pbt-gen", - "proto", "rpc", "std-ext", - "tendermint", "test", - "testgen" -] - -exclude = [ + "testgen", "proto-compiler", "tools/no-std-check" ] diff --git a/README.md b/README.md index b9db47fb0..b7e69355c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# tendermint-rs +# celestia-tendermint-rs [![Crate][crate-image]][crate-link] [![Docs][docs-image]][docs-link] @@ -9,6 +9,8 @@ [Tendermint] in Rust with [TLA+ specifications](/docs/spec). +**This is a hard fork of tendermint to make it work with Celestia** + Tendermint is a high-performance blockchain consensus engine for Byzantine fault tolerant applications written in any programming language. diff --git a/abci/Cargo.toml b/abci/Cargo.toml index 7adfc77cc..07e930598 100644 --- a/abci/Cargo.toml +++ b/abci/Cargo.toml @@ -13,6 +13,9 @@ description = """ applications on top of Tendermint. """ +# dont publish this package as a part of celestia-tendermint fork +publish = false + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [[bin]] diff --git a/config/Cargo.toml b/config/Cargo.toml index 72ae4c785..32393eb9c 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -19,6 +19,9 @@ authors = [ "Informal Systems ", ] +# dont publish this package as a part of celestia-tendermint fork +publish = false + [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] diff --git a/light-client-cli/Cargo.toml b/light-client-cli/Cargo.toml index 8ee946421..cea7ac6f4 100644 --- a/light-client-cli/Cargo.toml +++ b/light-client-cli/Cargo.toml @@ -15,6 +15,9 @@ description = """ Implementation of the Tendermint Light Client CLI. """ +# dont publish this package as a part of celestia-tendermint fork +publish = false + # docs.rs-specific configuration [package.metadata.docs.rs] # document all features diff --git a/light-client-detector/Cargo.toml b/light-client-detector/Cargo.toml index da31a20b7..1552663da 100644 --- a/light-client-detector/Cargo.toml +++ b/light-client-detector/Cargo.toml @@ -15,6 +15,9 @@ description = """ Implementation of the Tendermint Light Client Attack Detector. """ +# dont publish this package as a part of celestia-tendermint fork +publish = false + # docs.rs-specific configuration [package.metadata.docs.rs] # document all features diff --git a/light-client-js/Cargo.toml b/light-client-js/Cargo.toml index 96e0664e5..3d13bb21e 100644 --- a/light-client-js/Cargo.toml +++ b/light-client-js/Cargo.toml @@ -13,6 +13,9 @@ description = """ the Tendermint Light Client's verification functionality. """ +# dont publish this package as a part of celestia-tendermint fork +publish = false + [lib] crate-type = ["cdylib", "rlib"] diff --git a/light-client-verifier/Cargo.toml b/light-client-verifier/Cargo.toml index fadf29f25..e4227a01c 100644 --- a/light-client-verifier/Cargo.toml +++ b/light-client-verifier/Cargo.toml @@ -15,6 +15,9 @@ description = """ Implementation of the Tendermint Light Client Verification Algorithm. """ +# dont publish this package as a part of celestia-tendermint fork +publish = false + # docs.rs-specific configuration [package.metadata.docs.rs] # document all features diff --git a/light-client/Cargo.toml b/light-client/Cargo.toml index 6b354774f..15ec3f292 100644 --- a/light-client/Cargo.toml +++ b/light-client/Cargo.toml @@ -17,6 +17,9 @@ description = """ Implementation of the Tendermint Light Client Verification Protocol. """ +# dont publish this package as a part of celestia-tendermint fork +publish = false + # docs.rs-specific configuration [package.metadata.docs.rs] # document all features diff --git a/p2p/Cargo.toml b/p2p/Cargo.toml index 0193d1403..7911eca59 100644 --- a/p2p/Cargo.toml +++ b/p2p/Cargo.toml @@ -19,6 +19,9 @@ description = """ The Tendermint P2P stack in Rust. """ +# dont publish this package as a part of celestia-tendermint fork +publish = false + [lib] test = false diff --git a/pbt-gen/Cargo.toml b/pbt-gen/Cargo.toml index f44f27211..698e9b3c0 100644 --- a/pbt-gen/Cargo.toml +++ b/pbt-gen/Cargo.toml @@ -15,6 +15,9 @@ description = """ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +# dont publish this package as a part of celestia-tendermint fork +publish = false + [features] default = ["time"] diff --git a/proto/Cargo.toml b/proto/Cargo.toml index 1099b7208..dadfa1dfb 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "tendermint-proto" +name = "celestia-tendermint-proto" version = "0.32.0" authors = ["Informal Systems "] edition = "2021" @@ -10,6 +10,7 @@ categories = ["cryptography", "cryptography::cryptocurrencies", "database"] keywords = ["blockchain", "tendermint", "proto"] description = """ + This is a hard fork of tendermint to make it compatible with Celestia network. tendermint-proto is a the Rust implementation of the Tendermint proto structs. """ diff --git a/proto/src/lib.rs b/proto/src/lib.rs index 7b70a69d3..51b3e9202 100644 --- a/proto/src/lib.rs +++ b/proto/src/lib.rs @@ -42,7 +42,7 @@ use prelude::*; /// use bytes::BufMut; /// use prost::Message; /// use core::convert::TryFrom; -/// use tendermint_proto::Protobuf; +/// use celestia_tendermint_proto::Protobuf; /// /// // This struct would ordinarily be automatically generated by prost. /// #[derive(Clone, PartialEq, Message)] 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/proto/tests/unit.rs b/proto/tests/unit.rs index d0bc59d4d..593b310d3 100644 --- a/proto/tests/unit.rs +++ b/proto/tests/unit.rs @@ -1,7 +1,9 @@ use core::convert::TryFrom; -use tendermint_proto::v0_37::types::{BlockId as RawBlockId, PartSetHeader as RawPartSetHeader}; -use tendermint_proto::Protobuf; +use celestia_tendermint_proto::v0_37::types::{ + BlockId as RawBlockId, PartSetHeader as RawPartSetHeader, +}; +use celestia_tendermint_proto::Protobuf; impl Protobuf for BlockId {} diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 7d0150fdd..8e2614189 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -20,6 +20,9 @@ description = """ cases where only the core types are needed. """ +# dont publish this package as a part of celestia-tendermint fork +publish = false + [package.metadata.docs.rs] all-features = true diff --git a/std-ext/Cargo.toml b/std-ext/Cargo.toml index bfb598060..68b44c3f3 100644 --- a/std-ext/Cargo.toml +++ b/std-ext/Cargo.toml @@ -15,6 +15,9 @@ description = """ from tendermint-rs. """ +# dont publish this package as a part of celestia-tendermint fork +publish = false + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] diff --git a/tendermint/Cargo.toml b/tendermint/Cargo.toml index 307cfdcd5..4374eb489 100644 --- a/tendermint/Cargo.toml +++ b/tendermint/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "tendermint" +name = "celestia-tendermint" version = "0.32.0" # Also update depending crates (rpc, light-node, etc..) when bumping this . license = "Apache-2.0" homepage = "https://www.tendermint.com/" @@ -10,6 +10,7 @@ keywords = ["blockchain", "bft", "consensus", "cosmos", "tendermint"] edition = "2021" description = """ + This is a hard fork of tendermint to make it compatible with Celestia network. Tendermint is a high-performance blockchain consensus engine that powers Byzantine fault tolerant applications written in any programming language. This crate provides core types for representing information about Tendermint @@ -29,6 +30,8 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] +celestia-tendermint-proto = { default-features = false, path = "../proto" } + bytes = { version = "1.2", default-features = false, features = ["serde"] } digest = { version = "0.10", default-features = false } ed25519 = { version = "2", default-features = false, features = ["alloc"] } @@ -44,7 +47,6 @@ serde_repr = { version = "0.1", default-features = false } signature = { version = "2", default-features = false, features = ["alloc"] } subtle = { version = "2", default-features = false } subtle-encoding = { version = "0.5", default-features = false, features = ["bech32-preview"] } -tendermint-proto = { version = "0.32.0", default-features = false, path = "../proto" } time = { version = "0.3", default-features = false, features = ["macros", "parsing"] } zeroize = { version = "1.1", default-features = false, features = ["zeroize_derive", "alloc"] } flex-error = { version = "0.4.4", default-features = false } diff --git a/tendermint/src/abci.rs b/tendermint/src/abci.rs index fd347398d..e4f52d229 100644 --- a/tendermint/src/abci.rs +++ b/tendermint/src/abci.rs @@ -26,7 +26,7 @@ //! * [`SnapshotRequest`] / [`SnapshotResponse`] for [`MethodKind::Snapshot`] methods. //! //! The domain types in this module have conversions to and from the Protobuf -//! types defined in the [`tendermint_proto`] crate. These conversions are +//! types defined in the [`celestia_tendermint_proto`] crate. These conversions are //! required for ABCI server implementations, which use the protobufs to //! communicate with Tendermint, but should not be required for ABCI //! applications, which should use the domain types in an interface defined by diff --git a/tendermint/src/abci/event.rs b/tendermint/src/abci/event.rs index 38b9352c7..e0697fff3 100644 --- a/tendermint/src/abci/event.rs +++ b/tendermint/src/abci/event.rs @@ -30,7 +30,7 @@ impl Event { /// trait allow ergonomic event construction, as in this example: /// /// ``` - /// use tendermint::abci::{Event, EventAttributeIndexExt}; + /// use celestia_tendermint::abci::{Event, EventAttributeIndexExt}; /// /// let event = Event::new( /// "app", @@ -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..b78496865 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::*}; @@ -58,7 +58,7 @@ impl Id { /// Get the chain ID as a raw bytes. pub fn as_bytes(&self) -> &[u8] { - self.0.as_str().as_bytes() + self.0.as_bytes() } } 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/crypto/ed25519/signing_key.rs b/tendermint/src/crypto/ed25519/signing_key.rs index 6abcc9492..034557859 100644 --- a/tendermint/src/crypto/ed25519/signing_key.rs +++ b/tendermint/src/crypto/ed25519/signing_key.rs @@ -38,7 +38,6 @@ impl TryFrom for ed25519_consensus::SigningKey { type Error = Error; fn try_from(src: SigningKey) -> Result { - ed25519_consensus::SigningKey::try_from(src.0) - .map_err(|_| Error::invalid_key("malformed Ed25519 private key".into())) + Ok(ed25519_consensus::SigningKey::from(src.0)) } } 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}; diff --git a/tendermint/tests/alt_crypto.rs b/tendermint/tests/alt_crypto.rs index b6b1cc1be..33bf100d3 100644 --- a/tendermint/tests/alt_crypto.rs +++ b/tendermint/tests/alt_crypto.rs @@ -5,9 +5,9 @@ use ::signature::DigestVerifier; use digest::Digest; -use tendermint::crypto::signature::{self, Verifier}; -use tendermint::crypto::{sha256::HASH_SIZE, Sha256}; -use tendermint::{PublicKey, Signature}; +use celestia_tendermint::crypto::signature::{self, Verifier}; +use celestia_tendermint::crypto::{sha256::HASH_SIZE, Sha256}; +use celestia_tendermint::{PublicKey, Signature}; #[derive(Debug, Default)] struct SubstrateSha256(sha2::Sha256); @@ -43,9 +43,9 @@ impl Sha256 for SubstrateSha256 { mod tests { use super::{SubstrateSha256, SubstrateSignatureVerifier}; - use tendermint::crypto::signature::Verifier; - use tendermint::crypto::Sha256; - use tendermint::{PublicKey, Signature}; + use celestia_tendermint::crypto::signature::Verifier; + use celestia_tendermint::crypto::Sha256; + use celestia_tendermint::{PublicKey, Signature}; use subtle_encoding::hex; diff --git a/test/Cargo.toml b/test/Cargo.toml index 664830c5f..e6055d729 100644 --- a/test/Cargo.toml +++ b/test/Cargo.toml @@ -10,6 +10,9 @@ keywords = ["blockchain", "tendermint", "testing"] readme = "README.md" authors = ["Alexander Simmerl "] +# dont publish this package as a part of celestia-tendermint fork +publish = false + [lib] test = true diff --git a/testgen/Cargo.toml b/testgen/Cargo.toml index 2d9a4af2a..37416154a 100644 --- a/testgen/Cargo.toml +++ b/testgen/Cargo.toml @@ -15,6 +15,9 @@ description = """ The library also contains some functionality to simplify running test batches. """ +# dont publish this package as a part of celestia-tendermint fork +publish = false + [dependencies] tendermint = { version = "0.32.0", path = "../tendermint", features = ["clock"] } serde = { version = "1", default-features = false, features = ["derive"] } diff --git a/tools/Cargo.toml b/tools/Cargo.toml index 37ecb9722..4bca0290d 100644 --- a/tools/Cargo.toml +++ b/tools/Cargo.toml @@ -1,12 +1,12 @@ [workspace] members = [ - "abci-test", - "kvstore-test", "proto-compiler", - "rpc-probe" ] exclude = [ - "no-std-check" + "abci-test", + "kvstore-test", + "no-std-check", + "rpc-probe" ] diff --git a/tools/proto-compiler/src/constants.rs b/tools/proto-compiler/src/constants.rs index faf8f514c..805c9509a 100644 --- a/tools/proto-compiler/src/constants.rs +++ b/tools/proto-compiler/src/constants.rs @@ -19,7 +19,8 @@ pub const TENDERMINT_VERSIONS: &[TendermintVersion] = &[ TendermintVersion { repo: "https://github.com/celestiaorg/celestia-core", ident: "v0_34", - commitish: "v0.34.x-celestia", + // TODO: update + commitish: "a1b07a1e6c77595466da9c61b37c83b4769b47e7", // "v0.34.x-celestia", }, TendermintVersion { repo: "https://github.com/cometbft/cometbft",