diff --git a/config/tests/support/config/config.toml b/config/tests/support/config/config.toml index 76cac625..ebca602d 100644 --- a/config/tests/support/config/config.toml +++ b/config/tests/support/config/config.toml @@ -3,7 +3,7 @@ # NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or # relative to the home directory (e.g. "data"). The home directory is -# "$HOME/.cometbft" by default, but could be changed via $TMHOME env variable +# "$HOME/.cometbft" by default, but could be changed via $CMTHOME env variable # or --home cmd flag. ####################################################################### diff --git a/pbt-gen/README.md b/pbt-gen/README.md index feca82af..4a1e8deb 100644 --- a/pbt-gen/README.md +++ b/pbt-gen/README.md @@ -6,5 +6,5 @@ strategies and other PBT utilities used for testing. To view the documentation (which includes examples) run ```sh -cargo doc --open -p tendermint-pbt-gen +cargo doc --open -p cometbft-pbt-gen ``` diff --git a/testgen/README.md b/testgen/README.md index 5e6a8cde..ba8d659c 100644 --- a/testgen/README.md +++ b/testgen/README.md @@ -1,4 +1,4 @@ -## tendermint-testgen +## cometbft-testgen [![Crate][crate-image]][crate-link] [![Docs][docs-image]][docs-link] @@ -6,7 +6,7 @@ [![Apache 2.0 Licensed][license-image]][license-link] ![Rust Stable][rustc-image] -`tendermint-testgen` is a small utility for producing Tendermint data +`cometbft-testgen` is a small utility for producing CometBFT data structures from minimal input (for testing purposes only). ## Requirements @@ -16,15 +16,15 @@ structures from minimal input (for testing purposes only). ## Usage ```bash -# Show usage information for tendermint-testgen +# Show usage information for cometbft-testgen cargo run -- --help # Show usage about a particular command cargo run -- --help CMD ``` -As an example, a Tendermint validator can be produced only from an identifier, -or a Tendermint header only from a set of validators. +As an example, a CometBFT validator can be produced only from an identifier, +or a CometBFT header only from a set of validators. The parameters can be supplied in two ways: - via STDIN: in that case they are expected to be a valid JSON object, @@ -39,11 +39,11 @@ directly via STDIN, without wrapping it into JSON object. E.g., in the validator case, the following commands are all equivalent: ```bash -tendermint-testgen validator --id a --voting-power 3 -echo -n '{"id": "a", "voting_power": 3}' | tendermint-testgen --stdin validator -echo -n a | tendermint-testgen --stdin validator --voting-power 3 -echo -n '{"id": "a"}' | tendermint-testgen --stdin validator --voting-power 3 -echo -n '{"id": "a", "voting_power": 100}' | tendermint-testgen --stdin validator --voting-power 3 +cometbft-testgen validator --id a --voting-power 3 +echo -n '{"id": "a", "voting_power": 3}' | cometbft-testgen --stdin validator +echo -n a | cometbft-testgen --stdin validator --voting-power 3 +echo -n '{"id": "a"}' | cometbft-testgen --stdin validator --voting-power 3 +echo -n '{"id": "a", "voting_power": 100}' | cometbft-testgen --stdin validator --voting-power 3 ``` The result is: @@ -78,14 +78,14 @@ limitations under the License. [//]: # (badges) -[crate-image]: https://img.shields.io/crates/v/tendermint-testgen.svg -[crate-link]: https://crates.io/crates/tendermint-testgen -[docs-image]: https://docs.rs/tendermint-testgen/badge.svg -[docs-link]: https://docs.rs/tendermint-testgen/ -[build-image]: https://github.com/informalsystems/tendermint-rs/workflows/Rust/badge.svg -[build-link]: https://github.com/informalsystems/tendermint-rs/actions?query=workflow%3ARust +[crate-image]: https://img.shields.io/crates/v/cometbft-testgen.svg +[crate-link]: https://crates.io/crates/cometbft-testgen +[docs-image]: https://docs.rs/cometbft-testgen/badge.svg +[docs-link]: https://docs.rs/cometbft-testgen/ +[build-image]: https://github.com/cometbft/cometbft-rs/workflows/Rust/badge.svg +[build-link]: https://github.com/cometbft/cometbft-rs/actions?query=workflow%3ARust [license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg -[license-link]: https://github.com/informalsystems/tendermint-rs/blob/main/LICENSE +[license-link]: https://github.com/cometbft/cometbft-rs/blob/main/LICENSE [rustc-image]: https://img.shields.io/badge/rustc-stable-blue.svg [//]: # (general links) diff --git a/testgen/bin/cometbft-testgen.rs b/testgen/bin/cometbft-testgen.rs index 2ca6403f..3c4c3dc6 100644 --- a/testgen/bin/cometbft-testgen.rs +++ b/testgen/bin/cometbft-testgen.rs @@ -3,11 +3,11 @@ use gumdrop::Options; use simple_error::SimpleError; const USAGE: &str = r#" -This is a small utility for producing tendermint datastructures +This is a small utility for producing cometbft datastructures from minimal input (for testing purposes only). -For example, a tendermint validator can be produced only from an identifier, -or a tendermint header only from a set of validators. +For example, a cometbft validator can be produced only from an identifier, +or a cometbft header only from a set of validators. To get an idea which input is needed for each datastructure, try '--help CMD': it will list the required and optional parameters. @@ -24,11 +24,11 @@ In case a particular datastructure can be produced from a single parameter directly via STDIN, without wrapping it into JSON object. E.g., in the validator case, the following commands are all equivalent: - tendermint-testgen validator --id a --voting-power 3 - echo -n '{"id": "a", "voting_power": 3}' | tendermint-testgen --stdin validator - echo -n a | tendermint-testgen --stdin validator --voting-power 3 - echo -n '{"id": "a"}' | tendermint-testgen --stdin validator --voting-power 3 - echo -n '{"id": "a", "voting_power": 100}' | tendermint-testgen --stdin validator --voting-power 3 + cometbft-testgen validator --id a --voting-power 3 + echo -n '{"id": "a", "voting_power": 3}' | cometbft-testgen --stdin validator + echo -n a | cometbft-testgen --stdin validator --voting-power 3 + echo -n '{"id": "a"}' | cometbft-testgen --stdin validator --voting-power 3 + echo -n '{"id": "a", "voting_power": 100}' | cometbft-testgen --stdin validator --voting-power 3 The result is: { @@ -113,7 +113,7 @@ fn main() { } match opts.command { None => { - eprintln!("Produce tendermint datastructures for testing from minimal input\n"); + eprintln!("Produce CometBFT datastructures for testing from minimal input\n"); eprintln!("Please specify a command:"); eprintln!("{}\n", CliOptions::command_list().unwrap()); eprintln!("{}\n", CliOptions::usage()); diff --git a/testgen/jsonatr-lib/apalache-tendermint.json b/testgen/jsonatr-lib/apalache-cometbft.json similarity index 85% rename from testgen/jsonatr-lib/apalache-tendermint.json rename to testgen/jsonatr-lib/apalache-cometbft.json index f7c8e9b9..2e8fdc7e 100644 --- a/testgen/jsonatr-lib/apalache-tendermint.json +++ b/testgen/jsonatr-lib/apalache-cometbft.json @@ -1,7 +1,7 @@ { - "description": "Transformers for Apalache counterexamples (CEs) with Tendermint blockchains", + "description": "Transformers for Apalache counterexamples (CEs) with CometBFT blockchains", "use": [ - "tendermint.json" + "cometbft.json" ], "input": [ { @@ -60,7 +60,7 @@ }, { "name": "id_to_validator", - "description": "transform an identifier into a validator expected by `tendermint-testgen validator`", + "description": "transform an identifier into a validator expected by `cometbft-testgen validator`", "kind": "INLINE", "source": { "id": "$", @@ -69,7 +69,7 @@ }, { "name": "id_to_vote", - "description": "transform an identifier into a vote expected by `tendermint-testgen vote`", + "description": "transform an identifier into a vote expected by `cometbft-testgen vote`", "kind": "INLINE", "source": { "validator": "$ | id_to_validator", @@ -78,7 +78,7 @@ }, { "name": "block_to_header", - "description": "transform a block from Apalache CE into a header expected by `tendermint-testgen header`", + "description": "transform a block from Apalache CE into a header expected by `cometbft-testgen header`", "kind": "INLINE", "source": { "validators": "$ | block_validators | map(id_to_validator)", @@ -89,7 +89,7 @@ }, { "name": "block_to_commit", - "description": "transform a block from Apalache CE into a commit expected by `tendermint-testgen commit`", + "description": "transform a block from Apalache CE into a commit expected by `cometbft-testgen commit`", "kind": "INLINE", "let": { "header": "$ | block_to_header" @@ -101,13 +101,13 @@ }, { "name": "ids_to_validators", - "description": "transform a non-empty array of identifiers into Tendermint validators", + "description": "transform a non-empty array of identifiers into CometBFT validators", "kind": "INLINE", - "source": "$ | map(id_to_validator) | map(tendermint_validator)" + "source": "$ | map(id_to_validator) | map(cometbft_validator)" }, { "name": "ids_to_testgen_validators", - "description": "transform a non-empty array of identifiers into `Tendermint-testgen validators`", + "description": "transform a non-empty array of identifiers into `CometBFT-testgen validators`", "kind": "INLINE", "source": "$ | map(id_to_validator)" }, @@ -121,22 +121,23 @@ "name": "first_validator", "description": "extract first validator from a non-empty array of identifiers", "kind": "INLINE", - "source": "$[0] | unwrap | id_to_validator | tendermint_validator" + "source": "$[0] | unwrap | id_to_validator | cometbft_validator" }, { "name": "const_id", "description": "constant identifier", "kind": "INLINE", "source": "a" - }, { + }, + { "name": "fixed_validator", "description": "extract first validator from a non-empty array of identifiers", "kind": "INLINE", - "source": "$const_id | id_to_validator | tendermint_validator" + "source": "$const_id | id_to_validator | cometbft_validator" }, { "name": "ids_to_validator_set", - "description": "transform an array of identifiers into a JSON-encoded Tendermint validator set", + "description": "transform an array of identifiers into a JSON-encoded CometBFT validator set", "kind": "INLINE", "source": { "validators": "$ | ifelse(ids_to_validators,empty_array)", @@ -146,11 +147,11 @@ }, { "name": "block_to_signed_header", - "description": "transform a block from Apalache CE into a JSON-encoded Tendermint signed header", + "description": "transform a block from Apalache CE into a JSON-encoded CometBFT signed header", "kind": "INLINE", "source": { - "header": "$ | block_to_header | tendermint_header", - "commit": "$ | block_to_commit | tendermint_commit" + "header": "$ | block_to_header | cometbft_header", + "commit": "$ | block_to_commit | cometbft_commit" } } ] diff --git a/testgen/jsonatr-lib/apalache_to_lite_test.json b/testgen/jsonatr-lib/apalache_to_lite_test.json index b22feb64..f848b9e3 100644 --- a/testgen/jsonatr-lib/apalache_to_lite_test.json +++ b/testgen/jsonatr-lib/apalache_to_lite_test.json @@ -1,13 +1,13 @@ { - "description": "Transform an Apalache counterexample into a Tendermint LightClient test", + "description": "Transform an Apalache counterexample into a CometBFT LightClient test", "use": [ "unix.json", - "apalache-tendermint.json" + "apalache-cometbft.json" ], "input": [ { "name": "block_to_initial_block", - "description": "transforms a block from Apalache CE into a JSON-encoded Tendermint initial light block", + "description": "transforms a block from Apalache CE into a JSON-encoded CometBFT initial light block", "kind": "INLINE", "source": { "signed_header": "$ | block_to_signed_header", @@ -18,7 +18,7 @@ }, { "name": "state_to_lite_block_verdict", - "description": "transforms a block from Apalache CE into a JSON-encoded Tendermint light block", + "description": "transforms a block from Apalache CE into a JSON-encoded CometBFT light block", "kind": "INLINE", "let": { "block": "$..[?(@.key.str == 'current')].value" @@ -35,7 +35,7 @@ "validators": "$block | block_validators | ids_to_testgen_validators", "next_validators": "$block | block_next_validators | ids_to_testgen_validators" }, - "now": "$..[?(@.key.str == 'now')].value | unwrap | tendermint_time", + "now": "$..[?(@.key.str == 'now')].value | unwrap | cometbft_time", "verdict": "$..[?(@.key.str == 'verdict')].value.str | unwrap" } } @@ -45,4 +45,4 @@ "initial": "$history[0]..[?(@.key.str == 'current')].value | block_to_initial_block", "input": "$history[1:] | map(state_to_lite_block_verdict)" } -} +} \ No newline at end of file diff --git a/testgen/jsonatr-lib/cometbft.json b/testgen/jsonatr-lib/cometbft.json new file mode 100644 index 00000000..390ba4f6 --- /dev/null +++ b/testgen/jsonatr-lib/cometbft.json @@ -0,0 +1,31 @@ +{ + "description": "Transformers for generating CometBFT datastructures", + "prerequisites": "add cometbft-testgen to your $PATH", + "input": [ + { + "name": "cometbft_validator", + "kind": "COMMAND", + "source": "cometbft-testgen --stdin validator" + }, + { + "name": "cometbft_header", + "kind": "COMMAND", + "source": "cometbft-testgen --stdin header" + }, + { + "name": "cometbft_commit", + "kind": "COMMAND", + "source": "cometbft-testgen --stdin commit" + }, + { + "name": "cometbft_vote", + "kind": "COMMAND", + "source": "cometbft-testgen --stdin vote" + }, + { + "name": "cometbft_time", + "kind": "COMMAND", + "source": "cometbft-testgen --stdin time" + } + ] +} \ No newline at end of file diff --git a/testgen/jsonatr-lib/tendermint.json b/testgen/jsonatr-lib/tendermint.json deleted file mode 100644 index ba119bd8..00000000 --- a/testgen/jsonatr-lib/tendermint.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "Transformers for generating Tendermint datastructures", - "prerequisites": "add tendermint-testgen to your $PATH", - "input": [ - { - "name": "tendermint_validator", - "kind": "COMMAND", - "source": "tendermint-testgen --stdin validator" - }, - { - "name": "tendermint_header", - "kind": "COMMAND", - "source": "tendermint-testgen --stdin header" - }, - { - "name": "tendermint_commit", - "kind": "COMMAND", - "source": "tendermint-testgen --stdin commit" - }, - { - "name": "tendermint_vote", - "kind": "COMMAND", - "source": "tendermint-testgen --stdin vote" - }, - { - "name": "tendermint_time", - "kind": "COMMAND", - "source": "tendermint-testgen --stdin time" - } - ] -} diff --git a/testgen/src/header.rs b/testgen/src/header.rs index 6faf6d29..d1fe2ee5 100644 --- a/testgen/src/header.rs +++ b/testgen/src/header.rs @@ -199,7 +199,7 @@ impl Generator for Header { }); let header = block::Header { - // block version in Tendermint-go is hardcoded with value 11 + // block version in CometBFT-go is hardcoded with value 11 // so we do the same with MBT for now for compatibility version: block::header::Version { block: 11, app: 0 }, chain_id, diff --git a/testgen/src/lib.rs b/testgen/src/lib.rs index 25b237b5..0beb73a7 100644 --- a/testgen/src/lib.rs +++ b/testgen/src/lib.rs @@ -1,14 +1,14 @@ -//! `tendermint-testgen` is a small utility for producing Tendermint data +//! `cometbft-testgen` is a small utility for producing CometBFT data //! structures from minimal input (for testing purposes only). //! //! See the [repository] for details. //! -//! [repository]: https://github.com/informalsystems/tendermint-rs/tree/main/testgen +//! [repository]: https://github.com/cometbft/cometbft-rs/tree/main/testgen #[macro_use] pub mod helpers; -/// Helper types for generating Tendermint datastructures +/// Helper types for generating CometBFT datastructures pub mod commit; pub mod consensus; pub mod generator; diff --git a/testgen/src/validator.rs b/testgen/src/validator.rs index 663852bf..28e4a40d 100644 --- a/testgen/src/validator.rs +++ b/testgen/src/validator.rs @@ -127,7 +127,7 @@ pub fn generate_validators(vals: &[Validator]) -> Result, S .collect::, SimpleError>>() } -/// A helper function to sort validators according to the Tendermint specs. +/// A helper function to sort validators according to the CometBFT specs. pub fn sort_validators(vals: &[Validator]) -> Vec { let mut sorted = vals.to_owned(); sorted.sort_by_key(|v| { diff --git a/tools/README.md b/tools/README.md index 51ad46b6..b6b521d7 100644 --- a/tools/README.md +++ b/tools/README.md @@ -2,7 +2,7 @@ This folder contains tools that we use during development and testing. ## kvstore-test -This crate allows the developers to do integration testing against a Tendermint Go endpoint. Our CI also uses it. +This crate allows the developers to do integration testing against a CometBFT Go endpoint. Our CI also uses it. To run the tests locally, provided that a kvstore RPC endpoint is running on http://127.0.0.1:26657: ```shell @@ -16,7 +16,7 @@ cargo test-all-features which is exactly what we run in CI. If you don't have an endpoint running, but you have Docker installed, you can ask the testing framework to fire up a -Docker container with the current stable Tendermint node. This happens automatically if you run: +Docker container with the current stable CometBFT node. This happens automatically if you run: ```shell cargo make ``` diff --git a/tools/abci-test/src/main.rs b/tools/abci-test/src/main.rs index 305b80d9..6b59b3db 100644 --- a/tools/abci-test/src/main.rs +++ b/tools/abci-test/src/main.rs @@ -10,14 +10,14 @@ use tokio::time::Duration; use tracing::{debug, error, info, level_filters::LevelFilter}; #[derive(Debug, StructOpt)] -/// A harness for testing tendermint-abci through a full Tendermint node +/// A harness for testing cometbft-abci through a full CometBFT node /// running our in-memory key/value store application (kvstore-rs). struct Opt { - /// Tendermint RPC host address. + /// CometBFT RPC host address. #[structopt(short, long, default_value = "127.0.0.1")] host: String, - /// Tendermint RPC port. + /// CometBFT RPC port. #[structopt(short, long, default_value = "26657")] port: u16, @@ -36,7 +36,7 @@ async fn main() -> Result<(), Box> { }) .init(); - info!("Connecting to Tendermint node at {}:{}", opt.host, opt.port); + info!("Connecting to CometBFT node at {}:{}", opt.host, opt.port); let (mut client, driver) = WebSocketClient::new(Address::Tcp { peer_id: None, host: opt.host, diff --git a/tools/docker/README.md b/tools/docker/README.md index c8b8d7ba..41fb43f0 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -4,26 +4,26 @@ This folder contains `Dockerfile` configurations that are used during development and testing. The created images are uploaded to DockerHub, under the informaldev -organization. For example: `informaldev/tendermint:0.34.0`. +organization. For example: `informaldev/cometbft:0.34.0`. -## tendermint +## cometbft -This image is used during CI testing in the tendermint-rs crate and it can be +This image is used during CI testing in the cometbft-rs crate and it can be used during fixture creation with `rpc-probe`. It tests compatibility with the -Tendermint Go implementation. It is a GitHub Actions "Services"-compatible +CometBFT Go implementation. It is a GitHub Actions "Services"-compatible image: a standalone image that can run on its own. It can create its own configuration if one was not provided. This ensures that the configuration file -is always compatible with the Tendermint version built into it. +is always compatible with the CometBFT version built into it. There are two configurations in this folder: -- [`tendermint`](./tendermint/) - Builds a Tendermint image based off of the - `TMVERSION` argument configured in the `Dockerfile`. The corresponding release +- [`cometbft`](./cometbft/) - Builds a CometBFT image based off of the + `CMTVERSION` argument configured in the `Dockerfile`. The corresponding release will automatically be downloaded from - [GitHub](https://github.com/tendermint/tendermint/releases) during image + [GitHub](https://github.com/cometbft/cometbft/releases) during image build. -- [`tendermint-custom-bin`](./tendermint-custom-bin/) - Builds a Tendermint - image from a custom-built Tendermint binary. Assumes the `tendermint` binary +- [`cometbft-custom-bin`](./cometbft-custom-bin/) - Builds a CometBFT + image from a custom-built CometBFT binary. Assumes the `cometbft` binary is in the same directory as the `Dockerfile` and is built for Linux/AMD64. ## gaiad @@ -31,7 +31,7 @@ There are two configurations in this folder: This image will be used for `rpc-probe`, to generate fixtures for CI testing from a gaiad node. -Contrary to the `tendermint` image, the configuration here is pre-created so the +Contrary to the `cometbft` image, the configuration here is pre-created so the genesis file can be populated with additional wallets. The corresponding private keys are also saved into a test keyring. @@ -47,15 +47,15 @@ can only be executed as the first transaction of the corresponding wallet. ## abci-harness This image is used during CI testing in the abci-rs crate. It tests -compatibility with the Tendermint Go implementation. It derives from the -Tendermint Docker image above, but it expects a volume attached at `/abci` that +compatibility with the CometBFT Go implementation. It derives from the +CometBFT Docker image above, but it expects a volume attached at `/abci` that contains the ABCI application to be tested. The name of the ABCI application is `kvstore-rs` by default. This can be changed by setting the `ABCI_APP` environment variable. -The image will fire up a Tendermint node (auto-creating the configuration) and +The image will fire up a CometBFT node (auto-creating the configuration) and then execute the ABCI application from the attached volume. It logs the -Tendermint node log into kvstore-rs.tendermint and the ABCI application log into +CometBFT node log into kvstore-rs.cometbft and the ABCI application log into kvstore-rs.log on the attached volume. This image has both the `muslc` and `glibc` libraries installed for easy testing @@ -66,4 +66,4 @@ Example: docker run -it --rm -v $PWD/target/debug:/abci -p 26657:26657 informaldev/abci-harness:0.34.0 ``` -The image version reflects the Tendermint Go binary version. +The image version reflects the CometBFT Go binary version. diff --git a/tools/docker/abci-harness-custom-bin/.gitignore b/tools/docker/abci-harness-custom-bin/.gitignore index 0c8c39be..b8694700 100644 --- a/tools/docker/abci-harness-custom-bin/.gitignore +++ b/tools/docker/abci-harness-custom-bin/.gitignore @@ -1 +1 @@ -tendermint \ No newline at end of file +cometbft \ No newline at end of file diff --git a/tools/docker/abci-harness-custom-bin/Dockerfile b/tools/docker/abci-harness-custom-bin/Dockerfile index 3e009fee..0b405c14 100644 --- a/tools/docker/abci-harness-custom-bin/Dockerfile +++ b/tools/docker/abci-harness-custom-bin/Dockerfile @@ -1,31 +1,30 @@ FROM alpine:3.16 LABEL maintainer="hello@informal.systems" -ENV TMHOME=/tendermint +ENV CMTHOME=/cometbft #GLIBC for Alpine from: https://github.com/sgerrand/alpine-pkg-glibc -RUN wget https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ - -O /etc/apk/keys/sgerrand.rsa.pub && \ - wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk \ - https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-bin-2.32-r0.apk \ - https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-i18n-2.32-r0.apk && \ - apk add --no-cache glibc-2.32-r0.apk glibc-bin-2.32-r0.apk glibc-i18n-2.32-r0.apk && \ - rm glibc-2.32-r0.apk glibc-bin-2.32-r0.apk glibc-i18n-2.32-r0.apk && \ - /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 && \ - apk --no-cache add jq bash file && \ - wget https://github.com/freshautomations/sconfig/releases/download/v0.1.0/sconfig_linux_amd64 \ - -O /usr/bin/sconfig && \ - chmod 755 /usr/bin/sconfig && \ - addgroup tendermint && \ - adduser -S -G tendermint tendermint -h "$TMHOME" -USER tendermint -WORKDIR $TMHOME +RUN wget https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -O /etc/apk/keys/sgerrand.rsa.pub && \ + wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk \ + https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-bin-2.32-r0.apk \ + https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-i18n-2.32-r0.apk && \ + apk add --no-cache glibc-2.32-r0.apk glibc-bin-2.32-r0.apk glibc-i18n-2.32-r0.apk && \ + rm glibc-2.32-r0.apk glibc-bin-2.32-r0.apk glibc-i18n-2.32-r0.apk && \ + /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 && \ + apk --no-cache add jq bash file && \ + wget https://github.com/freshautomations/sconfig/releases/download/v0.1.0/sconfig_linux_amd64 \ + -O /usr/bin/sconfig && \ + chmod 755 /usr/bin/sconfig && \ + addgroup cometbft && \ + adduser -S -G cometbft cometbft -h "$CMTHOME" +USER cometbft +WORKDIR $CMTHOME EXPOSE 26656 26657 26658 26660 STOPSIGNAL SIGTERM -ARG TENDERMINT=tendermint -COPY $TENDERMINT /usr/bin/tendermint +ARG TENDERMINT=cometbft +COPY $TENDERMINT /usr/bin/cometbft COPY entrypoint /usr/bin/entrypoint ENTRYPOINT ["/usr/bin/entrypoint"] -VOLUME [ "$TMHOME", "/abci" ] +VOLUME [ "$CMTHOME", "/abci" ] diff --git a/tools/docker/abci-harness-custom-bin/entrypoint b/tools/docker/abci-harness-custom-bin/entrypoint index ff8d8300..35d96159 100755 --- a/tools/docker/abci-harness-custom-bin/entrypoint +++ b/tools/docker/abci-harness-custom-bin/entrypoint @@ -17,24 +17,24 @@ else fi fi -if [ ! -d "${TMHOME}/config" ]; then +if [ ! -d "${CMTHOME}/config" ]; then - echo "Running tendermint init to create configuration." - /usr/bin/tendermint init + echo "Running cometbft init to create configuration." + /usr/bin/cometbft init - sconfig -s ${TMHOME}/config/config.toml \ + sconfig -s ${CMTHOME}/config/config.toml \ moniker=${MONIKER:-dockernode} \ consensus.timeout_commit=500ms \ rpc.laddr=tcp://0.0.0.0:26657 \ p2p.addr_book_strict=false \ instrumentation.prometheus=true - sconfig -s ${TMHOME}/config/genesis.json \ + sconfig -s ${CMTHOME}/config/genesis.json \ chain_id=${CHAIN_ID:-dockerchain} \ consensus_params.block.time_iota_ms=500 fi -exec /usr/bin/tendermint node 2>&1 > /dev/null & +exec /usr/bin/cometbft node 2>&1 > /dev/null & exec "${ABCI_PATH}" "$@" diff --git a/tools/docker/abci-harness/.gitignore b/tools/docker/abci-harness/.gitignore index 0c8c39be..b8694700 100644 --- a/tools/docker/abci-harness/.gitignore +++ b/tools/docker/abci-harness/.gitignore @@ -1 +1 @@ -tendermint \ No newline at end of file +cometbft \ No newline at end of file diff --git a/tools/docker/abci-harness/Dockerfile b/tools/docker/abci-harness/Dockerfile index 3e036418..8b0a2279 100644 --- a/tools/docker/abci-harness/Dockerfile +++ b/tools/docker/abci-harness/Dockerfile @@ -1,36 +1,35 @@ FROM alpine:3.16 LABEL maintainer="hello@informal.systems" -ARG TMVERSION +ARG CMTVERSION -ENV TMHOME=/tendermint +ENV CMTHOME=/cometbft #GLIBC for Alpine from: https://github.com/sgerrand/alpine-pkg-glibc -RUN wget https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ - -O /etc/apk/keys/sgerrand.rsa.pub && \ - wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk \ - https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-bin-2.32-r0.apk \ - https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-i18n-2.32-r0.apk && \ - apk add --no-cache glibc-2.32-r0.apk glibc-bin-2.32-r0.apk glibc-i18n-2.32-r0.apk && \ - rm glibc-2.32-r0.apk glibc-bin-2.32-r0.apk glibc-i18n-2.32-r0.apk && \ - /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 && \ - apk --no-cache add jq bash file && \ - wget https://github.com/freshautomations/sconfig/releases/download/v0.1.0/sconfig_linux_amd64 \ - -O /usr/bin/sconfig && \ - chmod 755 /usr/bin/sconfig && \ - cd /tmp && \ - wget https://github.com/tendermint/tendermint/releases/download/v${TMVERSION}/tendermint_${TMVERSION}_linux_amd64.tar.gz \ - -O ./tendermint.tar.gz && \ - tar xf tendermint.tar.gz && \ - mv tendermint /usr/bin/tendermint && \ - chmod 755 /usr/bin/tendermint && \ - rm tendermint.tar.gz && \ - addgroup tendermint && \ - adduser -S -G tendermint tendermint -h "$TMHOME" -USER tendermint -WORKDIR $TMHOME +RUN wget https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -O /etc/apk/keys/sgerrand.rsa.pub && \ + wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk \ + https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-bin-2.32-r0.apk \ + https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-i18n-2.32-r0.apk && \ + apk add --no-cache glibc-2.32-r0.apk glibc-bin-2.32-r0.apk glibc-i18n-2.32-r0.apk && \ + rm glibc-2.32-r0.apk glibc-bin-2.32-r0.apk glibc-i18n-2.32-r0.apk && \ + /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 && \ + apk --no-cache add jq bash file && \ + wget https://github.com/freshautomations/sconfig/releases/download/v0.1.0/sconfig_linux_amd64 \ + -O /usr/bin/sconfig && \ + chmod 755 /usr/bin/sconfig && \ + cd /tmp && \ + wget https://github.com/cometbft/cometbft/releases/download/v${CMTVERSION}/cometbft_${CMTVERSION}_linux_amd64.tar.gz \ + -O ./cometbft.tar.gz && \ + tar xf cometbft.tar.gz && \ + mv cometbft /usr/bin/cometbft && \ + chmod 755 /usr/bin/cometbft && \ + rm cometbft.tar.gz && \ + addgroup cometbft && \ + adduser -S -G cometbft cometbft -h "$CMTHOME" +USER cometbft +WORKDIR $CMTHOME EXPOSE 26656 26657 26658 26660 STOPSIGNAL SIGTERM COPY entrypoint /usr/bin/entrypoint ENTRYPOINT ["/usr/bin/entrypoint"] -VOLUME [ "$TMHOME", "/abci" ] +VOLUME [ "$CMTHOME", "/abci" ] diff --git a/tools/docker/abci-harness/entrypoint b/tools/docker/abci-harness/entrypoint index ff8d8300..35d96159 100755 --- a/tools/docker/abci-harness/entrypoint +++ b/tools/docker/abci-harness/entrypoint @@ -17,24 +17,24 @@ else fi fi -if [ ! -d "${TMHOME}/config" ]; then +if [ ! -d "${CMTHOME}/config" ]; then - echo "Running tendermint init to create configuration." - /usr/bin/tendermint init + echo "Running cometbft init to create configuration." + /usr/bin/cometbft init - sconfig -s ${TMHOME}/config/config.toml \ + sconfig -s ${CMTHOME}/config/config.toml \ moniker=${MONIKER:-dockernode} \ consensus.timeout_commit=500ms \ rpc.laddr=tcp://0.0.0.0:26657 \ p2p.addr_book_strict=false \ instrumentation.prometheus=true - sconfig -s ${TMHOME}/config/genesis.json \ + sconfig -s ${CMTHOME}/config/genesis.json \ chain_id=${CHAIN_ID:-dockerchain} \ consensus_params.block.time_iota_ms=500 fi -exec /usr/bin/tendermint node 2>&1 > /dev/null & +exec /usr/bin/cometbft node 2>&1 > /dev/null & exec "${ABCI_PATH}" "$@" diff --git a/tools/docker/build-images.sh b/tools/docker/build-images.sh index 466dd2d6..323a5856 100755 --- a/tools/docker/build-images.sh +++ b/tools/docker/build-images.sh @@ -1,22 +1,22 @@ #!/bin/bash set -euo pipefail -# The version of Tendermint to build into the images. -TMVERSION=${TMVERSION:-0.34.21} +# The version of CometBFT to build into the images. +CMTVERSION=${CMTVERSION:-0.34.21} -echo "Building for Tendermint v${TMVERSION}..." +echo "Building for CometBFT v${CMTVERSION}..." # Build the ABCI test harness docker build \ -f abci-harness/Dockerfile \ - --build-arg TMVERSION=${TMVERSION} \ - --tag informaldev/tendermint:${TMVERSION} \ + --build-arg CMTVERSION=${CMTVERSION} \ + --tag informaldev/cometbft:${CMTVERSION} \ ./abci-harness/ -# Build the Tendermint development image +# Build the CometBFT development image docker build \ - -f tendermint/Dockerfile \ - --build-arg TMVERSION=${TMVERSION} \ - --tag informaldev/tendermint:${TMVERSION} \ - ./tendermint/ + -f cometbft/Dockerfile \ + --build-arg CMTVERSION=${CMTVERSION} \ + --tag informaldev/cometbft:${CMTVERSION} \ + ./cometbft/ diff --git a/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/app.toml b/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/app.toml index 3d5ea7c0..93b52867 100644 --- a/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/app.toml +++ b/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/app.toml @@ -36,15 +36,15 @@ halt-time = 0 # MinRetainBlocks defines the minimum block height offset from the current # block being committed, such that all blocks past this offset are pruned -# from Tendermint. It is used as part of the process of determining the +# from CometBFT. It is used as part of the process of determining the # ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates # that no blocks should be pruned. # -# This configuration value is only responsible for pruning Tendermint blocks. +# This configuration value is only responsible for pruning CometBFT blocks. # It has no bearing on application state pruning which is determined by the # "pruning-*" configurations. # -# Note: Tendermint block pruning is dependent on this parameter in conjunction +# Note: CometBFT block pruning is dependent on this parameter in conjunction # with the unbonding (safety threshold) period, state pruning and state sync # snapshot parameters to determine the correct minimum value of # ResponseCommit.RetainHeight. @@ -54,7 +54,7 @@ min-retain-blocks = 0 inter-block-cache = true # IndexEvents defines the set of events in the form {eventType}.{attributeKey}, -# which informs Tendermint what to index. If empty, all events will be indexed. +# which informs CometBFT what to index. If empty, all events will be indexed. # # Example: # ["message.sender", "message.recipient"] @@ -113,13 +113,13 @@ address = "tcp://0.0.0.0:1317" # MaxOpenConnections defines the number of maximum open connections. max-open-connections = 1000 -# RPCReadTimeout defines the Tendermint RPC read timeout (in seconds). +# RPCReadTimeout defines the CometBFT RPC read timeout (in seconds). rpc-read-timeout = 10 -# RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds). +# RPCWriteTimeout defines the CometBFT RPC write timeout (in seconds). rpc-write-timeout = 0 -# RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes). +# RPCMaxBodyBytes defines the CometBFT maximum response body (in bytes). rpc-max-body-bytes = 1000000 # EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). diff --git a/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/config.toml b/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/config.toml index da9a5ca2..b2686edb 100644 --- a/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/config.toml +++ b/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/config.toml @@ -34,7 +34,7 @@ proxy_app = "tcp://127.0.0.1:26658" [instrumentation] max_open_connections = 3 - namespace = "tendermint" + namespace = "cometbft" prometheus = true prometheus_listen_addr = ":26660" diff --git a/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/node_key.json b/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/node_key.json index 8f254328..d33f5036 100644 --- a/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/node_key.json +++ b/tools/docker/gaiad-cosmoshub-test-stargate-2/n0/config/node_key.json @@ -1 +1,6 @@ -{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"gSTkKR5n1aCuJ1o1gwdgGufriDSmp9ssc4mBKf6aQgwH9oaJAJ+Bta7w64brmc8dl8t2sGmKuz9Elj6pYeZvkA=="}} \ No newline at end of file +{ + "priv_key": { + "type": "tendermint/PrivKeyEd25519", + "value": "gSTkKR5n1aCuJ1o1gwdgGufriDSmp9ssc4mBKf6aQgwH9oaJAJ+Bta7w64brmc8dl8t2sGmKuz9Elj6pYeZvkA==" + } +} \ No newline at end of file diff --git a/tools/docker/tendermint-custom-bin/.gitignore b/tools/docker/tendermint-custom-bin/.gitignore index 9059c684..3af87e78 100644 --- a/tools/docker/tendermint-custom-bin/.gitignore +++ b/tools/docker/tendermint-custom-bin/.gitignore @@ -1 +1 @@ -tendermint +cometbft diff --git a/tools/docker/tendermint-custom-bin/Dockerfile b/tools/docker/tendermint-custom-bin/Dockerfile index 25143d6d..2aea5185 100644 --- a/tools/docker/tendermint-custom-bin/Dockerfile +++ b/tools/docker/tendermint-custom-bin/Dockerfile @@ -1,23 +1,23 @@ FROM alpine:3.16 LABEL maintainer="hello@informal.systems" -ENV TMHOME=/tendermint +ENV CMTHOME=/cometbft RUN apk --no-cache add jq bash && \ wget https://github.com/freshautomations/sconfig/releases/download/v0.1.0/sconfig_linux_amd64 \ - -O /usr/bin/sconfig && \ + -O /usr/bin/sconfig && \ chmod 755 /usr/bin/sconfig && \ - addgroup tendermint && \ - adduser -S -G tendermint tendermint -h "$TMHOME" -USER tendermint -WORKDIR $TMHOME + addgroup cometbft && \ + adduser -S -G cometbft cometbft -h "$CMTHOME" +USER cometbft +WORKDIR $CMTHOME EXPOSE 26656 26657 26660 STOPSIGNAL SIGTERM -ARG TENDERMINT=tendermint -COPY $TENDERMINT /usr/bin/tendermint +ARG TENDERMINT=cometbft +COPY $TENDERMINT /usr/bin/cometbft COPY entrypoint /usr/bin/entrypoint ENTRYPOINT ["/usr/bin/entrypoint"] CMD ["node"] -VOLUME [ "$TMHOME" ] +VOLUME [ "$CMTHOME" ] diff --git a/tools/docker/tendermint-custom-bin/entrypoint b/tools/docker/tendermint-custom-bin/entrypoint index e3504a1d..c30b1642 100755 --- a/tools/docker/tendermint-custom-bin/entrypoint +++ b/tools/docker/tendermint-custom-bin/entrypoint @@ -1,12 +1,12 @@ #!/usr/bin/env sh set -euo pipefail -if [ ! -d "${TMHOME}/config" ]; then +if [ ! -d "${CMTHOME}/config" ]; then - echo "Running tendermint init to create configuration." - /usr/bin/tendermint init + echo "Running cometbft init to create configuration." + /usr/bin/cometbft init - sconfig -s ${TMHOME}/config/config.toml \ + sconfig -s ${CMTHOME}/config/config.toml \ proxy_app=${PROXY_APP:-kvstore} \ moniker=${MONIKER:-dockernode} \ consensus.timeout_commit=500ms \ @@ -14,10 +14,10 @@ if [ ! -d "${TMHOME}/config" ]; then p2p.addr_book_strict=false \ instrumentation.prometheus=true - sconfig -s ${TMHOME}/config/genesis.json \ + sconfig -s ${CMTHOME}/config/genesis.json \ chain_id=${CHAIN_ID:-dockerchain} \ consensus_params.block.time_iota_ms=500 fi -exec /usr/bin/tendermint "$@" +exec /usr/bin/cometbft "$@" diff --git a/tools/docker/tendermint/.gitignore b/tools/docker/tendermint/.gitignore index 9059c684..3af87e78 100644 --- a/tools/docker/tendermint/.gitignore +++ b/tools/docker/tendermint/.gitignore @@ -1 +1 @@ -tendermint +cometbft diff --git a/tools/docker/tendermint/Dockerfile b/tools/docker/tendermint/Dockerfile index 922beace..0674f788 100644 --- a/tools/docker/tendermint/Dockerfile +++ b/tools/docker/tendermint/Dockerfile @@ -1,24 +1,24 @@ FROM alpine:3.16 LABEL maintainer="hello@informal.systems" -ARG TMVERSION +ARG CMTVERSION -ENV TMHOME=/tendermint +ENV CMTHOME=/cometbft RUN apk --no-cache add jq bash && \ wget https://github.com/freshautomations/sconfig/releases/download/v0.1.0/sconfig_linux_amd64 \ - -O /usr/bin/sconfig && \ + -O /usr/bin/sconfig && \ chmod 755 /usr/bin/sconfig && \ cd /tmp && \ - wget https://github.com/tendermint/tendermint/releases/download/v${TMVERSION}/tendermint_${TMVERSION}_linux_amd64.tar.gz \ - -O ./tendermint.tar.gz && \ - tar xf tendermint.tar.gz && \ - mv tendermint /usr/bin/tendermint && \ - chmod 755 /usr/bin/tendermint && \ - rm tendermint.tar.gz && \ - addgroup tendermint && \ - adduser -S -G tendermint tendermint -h "$TMHOME" + wget https://github.com/cometbft/cometbft/releases/download/v${CMTVERSION}/cometbft_${CMTVERSION}_linux_amd64.tar.gz \ + -O ./cometbft.tar.gz && \ + tar xf cometbft.tar.gz && \ + mv cometbft /usr/bin/cometbft && \ + chmod 755 /usr/bin/cometbft && \ + rm cometbft.tar.gz && \ + addgroup cometbft && \ + adduser -S -G cometbft cometbft -h "$CMTHOME" -USER tendermint -WORKDIR $TMHOME +USER cometbft +WORKDIR $CMTHOME EXPOSE 26656 26657 26660 STOPSIGNAL SIGTERM @@ -26,4 +26,4 @@ STOPSIGNAL SIGTERM COPY entrypoint /usr/bin/entrypoint ENTRYPOINT ["/usr/bin/entrypoint"] CMD ["node"] -VOLUME [ "$TMHOME" ] +VOLUME [ "$CMTHOME" ] diff --git a/tools/docker/tendermint/entrypoint b/tools/docker/tendermint/entrypoint index 0b39c48e..cfd02fd6 100755 --- a/tools/docker/tendermint/entrypoint +++ b/tools/docker/tendermint/entrypoint @@ -1,12 +1,12 @@ #!/usr/bin/env sh set -euo pipefail -if [ ! -d "${TMHOME}/config" ]; then +if [ ! -d "${CMTHOME}/config" ]; then - echo "Running tendermint init to create configuration." - /usr/bin/tendermint init + echo "Running cometbft init to create configuration." + /usr/bin/cometbft init - sconfig -s ${TMHOME}/config/config.toml \ + sconfig -s ${CMTHOME}/config/config.toml \ proxy_app=${PROXY_APP:-kvstore} \ moniker=${MONIKER:-dockernode} \ consensus.timeout_commit=500ms \ @@ -14,10 +14,10 @@ if [ ! -d "${TMHOME}/config" ]; then p2p.addr_book_strict=false \ instrumentation.prometheus=true - sconfig -s ${TMHOME}/config/genesis.json \ + sconfig -s ${CMTHOME}/config/genesis.json \ chain_id=${CHAIN_ID:-dockerchain} \ consensus_params.block.time_iota_ms=500 fi -exec /usr/bin/tendermint "$@" +exec /usr/bin/cometbft "$@" diff --git a/tools/kvstore-test/Makefile.toml b/tools/kvstore-test/Makefile.toml index 72abfe14..be36a934 100644 --- a/tools/kvstore-test/Makefile.toml +++ b/tools/kvstore-test/Makefile.toml @@ -1,6 +1,6 @@ [env] CONTAINER_NAME = "kvstore-test" -DOCKER_IMAGE = "informaldev/tendermint:0.34.21" +DOCKER_IMAGE = "informaldev/cometbft:0.34.21" HOST_RPC_PORT = 26657 CARGO_MAKE_WAIT_MILLISECONDS = 1000 RUST_LOG = "debug" diff --git a/tools/kvstore-test/src/lib.rs b/tools/kvstore-test/src/lib.rs index eaed3171..dc072cf8 100644 --- a/tools/kvstore-test/src/lib.rs +++ b/tools/kvstore-test/src/lib.rs @@ -9,6 +9,6 @@ //! happen for example: on a developer machine //! Run: //! cargo make -//! This will start a docker container with Tendermint and attach port 26657 to the host machine. +//! This will start a docker container with CometBFT and attach port 26657 to the host machine. //! Then it will run all tests against the freshly created endpoint. //! Make sure you installed cargo-make by running `cargo install cargo-make` first. diff --git a/tools/kvstore-test/tests/tendermint.rs b/tools/kvstore-test/tests/cometbft.rs similarity index 99% rename from tools/kvstore-test/tests/tendermint.rs rename to tools/kvstore-test/tests/cometbft.rs index 24336814..f81505dc 100644 --- a/tools/kvstore-test/tests/tendermint.rs +++ b/tools/kvstore-test/tests/cometbft.rs @@ -1,6 +1,6 @@ //! Integration tests -/// tendermint kvstore RPC integration tests. +/// cometbft kvstore RPC integration tests. /// /// If you have a kvstore app running on 127.0.0.1:26657, /// these can be run using: diff --git a/tools/kvstore-test/tests/light-client.rs b/tools/kvstore-test/tests/light-client.rs index 48b99858..79b131d4 100644 --- a/tools/kvstore-test/tests/light-client.rs +++ b/tools/kvstore-test/tests/light-client.rs @@ -50,7 +50,7 @@ fn make_instance(peer_id: PeerId, options: LightClientOptions, address: rpc::Url fn make_primary() -> Instance { let primary: PeerId = "BADFADAD0BEFEEDC0C0ADEADBEEFC0FFEEFACADE".parse().unwrap(); - // Because our CI infrastructure can only spawn a single Tendermint node at the moment, + // Because our CI infrastructure can only spawn a single CometBFT node at the moment, // we run this test against this very node as both the primary and witness. // In a production environment, one should make sure that the primary and witness are // different nodes, and check that the configured peer IDs match the ones returned diff --git a/tools/proto-compiler/README.md b/tools/proto-compiler/README.md index 39b738a9..67f90472 100644 --- a/tools/proto-compiler/README.md +++ b/tools/proto-compiler/README.md @@ -3,4 +3,4 @@ * `cargo run` in the compiler folder. The resultant structs will be created in the `proto/src/prost` folder. -Build the `tendermint-proto` crate. +Build the `cometbft-proto` crate. diff --git a/tools/rpc-probe/README.md b/tools/rpc-probe/README.md index f7679452..79465d7e 100644 --- a/tools/rpc-probe/README.md +++ b/tools/rpc-probe/README.md @@ -1,9 +1,9 @@ -# Tendermint RPC Probe +# CometBFT RPC Probe -The Tendermint RPC probe is an application that assists in testing the various +The CometBFT RPC probe is an application that assists in testing the various crates in this repository. It currently allows you to execute a quick probe of -a running [Tendermint] node, where a quick probe executes requests against all -of the [Tendermint RPC] endpoints (including subscriptions for different event +a running [CometBFT] node, where a quick probe executes requests against all +of the [CometBFT RPC] endpoints (including subscriptions for different event types), and saves all of the responses it gets as JSON files. These JSON files can be used in testing in other crates. @@ -26,18 +26,18 @@ cargo make This will: -1. Build the `tendermint-rpc-probe` executable -2. Pull the latest version of the Tendermint Docker image -3. Initialize and run a Tendermint node with the `kvstore` app in the +1. Build the `cometbft-rpc-probe` executable +2. Pull the latest version of the CometBFT Docker image +3. Initialize and run a CometBFT node with the `kvstore` app in the background. (This node exposes a WebSocket endpoint at `ws://127.0.0.1:26657/websocket`) -4. Run `tendermint-rpc-probe` against the running Tendermint node. +4. Run `cometbft-rpc-probe` against the running CometBFT node. 5. Terminate the Docker image. -To run a specific version of Tendermint, simply: +To run a specific version of CometBFT, simply: ```bash -cargo make --env DOCKER_IMAGE="informaldev/tendermint:v0.34.0" +cargo make --env DOCKER_IMAGE="informaldev/cometbft:v0.34.0" ``` ## Usage (without Docker) @@ -53,7 +53,7 @@ to see what options are available to run the probe. For example: ```bash -# Executes the probe with all default options (i.e. against a Tendermint node +# Executes the probe with all default options (i.e. against a CometBFT node # listening on 127.0.0.1:26657) cargo run @@ -91,6 +91,6 @@ For example, the `rpc/tests/incoming/abci_info.json` file (returned by the The full JSON-RPC wrapper is saved to disk. -[Tendermint]: https://github.com/tendermint/tendermint -[Tendermint RPC]: https://docs.tendermint.com/v0.34/rpc/ -[`abci_info`]: https://docs.tendermint.com/v0.34/rpc/#/ABCI/abci_info +[CometBFT]: https://github.com/cometbft/cometbft +[CometBFT RPC]: https://docs.cometbft.com/v1/rpc/ +[`abci_info`]: https://docs.cometbft.com/v1/rpc/#/ABCI/abci_info diff --git a/tools/rpc-probe/src/client.rs b/tools/rpc-probe/src/client.rs index e866294d..2ac81c28 100644 --- a/tools/rpc-probe/src/client.rs +++ b/tools/rpc-probe/src/client.rs @@ -1,8 +1,8 @@ -//! WebSocket client for interacting with a remote Tendermint node. +//! WebSocket client for interacting with a remote CometBFT node. //! //! We purposefully do not use the WebSocket client provided by the -//! `tendermint-rpc` crate because we need to record the raw JSON-RPC responses -//! from the remote endpoint. The `tendermint-rpc` client does not expose these +//! `cometbft-rpc` crate because we need to record the raw JSON-RPC responses +//! from the remote endpoint. The `cometbft-rpc` client does not expose these //! raw responses. use std::{borrow::Cow, collections::HashMap}; diff --git a/tools/rpc-probe/src/gaia.rs b/tools/rpc-probe/src/gaia.rs index 06b3ea02..04c971bb 100644 --- a/tools/rpc-probe/src/gaia.rs +++ b/tools/rpc-probe/src/gaia.rs @@ -1,4 +1,4 @@ -//! Plans for interacting with Tendermint nodes running +//! Plans for interacting with CometBFT nodes running //! [Gaia](https://github.com/cosmos/gaia). use std::path::Path; diff --git a/tools/rpc-probe/src/kvstore.rs b/tools/rpc-probe/src/kvstore.rs index e8230d84..12e14197 100644 --- a/tools/rpc-probe/src/kvstore.rs +++ b/tools/rpc-probe/src/kvstore.rs @@ -1,4 +1,4 @@ -//! RPC quick probe-related functionality specifically targeting a Tendermint +//! RPC quick probe-related functionality specifically targeting a CometBFT //! node running the `kvstore` ABCI application. use std::path::Path; diff --git a/tools/rpc-probe/src/main.rs b/tools/rpc-probe/src/main.rs index 62b5899b..125ee383 100644 --- a/tools/rpc-probe/src/main.rs +++ b/tools/rpc-probe/src/main.rs @@ -44,15 +44,15 @@ impl ToString for OutputPathBuf { } /// A utility application that primarily aims to assist in testing -/// compatibility between tendermint.rs (https://github.com/informalsystems/tendermint-rs) -/// and Tendermint (https://github.com/tendermint/tendermint). +/// compatibility between cometbft.rs (https://github.com/cometbft/cometbft-rs) +/// and CometBFT (https://github.com/cometbft/cometbft). /// /// Running this application will execute a "quick probe" against a running -/// Tendermint node. This executes a number of RPC requests against the node, +/// CometBFT node. This executes a number of RPC requests against the node, /// saving both the requests and responses to the desired output folder. #[derive(Debug, StructOpt)] struct Opts { - /// The address of the Tendermint node's WebSocket-based RPC endpoint. + /// The address of the CometBFT node's WebSocket-based RPC endpoint. #[structopt(default_value = "ws://127.0.0.1:26657/websocket", long)] pub addr: String, @@ -74,7 +74,7 @@ struct Opts { #[derive(Debug, StructOpt)] enum Command { - /// Execute a quick probe of a Tendermint node running the `kvstore` ABCI + /// Execute a quick probe of a CometBFT node running the `kvstore` ABCI /// application. Kvstore, /// Execute a probe of a Gaia node. diff --git a/tools/rpc-probe/src/plan.rs b/tools/rpc-probe/src/plan.rs index 6212cc68..07ae23a2 100644 --- a/tools/rpc-probe/src/plan.rs +++ b/tools/rpc-probe/src/plan.rs @@ -38,7 +38,7 @@ struct PlanConfig { } /// A structured, sequential execution plan for interactions we would like to -/// execute against a running Tendermint node. +/// execute against a running CometBFT node. #[derive(Debug, Clone)] pub struct Plan { // Overall configuration for the plan. @@ -85,12 +85,12 @@ impl Plan { }) } - /// Executes the plan against a Tendermint node running at the given URL. + /// Executes the plan against a CometBFT node running at the given URL. /// /// This method assumes that the URL is the full WebSocket URL to the /// node's RPC (e.g. `ws://127.0.0.1:26657/websocket`). pub async fn execute(&self, url: &str) -> Result<()> { - info!("Connecting to Tendermint node at {}", url); + info!("Connecting to CometBFT node at {}", url); let (mut client, driver) = Client::new(url).await?; let driver_handle = tokio::spawn(async move { driver.run().await }); diff --git a/tools/rpc-probe/src/request.rs b/tools/rpc-probe/src/request.rs index d97b3624..8761d36e 100644 --- a/tools/rpc-probe/src/request.rs +++ b/tools/rpc-probe/src/request.rs @@ -1,4 +1,4 @@ -//! Messages for interacting with the Tendermint RPC. +//! Messages for interacting with the CometBFT RPC. use std::fmt;