diff --git a/Cargo.toml b/Cargo.toml index f185e28d..971bd413 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ resolver = "2" members = [ - "abci", + "cometbft", "config", "light-client", "light-client-verifier", @@ -14,7 +14,6 @@ members = [ "proto", "rpc", "std-ext", - "tendermint", "test", "testgen" ] @@ -24,6 +23,6 @@ exclude = [ "tools/no-std-check" ] -[profile.release.package.tendermint-light-client-js] +[profile.release.package.cometbft-light-client-js] # Tell `rustc` to optimize for small code size. opt-level = "s" diff --git a/abci/Cargo.toml b/abci/Cargo.toml deleted file mode 100644 index 0ae0072f..00000000 --- a/abci/Cargo.toml +++ /dev/null @@ -1,40 +0,0 @@ -[package] -name = "tendermint-abci" -version = "0.34.0" -authors = ["Informal Systems "] -edition = "2021" -license = "Apache-2.0" -readme = "README.md" -categories = ["cryptography::cryptocurrencies", "network-programming"] -keywords = ["abci", "blockchain", "bft", "consensus", "tendermint"] -repository = "https://github.com/informalsystems/tendermint-rs" -description = """ - tendermint-abci provides a simple framework with which to build low-level - applications on top of Tendermint. - """ - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[[bin]] -name = "kvstore-rs" -path = "src/application/kvstore/main.rs" -required-features = [ "binary", "client", "kvstore-app" ] - -[features] -default = ["flex-error/std"] -client = [] -echo-app = [] -kvstore-app = [] -binary = [ - "structopt", - "tracing-subscriber/fmt", -] - -[dependencies] -bytes = { version = "1.0", default-features = false } -prost = { version = "0.12", default-features = false } -tendermint-proto = { version = "0.34.0", default-features = false, path = "../proto" } -tracing = { version = "0.1", default-features = false } -flex-error = { version = "0.4.4", default-features = false } -structopt = { version = "0.3", optional = true, default-features = false } -tracing-subscriber = { version = "0.2", optional = true, default-features = false } diff --git a/abci/README.md b/abci/README.md deleted file mode 100644 index 48048990..00000000 --- a/abci/README.md +++ /dev/null @@ -1,116 +0,0 @@ -## tendermint-abci - -[![Crate][crate-image]][crate-link] -[![Docs][docs-image]][docs-link] -[![Build Status][build-image]][build-link] -[![Audit Status][audit-image]][audit-link] -[![Apache 2.0 Licensed][license-image]][license-link] -![Rust Stable][rustc-image] - -[ABCI] framework for building low-level applications for Tendermint in Rust. - -## Requirements - -- The latest stable version of Rust - -## API - -At present, this crate only exposes a synchronous, blocking API based on Rust's -standard library's networking capabilities. `async` client/server support is -planned in future updates. - -The primary trait to be implemented by an ABCI application is the -[`Application`] trait. One of the core ideas here is that an ABCI application -must be able to be cloned for use in different threads, since Tendermint opens -4 connections to the ABCI server. See the [spec][tendermint-abci-spec] for -details. - -## Examples - -See [`src/application`](./src/application/) for some example applications -written using this crate. - -To run the key/value store example application, from the `tendermint-abci` -crate's directory: - -```bash -# Set your logging level through RUST_LOG (e.g. RUST_LOG=info) -# Binds to 127.0.0.1:26658 -RUST_LOG=debug cargo run --bin kvstore-rs --features binary,kvstore-app - -# Reset and run your Tendermint node (binds RPC to 127.0.0.1:26657 by default) -tendermint unsafe_reset_all && tendermint start - -# Submit a key/value pair (set "somekey" to "somevalue") -curl 'http://127.0.0.1:26657/broadcast_tx_async?tx="somekey=somevalue"' - -#{ -# "jsonrpc": "2.0", -# "id": -1, -# "result": { -# "code": 0, -# "data": "", -# "log": "", -# "codespace": "", -# "hash": "17ED61261A5357FEE7ACDE4FAB154882A346E479AC236CFB2F22A2E8870A9C3D" -# } -#} - -# Query for the value we just submitted ("736f6d656b6579" is the hex -# representation of "somekey") -curl 'http://127.0.0.1:26657/abci_query?data=0x736f6d656b6579' - -#{ -# "jsonrpc": "2.0", -# "id": -1, -# "result": { -# "response": { -# "code": 0, -# "log": "exists", -# "info": "", -# "index": "0", -# "key": "c29tZWtleQ==", -# "value": "c29tZXZhbHVl", -# "proofOps": null, -# "height": "189", -# "codespace": "" -# } -# } -#} -``` - -## License - -Copyright © 2021 Informal Systems - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use the files in this repository except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -[//]: # (badges) - -[crate-image]: https://img.shields.io/crates/v/tendermint-abci.svg -[crate-link]: https://crates.io/crates/tendermint-abci -[docs-image]: https://docs.rs/tendermint-abci/badge.svg -[docs-link]: https://docs.rs/tendermint-abci/ -[build-image]: https://github.com/informalsystems/tendermint-rs/workflows/Rust/badge.svg -[build-link]: https://github.com/informalsystems/tendermint-rs/actions?query=workflow%3ARust -[audit-image]: https://github.com/informalsystems/tendermint-rs/workflows/Audit-Check/badge.svg -[audit-link]: https://github.com/informalsystems/tendermint-rs/actions?query=workflow%3AAudit-Check -[license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg -[license-link]: https://github.com/informalsystems/tendermint-rs/blob/main/LICENSE -[rustc-image]: https://img.shields.io/badge/rustc-stable-blue.svg - -[//]: # (general links) - -[ABCI]: https://github.com/tendermint/tendermint/tree/v0.34.x/spec/abci/ -[`Application`]: ./src/application.rs -[tendermint-abci-spec]: https://github.com/tendermint/spec/blob/master/spec/abci/abci.md diff --git a/abci/src/application.rs b/abci/src/application.rs deleted file mode 100644 index 263ea7ec..00000000 --- a/abci/src/application.rs +++ /dev/null @@ -1,202 +0,0 @@ -//! ABCI application interface. - -#[cfg(feature = "echo-app")] -pub mod echo; -#[cfg(feature = "kvstore-app")] -pub mod kvstore; - -use tendermint_proto::v0_38::abci::{ - request::Value, response, response_process_proposal, response_verify_vote_extension, Request, - RequestApplySnapshotChunk, RequestCheckTx, RequestEcho, RequestExtendVote, - RequestFinalizeBlock, RequestInfo, RequestInitChain, RequestLoadSnapshotChunk, - RequestOfferSnapshot, RequestPrepareProposal, RequestProcessProposal, RequestQuery, - RequestVerifyVoteExtension, Response, ResponseApplySnapshotChunk, ResponseCheckTx, - ResponseCommit, ResponseEcho, ResponseExtendVote, ResponseFinalizeBlock, ResponseFlush, - ResponseInfo, ResponseInitChain, ResponseListSnapshots, ResponseLoadSnapshotChunk, - ResponseOfferSnapshot, ResponsePrepareProposal, ResponseProcessProposal, ResponseQuery, - ResponseVerifyVoteExtension, -}; - -/// An ABCI application. -/// -/// Applications are `Send` + `Clone` + `'static` because they are cloned for -/// each incoming connection to the ABCI [`Server`]. It is up to the -/// application developer to manage shared state between these clones of their -/// application. -/// -/// [`Server`]: crate::Server -pub trait Application: Send + Clone + 'static { - /// Echo back the same message as provided in the request. - fn echo(&self, request: RequestEcho) -> ResponseEcho { - ResponseEcho { - message: request.message, - } - } - - /// Provide information about the ABCI application. - fn info(&self, _request: RequestInfo) -> ResponseInfo { - Default::default() - } - - /// Called once upon genesis. - fn init_chain(&self, _request: RequestInitChain) -> ResponseInitChain { - Default::default() - } - - /// Query the application for data at the current or past height. - fn query(&self, _request: RequestQuery) -> ResponseQuery { - Default::default() - } - - /// Check the given transaction before putting it into the local mempool. - fn check_tx(&self, _request: RequestCheckTx) -> ResponseCheckTx { - Default::default() - } - - /// Signals that messages queued on the client should be flushed to the server. - fn flush(&self) -> ResponseFlush { - ResponseFlush {} - } - - /// Commit the current state at the current height. - fn commit(&self) -> ResponseCommit { - Default::default() - } - - /// Used during state sync to discover available snapshots on peers. - fn list_snapshots(&self) -> ResponseListSnapshots { - Default::default() - } - - /// Called when bootstrapping the node using state sync. - fn offer_snapshot(&self, _request: RequestOfferSnapshot) -> ResponseOfferSnapshot { - Default::default() - } - - /// Used during state sync to retrieve chunks of snapshots from peers. - fn load_snapshot_chunk(&self, _request: RequestLoadSnapshotChunk) -> ResponseLoadSnapshotChunk { - Default::default() - } - - /// Apply the given snapshot chunk to the application's state. - fn apply_snapshot_chunk( - &self, - _request: RequestApplySnapshotChunk, - ) -> ResponseApplySnapshotChunk { - Default::default() - } - - /// A stage where the application can modify the list of transactions - /// in the preliminary proposal. - /// - /// The default implementation implements the required behavior in a - /// very naive way, removing transactions off the end of the list - /// until the limit on the total size of the transaction is met as - /// specified in the `max_tx_bytes` field of the request, or there are - /// no more transactions. It's up to the application to implement - /// more elaborate removal strategies. - /// - /// This method is introduced in ABCI++. - fn prepare_proposal(&self, request: RequestPrepareProposal) -> ResponsePrepareProposal { - // Per the ABCI++ spec: if the size of RequestPrepareProposal.txs is - // greater than RequestPrepareProposal.max_tx_bytes, the Application - // MUST remove transactions to ensure that the - // RequestPrepareProposal.max_tx_bytes limit is respected by those - // transactions returned in ResponsePrepareProposal.txs. - let RequestPrepareProposal { - mut txs, - max_tx_bytes, - .. - } = request; - let max_tx_bytes: usize = max_tx_bytes.try_into().unwrap_or(0); - let mut total_tx_bytes: usize = txs - .iter() - .map(|tx| tx.len()) - .fold(0, |acc, len| acc.saturating_add(len)); - while total_tx_bytes > max_tx_bytes { - if let Some(tx) = txs.pop() { - total_tx_bytes = total_tx_bytes.saturating_sub(tx.len()); - } else { - break; - } - } - ResponsePrepareProposal { txs } - } - - /// A stage where the application can accept or reject the proposed block. - /// - /// The default implementation returns the status value of `ACCEPT`. - /// - /// This method is introduced in ABCI++. - fn process_proposal(&self, _request: RequestProcessProposal) -> ResponseProcessProposal { - ResponseProcessProposal { - status: response_process_proposal::ProposalStatus::Accept as i32, - } - } - - fn extend_vote(&self, _request: RequestExtendVote) -> ResponseExtendVote { - Default::default() - } - - fn verify_vote_extension( - &self, - _request: RequestVerifyVoteExtension, - ) -> ResponseVerifyVoteExtension { - ResponseVerifyVoteExtension { - status: response_verify_vote_extension::VerifyStatus::Accept as i32, - } - } - - fn finalize_block(&self, _request: RequestFinalizeBlock) -> ResponseFinalizeBlock { - Default::default() - } -} - -/// Provides a mechanism for the [`Server`] to execute incoming requests while -/// expecting the correct response types. -pub trait RequestDispatcher { - /// Executes the relevant application method based on the type of the - /// request, and produces the corresponding response. - fn handle(&self, request: Request) -> Response; -} - -// Implement `RequestDispatcher` for all `Application`s. -impl RequestDispatcher for A { - fn handle(&self, request: Request) -> Response { - tracing::debug!("Incoming request: {:?}", request); - Response { - value: Some(match request.value.unwrap() { - Value::Echo(req) => response::Value::Echo(self.echo(req)), - Value::Flush(_) => response::Value::Flush(self.flush()), - Value::Info(req) => response::Value::Info(self.info(req)), - Value::InitChain(req) => response::Value::InitChain(self.init_chain(req)), - Value::Query(req) => response::Value::Query(self.query(req)), - Value::CheckTx(req) => response::Value::CheckTx(self.check_tx(req)), - Value::Commit(_) => response::Value::Commit(self.commit()), - Value::ListSnapshots(_) => response::Value::ListSnapshots(self.list_snapshots()), - Value::OfferSnapshot(req) => { - response::Value::OfferSnapshot(self.offer_snapshot(req)) - }, - Value::LoadSnapshotChunk(req) => { - response::Value::LoadSnapshotChunk(self.load_snapshot_chunk(req)) - }, - Value::ApplySnapshotChunk(req) => { - response::Value::ApplySnapshotChunk(self.apply_snapshot_chunk(req)) - }, - Value::PrepareProposal(req) => { - response::Value::PrepareProposal(self.prepare_proposal(req)) - }, - Value::ProcessProposal(req) => { - response::Value::ProcessProposal(self.process_proposal(req)) - }, - Value::ExtendVote(req) => response::Value::ExtendVote(self.extend_vote(req)), - Value::VerifyVoteExtension(req) => { - response::Value::VerifyVoteExtension(self.verify_vote_extension(req)) - }, - Value::FinalizeBlock(req) => { - response::Value::FinalizeBlock(self.finalize_block(req)) - }, - }), - } - } -} diff --git a/abci/src/application/echo.rs b/abci/src/application/echo.rs deleted file mode 100644 index 93e7fd5c..00000000 --- a/abci/src/application/echo.rs +++ /dev/null @@ -1,9 +0,0 @@ -//! Trivial ABCI echo application - -use crate::Application; - -/// Trivial echo application, mainly for testing purposes. -#[derive(Clone, Default)] -pub struct EchoApp; - -impl Application for EchoApp {} diff --git a/abci/src/application/kvstore.rs b/abci/src/application/kvstore.rs deleted file mode 100644 index 0410dfa5..00000000 --- a/abci/src/application/kvstore.rs +++ /dev/null @@ -1,316 +0,0 @@ -//! In-memory key/value store ABCI application. - -use std::{ - collections::HashMap, - sync::mpsc::{channel, Receiver, Sender}, -}; - -use bytes::BytesMut; -use tendermint_proto::v0_38::abci::{ - Event, EventAttribute, RequestCheckTx, RequestFinalizeBlock, RequestInfo, RequestQuery, - ResponseCheckTx, ResponseCommit, ResponseFinalizeBlock, ResponseInfo, ResponseQuery, -}; -use tracing::{debug, info}; - -use crate::{codec::MAX_VARINT_LENGTH, Application, Error}; - -/// In-memory, hashmap-backed key/value store ABCI application. -/// -/// This structure effectively just serves as a handle to the actual key/value -/// store - the [`KeyValueStoreDriver`]. -/// -/// ## Example -/// -/// ``` -/// use tendermint_abci::{KeyValueStoreApp, ServerBuilder, ClientBuilder}; -/// use tendermint_proto::abci::{RequestEcho, RequestFinalizeBlock, RequestQuery}; -/// -/// // Create our key/value store application -/// let (app, driver) = KeyValueStoreApp::new(); -/// // Create our server, binding it to TCP port 26658 on localhost and -/// // supplying it with our key/value store application -/// let server = ServerBuilder::default().bind("127.0.0.1:26658", app).unwrap(); -/// let server_addr = server.local_addr(); -/// -/// // We want the driver and the server to run in the background while we -/// // interact with them via the client in the foreground -/// std::thread::spawn(move || driver.run()); -/// std::thread::spawn(move || server.listen()); -/// -/// let mut client = ClientBuilder::default().connect(server_addr).unwrap(); -/// let res = client -/// .echo(RequestEcho { -/// message: "Hello ABCI!".to_string(), -/// }) -/// .unwrap(); -/// assert_eq!(res.message, "Hello ABCI!"); -/// -/// // Deliver a transaction and then commit the transaction -/// client -/// .finalize_block(RequestFinalizeBlock { -/// txs: vec!["test-key=test-value".into()], -/// ..Default::default() -/// }) -/// .unwrap(); -/// client.commit().unwrap(); -/// -/// // We should be able to query for the data we just delivered above -/// let res = client -/// .query(RequestQuery { -/// data: "test-key".into(), -/// path: "".to_string(), -/// height: 0, -/// prove: false, -/// }) -/// .unwrap(); -/// assert_eq!(res.value, "test-value".as_bytes().to_owned()); -/// ``` -#[derive(Debug, Clone)] -pub struct KeyValueStoreApp { - cmd_tx: Sender, -} - -impl KeyValueStoreApp { - /// Constructor. - pub fn new() -> (Self, KeyValueStoreDriver) { - let (cmd_tx, cmd_rx) = channel(); - (Self { cmd_tx }, KeyValueStoreDriver::new(cmd_rx)) - } - - /// Attempt to retrieve the value associated with the given key. - pub fn get>(&self, key: K) -> Result<(i64, Option), Error> { - let (result_tx, result_rx) = channel(); - channel_send( - &self.cmd_tx, - Command::Get { - key: key.as_ref().to_string(), - result_tx, - }, - )?; - channel_recv(&result_rx) - } - - /// Attempt to set the value associated with the given key. - /// - /// Optionally returns any pre-existing value associated with the given - /// key. - pub fn set(&self, key: K, value: V) -> Result, Error> - where - K: AsRef, - V: AsRef, - { - let (result_tx, result_rx) = channel(); - channel_send( - &self.cmd_tx, - Command::Set { - key: key.as_ref().to_string(), - value: value.as_ref().to_string(), - result_tx, - }, - )?; - channel_recv(&result_rx) - } -} - -impl Application for KeyValueStoreApp { - fn info(&self, request: RequestInfo) -> ResponseInfo { - debug!( - "Got info request. Tendermint version: {}; Block version: {}; P2P version: {}", - request.version, request.block_version, request.p2p_version - ); - - let (result_tx, result_rx) = channel(); - channel_send(&self.cmd_tx, Command::GetInfo { result_tx }).unwrap(); - let (last_block_height, last_block_app_hash) = channel_recv(&result_rx).unwrap(); - - ResponseInfo { - data: "kvstore-rs".to_string(), - version: "0.1.0".to_string(), - app_version: 1, - last_block_height, - last_block_app_hash: last_block_app_hash.into(), - } - } - - fn query(&self, request: RequestQuery) -> ResponseQuery { - let key = match std::str::from_utf8(&request.data) { - Ok(s) => s, - Err(e) => panic!("Failed to interpret key as UTF-8: {e}"), - }; - debug!("Attempting to get key: {}", key); - match self.get(key) { - Ok((height, value_opt)) => match value_opt { - Some(value) => ResponseQuery { - code: 0, - log: "exists".to_string(), - info: "".to_string(), - index: 0, - key: request.data, - value: value.into_bytes().into(), - proof_ops: None, - height, - codespace: "".to_string(), - }, - None => ResponseQuery { - code: 0, - log: "does not exist".to_string(), - info: "".to_string(), - index: 0, - key: request.data, - value: Default::default(), - proof_ops: None, - height, - codespace: "".to_string(), - }, - }, - Err(e) => panic!("Failed to get key \"{key}\": {e:?}"), - } - } - - fn check_tx(&self, _request: RequestCheckTx) -> ResponseCheckTx { - ResponseCheckTx { - code: 0, - data: Default::default(), - log: "".to_string(), - info: "".to_string(), - gas_wanted: 1, - gas_used: 0, - events: vec![], - codespace: "".to_string(), - } - } - - fn commit(&self) -> ResponseCommit { - let (result_tx, result_rx) = channel(); - channel_send(&self.cmd_tx, Command::Commit { result_tx }).unwrap(); - let height = channel_recv(&result_rx).unwrap(); - info!("Committed height {}", height); - ResponseCommit { - retain_height: height - 1, - } - } - - fn finalize_block(&self, request: RequestFinalizeBlock) -> ResponseFinalizeBlock { - let mut events = Vec::new(); - for tx in request.txs { - let tx = std::str::from_utf8(&tx).unwrap(); - let tx_parts = tx.split('=').collect::>(); - let (key, value) = if tx_parts.len() == 2 { - (tx_parts[0], tx_parts[1]) - } else { - (tx, tx) - }; - let _ = self.set(key, value).unwrap(); - events.push(Event { - r#type: "app".to_string(), - attributes: vec![ - EventAttribute { - key: "key".to_owned(), - value: key.to_owned(), - index: true, - }, - EventAttribute { - key: "index_key".to_owned(), - value: "index is working".to_owned(), - index: true, - }, - EventAttribute { - key: "noindex_key".to_owned(), - value: "index is working".to_owned(), - index: false, - }, - ], - }); - } - ResponseFinalizeBlock { - events, - ..Default::default() - } - } -} - -/// Manages key/value store state. -#[derive(Debug)] -pub struct KeyValueStoreDriver { - store: HashMap, - height: i64, - app_hash: Vec, - cmd_rx: Receiver, -} - -impl KeyValueStoreDriver { - fn new(cmd_rx: Receiver) -> Self { - Self { - store: HashMap::new(), - height: 0, - app_hash: vec![0_u8; MAX_VARINT_LENGTH], - cmd_rx, - } - } - - /// Run the driver in the current thread (blocking). - pub fn run(mut self) -> Result<(), Error> { - loop { - let cmd = self.cmd_rx.recv().map_err(Error::channel_recv)?; - match cmd { - Command::GetInfo { result_tx } => { - channel_send(&result_tx, (self.height, self.app_hash.clone()))? - }, - Command::Get { key, result_tx } => { - debug!("Getting value for \"{}\"", key); - channel_send( - &result_tx, - (self.height, self.store.get(&key).map(Clone::clone)), - )?; - }, - Command::Set { - key, - value, - result_tx, - } => { - debug!("Setting \"{}\" = \"{}\"", key, value); - channel_send(&result_tx, self.store.insert(key, value))?; - }, - Command::Commit { result_tx } => self.commit(result_tx)?, - } - } - } - - fn commit(&mut self, result_tx: Sender) -> Result<(), Error> { - // As in the Go-based key/value store, simply encode the number of - // items as the "app hash" - let mut app_hash = BytesMut::with_capacity(MAX_VARINT_LENGTH); - prost::encoding::encode_varint(self.store.len() as u64, &mut app_hash); - self.app_hash = app_hash.to_vec(); - self.height += 1; - channel_send(&result_tx, self.height) - } -} - -#[derive(Debug, Clone)] -enum Command { - /// Get the height of the last commit. - GetInfo { result_tx: Sender<(i64, Vec)> }, - /// Get the key associated with `key`. - Get { - key: String, - result_tx: Sender<(i64, Option)>, - }, - /// Set the value of `key` to to `value`. - Set { - key: String, - value: String, - result_tx: Sender>, - }, - /// Commit the current state of the application, which involves recomputing - /// the application's hash, and return the new height. - Commit { result_tx: Sender }, -} - -fn channel_send(tx: &Sender, value: T) -> Result<(), Error> { - tx.send(value).map_err(Error::send) -} - -fn channel_recv(rx: &Receiver) -> Result { - rx.recv().map_err(Error::channel_recv) -} diff --git a/abci/src/application/kvstore/main.rs b/abci/src/application/kvstore/main.rs deleted file mode 100644 index 5eba12d7..00000000 --- a/abci/src/application/kvstore/main.rs +++ /dev/null @@ -1,48 +0,0 @@ -//! In-memory key/value store application for Tendermint. - -use structopt::StructOpt; -use tendermint_abci::{KeyValueStoreApp, ServerBuilder}; -use tracing_subscriber::filter::LevelFilter; - -#[derive(Debug, StructOpt)] -struct Opt { - /// Bind the TCP server to this host. - #[structopt(short, long, default_value = "127.0.0.1")] - host: String, - - /// Bind the TCP server to this port. - #[structopt(short, long, default_value = "26658")] - port: u16, - - /// The default server read buffer size, in bytes, for each incoming client - /// connection. - #[structopt(short, long, default_value = "1048576")] - read_buf_size: usize, - - /// Increase output logging verbosity to DEBUG level. - #[structopt(short, long)] - verbose: bool, - - /// Suppress all output logging (overrides --verbose). - #[structopt(short, long)] - quiet: bool, -} - -fn main() { - let opt: Opt = Opt::from_args(); - let log_level = if opt.quiet { - LevelFilter::OFF - } else if opt.verbose { - LevelFilter::DEBUG - } else { - LevelFilter::INFO - }; - tracing_subscriber::fmt().with_max_level(log_level).init(); - - let (app, driver) = KeyValueStoreApp::new(); - let server = ServerBuilder::new(opt.read_buf_size) - .bind(format!("{}:{}", opt.host, opt.port), app) - .unwrap(); - std::thread::spawn(move || driver.run()); - server.listen().unwrap(); -} diff --git a/abci/src/client.rs b/abci/src/client.rs deleted file mode 100644 index 45e1350b..00000000 --- a/abci/src/client.rs +++ /dev/null @@ -1,156 +0,0 @@ -//! Blocking ABCI client. - -use std::net::{TcpStream, ToSocketAddrs}; - -use tendermint_proto::v0_38::abci::{ - request, response, Request, RequestApplySnapshotChunk, RequestCheckTx, RequestCommit, - RequestEcho, RequestExtendVote, RequestFinalizeBlock, RequestFlush, RequestInfo, - RequestInitChain, RequestListSnapshots, RequestLoadSnapshotChunk, RequestOfferSnapshot, - RequestQuery, RequestVerifyVoteExtension, ResponseApplySnapshotChunk, ResponseCheckTx, - ResponseCommit, ResponseEcho, ResponseExtendVote, ResponseFinalizeBlock, ResponseFlush, - ResponseInfo, ResponseInitChain, ResponseListSnapshots, ResponseLoadSnapshotChunk, - ResponseOfferSnapshot, ResponseQuery, ResponseVerifyVoteExtension, -}; - -use crate::{codec::ClientCodec, Error}; - -/// The size of the read buffer for the client in its receiving of responses -/// from the server. -pub const DEFAULT_CLIENT_READ_BUF_SIZE: usize = 1024; - -/// Builder for a blocking ABCI client. -pub struct ClientBuilder { - read_buf_size: usize, -} - -impl ClientBuilder { - /// Builder constructor. - pub fn new(read_buf_size: usize) -> Self { - Self { read_buf_size } - } - - /// Client constructor that attempts to connect to the given network - /// address. - pub fn connect(self, addr: A) -> Result { - let stream = TcpStream::connect(addr).map_err(Error::io)?; - Ok(Client { - codec: ClientCodec::new(stream, self.read_buf_size), - }) - } -} - -impl Default for ClientBuilder { - fn default() -> Self { - Self { - read_buf_size: DEFAULT_CLIENT_READ_BUF_SIZE, - } - } -} - -/// Blocking ABCI client. -pub struct Client { - codec: ClientCodec, -} - -macro_rules! perform { - ($self:expr, $type:ident, $req:expr) => { - match $self.perform(request::Value::$type($req))? { - response::Value::$type(r) => Ok(r), - r => { - Err(Error::unexpected_server_response_type(stringify!($type).to_string(), r).into()) - }, - } - }; -} - -impl Client { - /// Ask the ABCI server to echo back a message. - pub fn echo(&mut self, req: RequestEcho) -> Result { - perform!(self, Echo, req) - } - - /// Request information about the ABCI application. - pub fn info(&mut self, req: RequestInfo) -> Result { - perform!(self, Info, req) - } - - /// To be called once upon genesis. - pub fn init_chain(&mut self, req: RequestInitChain) -> Result { - perform!(self, InitChain, req) - } - - /// Query the application for data at the current or past height. - pub fn query(&mut self, req: RequestQuery) -> Result { - perform!(self, Query, req) - } - - /// Check the given transaction before putting it into the local mempool. - pub fn check_tx(&mut self, req: RequestCheckTx) -> Result { - perform!(self, CheckTx, req) - } - - pub fn flush(&mut self) -> Result { - perform!(self, Flush, RequestFlush {}) - } - - /// Commit the current state at the current height. - pub fn commit(&mut self) -> Result { - perform!(self, Commit, RequestCommit {}) - } - - /// Used during state sync to discover available snapshots on peers. - pub fn list_snapshots(&mut self) -> Result { - perform!(self, ListSnapshots, RequestListSnapshots {}) - } - - /// Called when bootstrapping the node using state sync. - pub fn offer_snapshot( - &mut self, - req: RequestOfferSnapshot, - ) -> Result { - perform!(self, OfferSnapshot, req) - } - - /// Used during state sync to retrieve chunks of snapshots from peers. - pub fn load_snapshot_chunk( - &mut self, - req: RequestLoadSnapshotChunk, - ) -> Result { - perform!(self, LoadSnapshotChunk, req) - } - - /// Apply the given snapshot chunk to the application's state. - pub fn apply_snapshot_chunk( - &mut self, - req: RequestApplySnapshotChunk, - ) -> Result { - perform!(self, ApplySnapshotChunk, req) - } - - pub fn extend_vote(&mut self, req: RequestExtendVote) -> Result { - perform!(self, ExtendVote, req) - } - - pub fn verify_vote_extension( - &mut self, - req: RequestVerifyVoteExtension, - ) -> Result { - perform!(self, VerifyVoteExtension, req) - } - - pub fn finalize_block( - &mut self, - req: RequestFinalizeBlock, - ) -> Result { - perform!(self, FinalizeBlock, req) - } - - fn perform(&mut self, req: request::Value) -> Result { - self.codec.send(Request { value: Some(req) })?; - let res = self - .codec - .next() - .ok_or_else(Error::server_connection_terminated)??; - res.value.ok_or_else(Error::malformed_server_response) - } -} diff --git a/abci/src/codec.rs b/abci/src/codec.rs deleted file mode 100644 index 258c083a..00000000 --- a/abci/src/codec.rs +++ /dev/null @@ -1,166 +0,0 @@ -//! Encoding/decoding mechanisms for ABCI requests and responses. -//! -//! Implements the [Tendermint Socket Protocol][tsp]. -//! -//! [tsp]: https://github.com/tendermint/tendermint/blob/v0.34.x/spec/abci/client-server.md#tsp - -use std::{ - io::{Read, Write}, - marker::PhantomData, -}; - -use bytes::{Buf, BufMut, BytesMut}; -use prost::Message; -use tendermint_proto::v0_38::abci::{Request, Response}; - -use crate::error::Error; - -/// The maximum number of bytes we expect in a varint. We use this to check if -/// we're encountering a decoding error for a varint. -pub const MAX_VARINT_LENGTH: usize = 16; - -/// The server receives incoming requests, and sends outgoing responses. -pub type ServerCodec = Codec; - -#[cfg(feature = "client")] -/// The client sends outgoing requests, and receives incoming responses. -pub type ClientCodec = Codec; - -/// Allows for iteration over `S` to produce instances of `I`, as well as -/// sending instances of `O`. -pub struct Codec { - stream: S, - // Long-running read buffer - read_buf: BytesMut, - // Fixed-length read window - read_window: Vec, - write_buf: BytesMut, - _incoming: PhantomData, - _outgoing: PhantomData, -} - -impl Codec -where - S: Read + Write, - I: Message + Default, - O: Message, -{ - /// Constructor. - pub fn new(stream: S, read_buf_size: usize) -> Self { - Self { - stream, - read_buf: BytesMut::new(), - read_window: vec![0_u8; read_buf_size], - write_buf: BytesMut::new(), - _incoming: Default::default(), - _outgoing: Default::default(), - } - } -} - -// Iterating over a codec produces instances of `Result`. -impl Iterator for Codec -where - S: Read, - I: Message + Default, -{ - type Item = Result; - - fn next(&mut self) -> Option { - loop { - // Try to decode an incoming message from our buffer first - match decode_length_delimited::(&mut self.read_buf) { - Ok(Some(incoming)) => return Some(Ok(incoming)), - Err(e) => return Some(Err(e)), - _ => (), // not enough data to decode a message, let's continue. - } - - // If we don't have enough data to decode a message, try to read - // more - let bytes_read = match self.stream.read(self.read_window.as_mut()) { - Ok(br) => br, - Err(e) => return Some(Err(Error::io(e))), - }; - if bytes_read == 0 { - // The underlying stream terminated - return None; - } - self.read_buf - .extend_from_slice(&self.read_window[..bytes_read]); - } - } -} - -impl Codec -where - S: Write, - O: Message, -{ - /// Send a message using this codec. - pub fn send(&mut self, message: O) -> Result<(), Error> { - encode_length_delimited(message, &mut self.write_buf)?; - while !self.write_buf.is_empty() { - let bytes_written = self - .stream - .write(self.write_buf.as_ref()) - .map_err(Error::io)?; - - if bytes_written == 0 { - return Err(Error::io(std::io::Error::new( - std::io::ErrorKind::WriteZero, - "failed to write to underlying stream", - ))); - } - self.write_buf.advance(bytes_written); - } - - self.stream.flush().map_err(Error::io)?; - - Ok(()) - } -} - -/// Encode the given message with a length prefix. -pub fn encode_length_delimited(message: M, mut dst: &mut B) -> Result<(), Error> -where - M: Message, - B: BufMut, -{ - let mut buf = BytesMut::new(); - message.encode(&mut buf).map_err(Error::encode)?; - - let buf = buf.freeze(); - prost::encoding::encode_varint(buf.len() as u64, &mut dst); - dst.put(buf); - Ok(()) -} - -/// Attempt to decode a message of type `M` from the given source buffer. -pub fn decode_length_delimited(src: &mut BytesMut) -> Result, Error> -where - M: Message + Default, -{ - let src_len = src.len(); - let mut tmp = src.clone().freeze(); - let encoded_len = match prost::encoding::decode_varint(&mut tmp) { - Ok(len) => len, - // We've potentially only received a partial length delimiter - Err(_) if src_len <= MAX_VARINT_LENGTH => return Ok(None), - Err(e) => return Err(Error::decode(e)), - }; - let remaining = tmp.remaining() as u64; - if remaining < encoded_len { - // We don't have enough data yet to decode the entire message - Ok(None) - } else { - let delim_len = src_len - tmp.remaining(); - // We only advance the source buffer once we're sure we have enough - // data to try to decode the result. - src.advance(delim_len + (encoded_len as usize)); - - let mut result_bytes = BytesMut::from(tmp.split_to(encoded_len as usize).as_ref()); - let res = M::decode(&mut result_bytes).map_err(Error::decode)?; - - Ok(Some(res)) - } -} diff --git a/abci/src/error.rs b/abci/src/error.rs deleted file mode 100644 index 572b3089..00000000 --- a/abci/src/error.rs +++ /dev/null @@ -1,49 +0,0 @@ -//! tendermint-abci errors - -use flex_error::{define_error, DisplayError}; -use tendermint_proto::v0_38::abci::response::Value; - -define_error! { - Error { - Io - [ DisplayError ] - | _ | { "I/O error" }, - - Encode - [ DisplayError ] - | _ | { "error encoding protocol buffer" }, - - Decode - [ DisplayError ] - | _ | { "error encoding protocol buffer" }, - - ServerConnectionTerminated - | _ | { "server connection terminated" }, - - MalformedServerResponse - | _ | { "malformed server response" }, - - UnexpectedServerResponseType - { - expected: String, - got: Value, - } - | e | { - format_args!("unexpected server response type: expected {0}, but got {1:?}", - e.expected, e.got) - }, - - ChannelSend - | _ | { "channel send error" }, - - ChannelRecv - [ DisplayError ] - | _ | { "channel recv error" }, - } -} - -impl Error { - pub fn send(_e: std::sync::mpsc::SendError) -> Error { - Error::channel_send() - } -} diff --git a/abci/src/lib.rs b/abci/src/lib.rs deleted file mode 100644 index 20a660c2..00000000 --- a/abci/src/lib.rs +++ /dev/null @@ -1,22 +0,0 @@ -//! ABCI framework for building [Tendermint] applications in Rust. -//! -//! [Tendermint]: https://tendermint.com - -mod application; -#[cfg(feature = "client")] -mod client; -mod codec; -pub mod error; -mod server; - -// Common exports -// Example applications -#[cfg(feature = "echo-app")] -pub use application::echo::EchoApp; -#[cfg(feature = "kvstore-app")] -pub use application::kvstore::{KeyValueStoreApp, KeyValueStoreDriver}; -pub use application::Application; -#[cfg(feature = "client")] -pub use client::{Client, ClientBuilder}; -pub use error::Error; -pub use server::{Server, ServerBuilder}; diff --git a/abci/src/server.rs b/abci/src/server.rs deleted file mode 100644 index 3f822945..00000000 --- a/abci/src/server.rs +++ /dev/null @@ -1,123 +0,0 @@ -//! ABCI application server interface. - -use std::{ - net::{TcpListener, TcpStream, ToSocketAddrs}, - thread, -}; - -use tracing::{error, info}; - -use crate::{application::RequestDispatcher, codec::ServerCodec, error::Error, Application}; - -/// The size of the read buffer for each incoming connection to the ABCI -/// server (1MB). -pub const DEFAULT_SERVER_READ_BUF_SIZE: usize = 1024 * 1024; - -/// Allows us to configure and construct an ABCI server. -pub struct ServerBuilder { - read_buf_size: usize, -} - -impl ServerBuilder { - /// Builder constructor. - /// - /// Allows you to specify the read buffer size used when reading chunks of - /// incoming data from the client. This needs to be tuned for your - /// application. - pub fn new(read_buf_size: usize) -> Self { - Self { read_buf_size } - } - - /// Constructor for an ABCI server. - /// - /// Binds the server to the given address. You must subsequently call the - /// [`Server::listen`] method in order for incoming connections' requests - /// to be routed to the specified ABCI application. - pub fn bind(self, addr: Addr, app: App) -> Result, Error> - where - Addr: ToSocketAddrs, - App: Application, - { - let listener = TcpListener::bind(addr).map_err(Error::io)?; - let local_addr = listener.local_addr().map_err(Error::io)?.to_string(); - info!("ABCI server running at {}", local_addr); - Ok(Server { - app, - listener, - local_addr, - read_buf_size: self.read_buf_size, - }) - } -} - -impl Default for ServerBuilder { - fn default() -> Self { - Self { - read_buf_size: DEFAULT_SERVER_READ_BUF_SIZE, - } - } -} - -/// A TCP-based server for serving a specific ABCI application. -/// -/// Each incoming connection is handled in a separate thread. The ABCI -/// application is cloned for access in each thread. It is up to the -/// application developer to manage shared state across these different -/// threads. -pub struct Server { - app: App, - listener: TcpListener, - local_addr: String, - read_buf_size: usize, -} - -impl Server { - /// Initiate a blocking listener for incoming connections. - pub fn listen(self) -> Result<(), Error> { - loop { - let (stream, addr) = self.listener.accept().map_err(Error::io)?; - let addr = addr.to_string(); - info!("Incoming connection from: {}", addr); - self.spawn_client_handler(stream, addr); - } - } - - /// Getter for this server's local address. - pub fn local_addr(&self) -> String { - self.local_addr.clone() - } - - fn spawn_client_handler(&self, stream: TcpStream, addr: String) { - let app = self.app.clone(); - let read_buf_size = self.read_buf_size; - let _ = thread::spawn(move || Self::handle_client(stream, addr, app, read_buf_size)); - } - - fn handle_client(stream: TcpStream, addr: String, app: App, read_buf_size: usize) { - let mut codec = ServerCodec::new(stream, read_buf_size); - info!("Listening for incoming requests from {}", addr); - loop { - let request = match codec.next() { - Some(result) => match result { - Ok(r) => r, - Err(e) => { - error!( - "Failed to read incoming request from client {}: {:?}", - addr, e - ); - return; - }, - }, - None => { - info!("Client {} terminated stream", addr); - return; - }, - }; - let response = app.handle(request); - if let Err(e) = codec.send(response) { - error!("Failed sending response to client {}: {:?}", addr, e); - return; - } - } - } -} diff --git a/abci/tests/echo_app.rs b/abci/tests/echo_app.rs deleted file mode 100644 index 376143f0..00000000 --- a/abci/tests/echo_app.rs +++ /dev/null @@ -1,24 +0,0 @@ -//! Integration tests for ABCI client/server. - -#[cfg(all(feature = "client", feature = "echo-app"))] -mod echo_app_integration { - use tendermint_abci::{ClientBuilder, EchoApp, ServerBuilder}; - use tendermint_proto::v0_38::abci::RequestEcho; - - #[test] - fn echo() { - let server = ServerBuilder::default() - .bind("127.0.0.1:0", EchoApp) - .unwrap(); - let server_addr = server.local_addr(); - let _ = std::thread::spawn(move || server.listen()); - let mut client = ClientBuilder::default().connect(server_addr).unwrap(); - - let response = client - .echo(RequestEcho { - message: "Hello ABCI!".to_string(), - }) - .unwrap(); - assert_eq!(response.message, "Hello ABCI!"); - } -} diff --git a/abci/tests/kvstore_app.rs b/abci/tests/kvstore_app.rs deleted file mode 100644 index 42cf513a..00000000 --- a/abci/tests/kvstore_app.rs +++ /dev/null @@ -1,44 +0,0 @@ -//! Key/value store application integration tests. - -#[cfg(all(feature = "client", feature = "kvstore-app"))] -mod kvstore_app_integration { - use std::thread; - - use tendermint_abci::{ClientBuilder, KeyValueStoreApp, ServerBuilder}; - use tendermint_proto::v0_38::abci::{RequestEcho, RequestFinalizeBlock, RequestQuery}; - - #[test] - fn happy_path() { - let (app, driver) = KeyValueStoreApp::new(); - let server = ServerBuilder::default().bind("127.0.0.1:0", app).unwrap(); - let server_addr = server.local_addr(); - thread::spawn(move || driver.run()); - thread::spawn(move || server.listen()); - - let mut client = ClientBuilder::default().connect(server_addr).unwrap(); - let res = client - .echo(RequestEcho { - message: "Hello ABCI!".to_string(), - }) - .unwrap(); - assert_eq!(res.message, "Hello ABCI!"); - - client - .finalize_block(RequestFinalizeBlock { - txs: vec!["test-key=test-value".into()], - ..Default::default() - }) - .unwrap(); - client.commit().unwrap(); - - let res = client - .query(RequestQuery { - data: "test-key".into(), - path: "".to_string(), - height: 0, - prove: false, - }) - .unwrap(); - assert_eq!(res.value, "test-value".as_bytes()); - } -} diff --git a/tendermint/Cargo.toml b/cometbft/Cargo.toml similarity index 84% rename from tendermint/Cargo.toml rename to cometbft/Cargo.toml index a5754b51..8f2f6cbe 100644 --- a/tendermint/Cargo.toml +++ b/cometbft/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "tendermint" +name = "cometbft" version = "0.34.0" # Also update depending crates (rpc, light-node, etc..) when bumping this . license = "Apache-2.0" -homepage = "https://www.tendermint.com/" -repository = "https://github.com/informalsystems/tendermint-rs/tree/main/tendermint" +homepage = "https://cometbft.com/" +repository = "https://github.com/cometbft/cometbft-rs" readme = "../README.md" categories = ["cryptography", "cryptography::cryptocurrencies", "database"] -keywords = ["blockchain", "bft", "consensus", "cosmos", "tendermint"] +keywords = ["blockchain", "bft", "consensus", "cosmos", "cometbft", "tendermint"] edition = "2021" description = """ - Tendermint is a high-performance blockchain consensus engine that powers + CometBFT 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 + This crate provides core types for representing information about CometBFT blockchain networks, including chain information types, secret connections, and remote procedure calls (JSON-RPC). """ @@ -44,7 +44,7 @@ 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.34.0", default-features = false, path = "../proto" } +cometbft-proto = { version = "0.34.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 } @@ -64,4 +64,4 @@ rust-crypto = ["sha2", "ed25519-consensus"] k256 = { version = "0.13", default-features = false, features = ["ecdsa"] } pretty_assertions = "1.3.0" proptest = { version = "0.10.1", default-features = false, features = ["std"] } -tendermint-pbt-gen = { path = "../pbt-gen", default-features = false, features = ["time"] } +cometbft-pbt-gen = { path = "../pbt-gen", default-features = false, features = ["time"] } diff --git a/tendermint/README.md b/cometbft/README.md similarity index 100% rename from tendermint/README.md rename to cometbft/README.md diff --git a/tendermint/proptest-regressions/time.txt b/cometbft/proptest-regressions/time.txt similarity index 100% rename from tendermint/proptest-regressions/time.txt rename to cometbft/proptest-regressions/time.txt diff --git a/tendermint/proptest-regressions/trust_threshold.txt b/cometbft/proptest-regressions/trust_threshold.txt similarity index 100% rename from tendermint/proptest-regressions/trust_threshold.txt rename to cometbft/proptest-regressions/trust_threshold.txt diff --git a/tendermint/src/abci.rs b/cometbft/src/abci.rs similarity index 100% rename from tendermint/src/abci.rs rename to cometbft/src/abci.rs diff --git a/tendermint/src/abci/code.rs b/cometbft/src/abci/code.rs similarity index 100% rename from tendermint/src/abci/code.rs rename to cometbft/src/abci/code.rs diff --git a/tendermint/src/abci/doc/request-applysnapshotchunk.md b/cometbft/src/abci/doc/request-applysnapshotchunk.md similarity index 100% rename from tendermint/src/abci/doc/request-applysnapshotchunk.md rename to cometbft/src/abci/doc/request-applysnapshotchunk.md diff --git a/tendermint/src/abci/doc/request-beginblock.md b/cometbft/src/abci/doc/request-beginblock.md similarity index 100% rename from tendermint/src/abci/doc/request-beginblock.md rename to cometbft/src/abci/doc/request-beginblock.md diff --git a/tendermint/src/abci/doc/request-checktx.md b/cometbft/src/abci/doc/request-checktx.md similarity index 100% rename from tendermint/src/abci/doc/request-checktx.md rename to cometbft/src/abci/doc/request-checktx.md diff --git a/tendermint/src/abci/doc/request-commit.md b/cometbft/src/abci/doc/request-commit.md similarity index 100% rename from tendermint/src/abci/doc/request-commit.md rename to cometbft/src/abci/doc/request-commit.md diff --git a/tendermint/src/abci/doc/request-delivertx.md b/cometbft/src/abci/doc/request-delivertx.md similarity index 100% rename from tendermint/src/abci/doc/request-delivertx.md rename to cometbft/src/abci/doc/request-delivertx.md diff --git a/tendermint/src/abci/doc/request-echo.md b/cometbft/src/abci/doc/request-echo.md similarity index 100% rename from tendermint/src/abci/doc/request-echo.md rename to cometbft/src/abci/doc/request-echo.md diff --git a/tendermint/src/abci/doc/request-endblock.md b/cometbft/src/abci/doc/request-endblock.md similarity index 100% rename from tendermint/src/abci/doc/request-endblock.md rename to cometbft/src/abci/doc/request-endblock.md diff --git a/tendermint/src/abci/doc/request-extendvote.md b/cometbft/src/abci/doc/request-extendvote.md similarity index 100% rename from tendermint/src/abci/doc/request-extendvote.md rename to cometbft/src/abci/doc/request-extendvote.md diff --git a/tendermint/src/abci/doc/request-finalizeblock.md b/cometbft/src/abci/doc/request-finalizeblock.md similarity index 100% rename from tendermint/src/abci/doc/request-finalizeblock.md rename to cometbft/src/abci/doc/request-finalizeblock.md diff --git a/tendermint/src/abci/doc/request-flush.md b/cometbft/src/abci/doc/request-flush.md similarity index 100% rename from tendermint/src/abci/doc/request-flush.md rename to cometbft/src/abci/doc/request-flush.md diff --git a/tendermint/src/abci/doc/request-info.md b/cometbft/src/abci/doc/request-info.md similarity index 100% rename from tendermint/src/abci/doc/request-info.md rename to cometbft/src/abci/doc/request-info.md diff --git a/tendermint/src/abci/doc/request-initchain.md b/cometbft/src/abci/doc/request-initchain.md similarity index 100% rename from tendermint/src/abci/doc/request-initchain.md rename to cometbft/src/abci/doc/request-initchain.md diff --git a/tendermint/src/abci/doc/request-listsnapshots.md b/cometbft/src/abci/doc/request-listsnapshots.md similarity index 100% rename from tendermint/src/abci/doc/request-listsnapshots.md rename to cometbft/src/abci/doc/request-listsnapshots.md diff --git a/tendermint/src/abci/doc/request-loadsnapshotchunk.md b/cometbft/src/abci/doc/request-loadsnapshotchunk.md similarity index 100% rename from tendermint/src/abci/doc/request-loadsnapshotchunk.md rename to cometbft/src/abci/doc/request-loadsnapshotchunk.md diff --git a/tendermint/src/abci/doc/request-offersnapshot.md b/cometbft/src/abci/doc/request-offersnapshot.md similarity index 100% rename from tendermint/src/abci/doc/request-offersnapshot.md rename to cometbft/src/abci/doc/request-offersnapshot.md diff --git a/tendermint/src/abci/doc/request-prepareproposal.md b/cometbft/src/abci/doc/request-prepareproposal.md similarity index 100% rename from tendermint/src/abci/doc/request-prepareproposal.md rename to cometbft/src/abci/doc/request-prepareproposal.md diff --git a/tendermint/src/abci/doc/request-processproposal.md b/cometbft/src/abci/doc/request-processproposal.md similarity index 100% rename from tendermint/src/abci/doc/request-processproposal.md rename to cometbft/src/abci/doc/request-processproposal.md diff --git a/tendermint/src/abci/doc/request-query.md b/cometbft/src/abci/doc/request-query.md similarity index 100% rename from tendermint/src/abci/doc/request-query.md rename to cometbft/src/abci/doc/request-query.md diff --git a/tendermint/src/abci/doc/request-setoption.md b/cometbft/src/abci/doc/request-setoption.md similarity index 100% rename from tendermint/src/abci/doc/request-setoption.md rename to cometbft/src/abci/doc/request-setoption.md diff --git a/tendermint/src/abci/doc/request-verifyvoteextension.md b/cometbft/src/abci/doc/request-verifyvoteextension.md similarity index 100% rename from tendermint/src/abci/doc/request-verifyvoteextension.md rename to cometbft/src/abci/doc/request-verifyvoteextension.md diff --git a/tendermint/src/abci/doc/response-applysnapshotchunk.md b/cometbft/src/abci/doc/response-applysnapshotchunk.md similarity index 100% rename from tendermint/src/abci/doc/response-applysnapshotchunk.md rename to cometbft/src/abci/doc/response-applysnapshotchunk.md diff --git a/tendermint/src/abci/doc/response-beginblock.md b/cometbft/src/abci/doc/response-beginblock.md similarity index 100% rename from tendermint/src/abci/doc/response-beginblock.md rename to cometbft/src/abci/doc/response-beginblock.md diff --git a/tendermint/src/abci/doc/response-checktx.md b/cometbft/src/abci/doc/response-checktx.md similarity index 100% rename from tendermint/src/abci/doc/response-checktx.md rename to cometbft/src/abci/doc/response-checktx.md diff --git a/tendermint/src/abci/doc/response-commit.md b/cometbft/src/abci/doc/response-commit.md similarity index 100% rename from tendermint/src/abci/doc/response-commit.md rename to cometbft/src/abci/doc/response-commit.md diff --git a/tendermint/src/abci/doc/response-delivertx.md b/cometbft/src/abci/doc/response-delivertx.md similarity index 100% rename from tendermint/src/abci/doc/response-delivertx.md rename to cometbft/src/abci/doc/response-delivertx.md diff --git a/tendermint/src/abci/doc/response-echo.md b/cometbft/src/abci/doc/response-echo.md similarity index 100% rename from tendermint/src/abci/doc/response-echo.md rename to cometbft/src/abci/doc/response-echo.md diff --git a/tendermint/src/abci/doc/response-endblock.md b/cometbft/src/abci/doc/response-endblock.md similarity index 100% rename from tendermint/src/abci/doc/response-endblock.md rename to cometbft/src/abci/doc/response-endblock.md diff --git a/tendermint/src/abci/doc/response-exception.md b/cometbft/src/abci/doc/response-exception.md similarity index 100% rename from tendermint/src/abci/doc/response-exception.md rename to cometbft/src/abci/doc/response-exception.md diff --git a/tendermint/src/abci/doc/response-extendvote.md b/cometbft/src/abci/doc/response-extendvote.md similarity index 100% rename from tendermint/src/abci/doc/response-extendvote.md rename to cometbft/src/abci/doc/response-extendvote.md diff --git a/tendermint/src/abci/doc/response-finalizeblock.md b/cometbft/src/abci/doc/response-finalizeblock.md similarity index 100% rename from tendermint/src/abci/doc/response-finalizeblock.md rename to cometbft/src/abci/doc/response-finalizeblock.md diff --git a/tendermint/src/abci/doc/response-flush.md b/cometbft/src/abci/doc/response-flush.md similarity index 100% rename from tendermint/src/abci/doc/response-flush.md rename to cometbft/src/abci/doc/response-flush.md diff --git a/tendermint/src/abci/doc/response-info.md b/cometbft/src/abci/doc/response-info.md similarity index 100% rename from tendermint/src/abci/doc/response-info.md rename to cometbft/src/abci/doc/response-info.md diff --git a/tendermint/src/abci/doc/response-initchain.md b/cometbft/src/abci/doc/response-initchain.md similarity index 100% rename from tendermint/src/abci/doc/response-initchain.md rename to cometbft/src/abci/doc/response-initchain.md diff --git a/tendermint/src/abci/doc/response-listsnapshots.md b/cometbft/src/abci/doc/response-listsnapshots.md similarity index 100% rename from tendermint/src/abci/doc/response-listsnapshots.md rename to cometbft/src/abci/doc/response-listsnapshots.md diff --git a/tendermint/src/abci/doc/response-loadsnapshotchunk.md b/cometbft/src/abci/doc/response-loadsnapshotchunk.md similarity index 100% rename from tendermint/src/abci/doc/response-loadsnapshotchunk.md rename to cometbft/src/abci/doc/response-loadsnapshotchunk.md diff --git a/tendermint/src/abci/doc/response-offersnapshot.md b/cometbft/src/abci/doc/response-offersnapshot.md similarity index 100% rename from tendermint/src/abci/doc/response-offersnapshot.md rename to cometbft/src/abci/doc/response-offersnapshot.md diff --git a/tendermint/src/abci/doc/response-prepareproposal.md b/cometbft/src/abci/doc/response-prepareproposal.md similarity index 100% rename from tendermint/src/abci/doc/response-prepareproposal.md rename to cometbft/src/abci/doc/response-prepareproposal.md diff --git a/tendermint/src/abci/doc/response-processproposal.md b/cometbft/src/abci/doc/response-processproposal.md similarity index 100% rename from tendermint/src/abci/doc/response-processproposal.md rename to cometbft/src/abci/doc/response-processproposal.md diff --git a/tendermint/src/abci/doc/response-query.md b/cometbft/src/abci/doc/response-query.md similarity index 100% rename from tendermint/src/abci/doc/response-query.md rename to cometbft/src/abci/doc/response-query.md diff --git a/tendermint/src/abci/doc/response-setoption.md b/cometbft/src/abci/doc/response-setoption.md similarity index 100% rename from tendermint/src/abci/doc/response-setoption.md rename to cometbft/src/abci/doc/response-setoption.md diff --git a/tendermint/src/abci/doc/response-verifyvoteextension.md b/cometbft/src/abci/doc/response-verifyvoteextension.md similarity index 100% rename from tendermint/src/abci/doc/response-verifyvoteextension.md rename to cometbft/src/abci/doc/response-verifyvoteextension.md diff --git a/tendermint/src/abci/event.rs b/cometbft/src/abci/event.rs similarity index 100% rename from tendermint/src/abci/event.rs rename to cometbft/src/abci/event.rs diff --git a/tendermint/src/abci/kind.rs b/cometbft/src/abci/kind.rs similarity index 100% rename from tendermint/src/abci/kind.rs rename to cometbft/src/abci/kind.rs diff --git a/tendermint/src/abci/request.rs b/cometbft/src/abci/request.rs similarity index 100% rename from tendermint/src/abci/request.rs rename to cometbft/src/abci/request.rs diff --git a/tendermint/src/abci/request/apply_snapshot_chunk.rs b/cometbft/src/abci/request/apply_snapshot_chunk.rs similarity index 100% rename from tendermint/src/abci/request/apply_snapshot_chunk.rs rename to cometbft/src/abci/request/apply_snapshot_chunk.rs diff --git a/tendermint/src/abci/request/begin_block.rs b/cometbft/src/abci/request/begin_block.rs similarity index 100% rename from tendermint/src/abci/request/begin_block.rs rename to cometbft/src/abci/request/begin_block.rs diff --git a/tendermint/src/abci/request/check_tx.rs b/cometbft/src/abci/request/check_tx.rs similarity index 100% rename from tendermint/src/abci/request/check_tx.rs rename to cometbft/src/abci/request/check_tx.rs diff --git a/tendermint/src/abci/request/deliver_tx.rs b/cometbft/src/abci/request/deliver_tx.rs similarity index 100% rename from tendermint/src/abci/request/deliver_tx.rs rename to cometbft/src/abci/request/deliver_tx.rs diff --git a/tendermint/src/abci/request/echo.rs b/cometbft/src/abci/request/echo.rs similarity index 100% rename from tendermint/src/abci/request/echo.rs rename to cometbft/src/abci/request/echo.rs diff --git a/tendermint/src/abci/request/end_block.rs b/cometbft/src/abci/request/end_block.rs similarity index 100% rename from tendermint/src/abci/request/end_block.rs rename to cometbft/src/abci/request/end_block.rs diff --git a/tendermint/src/abci/request/extend_vote.rs b/cometbft/src/abci/request/extend_vote.rs similarity index 100% rename from tendermint/src/abci/request/extend_vote.rs rename to cometbft/src/abci/request/extend_vote.rs diff --git a/tendermint/src/abci/request/finalize_block.rs b/cometbft/src/abci/request/finalize_block.rs similarity index 100% rename from tendermint/src/abci/request/finalize_block.rs rename to cometbft/src/abci/request/finalize_block.rs diff --git a/tendermint/src/abci/request/info.rs b/cometbft/src/abci/request/info.rs similarity index 100% rename from tendermint/src/abci/request/info.rs rename to cometbft/src/abci/request/info.rs diff --git a/tendermint/src/abci/request/init_chain.rs b/cometbft/src/abci/request/init_chain.rs similarity index 100% rename from tendermint/src/abci/request/init_chain.rs rename to cometbft/src/abci/request/init_chain.rs diff --git a/tendermint/src/abci/request/load_snapshot_chunk.rs b/cometbft/src/abci/request/load_snapshot_chunk.rs similarity index 100% rename from tendermint/src/abci/request/load_snapshot_chunk.rs rename to cometbft/src/abci/request/load_snapshot_chunk.rs diff --git a/tendermint/src/abci/request/offer_snapshot.rs b/cometbft/src/abci/request/offer_snapshot.rs similarity index 100% rename from tendermint/src/abci/request/offer_snapshot.rs rename to cometbft/src/abci/request/offer_snapshot.rs diff --git a/tendermint/src/abci/request/prepare_proposal.rs b/cometbft/src/abci/request/prepare_proposal.rs similarity index 100% rename from tendermint/src/abci/request/prepare_proposal.rs rename to cometbft/src/abci/request/prepare_proposal.rs diff --git a/tendermint/src/abci/request/process_proposal.rs b/cometbft/src/abci/request/process_proposal.rs similarity index 100% rename from tendermint/src/abci/request/process_proposal.rs rename to cometbft/src/abci/request/process_proposal.rs diff --git a/tendermint/src/abci/request/query.rs b/cometbft/src/abci/request/query.rs similarity index 100% rename from tendermint/src/abci/request/query.rs rename to cometbft/src/abci/request/query.rs diff --git a/tendermint/src/abci/request/set_option.rs b/cometbft/src/abci/request/set_option.rs similarity index 100% rename from tendermint/src/abci/request/set_option.rs rename to cometbft/src/abci/request/set_option.rs diff --git a/tendermint/src/abci/request/verify_vote_extension.rs b/cometbft/src/abci/request/verify_vote_extension.rs similarity index 100% rename from tendermint/src/abci/request/verify_vote_extension.rs rename to cometbft/src/abci/request/verify_vote_extension.rs diff --git a/tendermint/src/abci/response.rs b/cometbft/src/abci/response.rs similarity index 100% rename from tendermint/src/abci/response.rs rename to cometbft/src/abci/response.rs diff --git a/tendermint/src/abci/response/apply_snapshot_chunk.rs b/cometbft/src/abci/response/apply_snapshot_chunk.rs similarity index 100% rename from tendermint/src/abci/response/apply_snapshot_chunk.rs rename to cometbft/src/abci/response/apply_snapshot_chunk.rs diff --git a/tendermint/src/abci/response/begin_block.rs b/cometbft/src/abci/response/begin_block.rs similarity index 100% rename from tendermint/src/abci/response/begin_block.rs rename to cometbft/src/abci/response/begin_block.rs diff --git a/tendermint/src/abci/response/check_tx.rs b/cometbft/src/abci/response/check_tx.rs similarity index 100% rename from tendermint/src/abci/response/check_tx.rs rename to cometbft/src/abci/response/check_tx.rs diff --git a/tendermint/src/abci/response/commit.rs b/cometbft/src/abci/response/commit.rs similarity index 100% rename from tendermint/src/abci/response/commit.rs rename to cometbft/src/abci/response/commit.rs diff --git a/tendermint/src/abci/response/deliver_tx.rs b/cometbft/src/abci/response/deliver_tx.rs similarity index 100% rename from tendermint/src/abci/response/deliver_tx.rs rename to cometbft/src/abci/response/deliver_tx.rs diff --git a/tendermint/src/abci/response/echo.rs b/cometbft/src/abci/response/echo.rs similarity index 100% rename from tendermint/src/abci/response/echo.rs rename to cometbft/src/abci/response/echo.rs diff --git a/tendermint/src/abci/response/end_block.rs b/cometbft/src/abci/response/end_block.rs similarity index 100% rename from tendermint/src/abci/response/end_block.rs rename to cometbft/src/abci/response/end_block.rs diff --git a/tendermint/src/abci/response/exception.rs b/cometbft/src/abci/response/exception.rs similarity index 100% rename from tendermint/src/abci/response/exception.rs rename to cometbft/src/abci/response/exception.rs diff --git a/tendermint/src/abci/response/extend_vote.rs b/cometbft/src/abci/response/extend_vote.rs similarity index 100% rename from tendermint/src/abci/response/extend_vote.rs rename to cometbft/src/abci/response/extend_vote.rs diff --git a/tendermint/src/abci/response/finalize_block.rs b/cometbft/src/abci/response/finalize_block.rs similarity index 100% rename from tendermint/src/abci/response/finalize_block.rs rename to cometbft/src/abci/response/finalize_block.rs diff --git a/tendermint/src/abci/response/info.rs b/cometbft/src/abci/response/info.rs similarity index 100% rename from tendermint/src/abci/response/info.rs rename to cometbft/src/abci/response/info.rs diff --git a/tendermint/src/abci/response/init_chain.rs b/cometbft/src/abci/response/init_chain.rs similarity index 100% rename from tendermint/src/abci/response/init_chain.rs rename to cometbft/src/abci/response/init_chain.rs diff --git a/tendermint/src/abci/response/list_snapshots.rs b/cometbft/src/abci/response/list_snapshots.rs similarity index 100% rename from tendermint/src/abci/response/list_snapshots.rs rename to cometbft/src/abci/response/list_snapshots.rs diff --git a/tendermint/src/abci/response/load_snapshot_chunk.rs b/cometbft/src/abci/response/load_snapshot_chunk.rs similarity index 100% rename from tendermint/src/abci/response/load_snapshot_chunk.rs rename to cometbft/src/abci/response/load_snapshot_chunk.rs diff --git a/tendermint/src/abci/response/offer_snapshot.rs b/cometbft/src/abci/response/offer_snapshot.rs similarity index 100% rename from tendermint/src/abci/response/offer_snapshot.rs rename to cometbft/src/abci/response/offer_snapshot.rs diff --git a/tendermint/src/abci/response/prepare_proposal.rs b/cometbft/src/abci/response/prepare_proposal.rs similarity index 100% rename from tendermint/src/abci/response/prepare_proposal.rs rename to cometbft/src/abci/response/prepare_proposal.rs diff --git a/tendermint/src/abci/response/process_proposal.rs b/cometbft/src/abci/response/process_proposal.rs similarity index 100% rename from tendermint/src/abci/response/process_proposal.rs rename to cometbft/src/abci/response/process_proposal.rs diff --git a/tendermint/src/abci/response/query.rs b/cometbft/src/abci/response/query.rs similarity index 100% rename from tendermint/src/abci/response/query.rs rename to cometbft/src/abci/response/query.rs diff --git a/tendermint/src/abci/response/set_option.rs b/cometbft/src/abci/response/set_option.rs similarity index 100% rename from tendermint/src/abci/response/set_option.rs rename to cometbft/src/abci/response/set_option.rs diff --git a/tendermint/src/abci/response/verify_vote_extension.rs b/cometbft/src/abci/response/verify_vote_extension.rs similarity index 100% rename from tendermint/src/abci/response/verify_vote_extension.rs rename to cometbft/src/abci/response/verify_vote_extension.rs diff --git a/tendermint/src/abci/types.rs b/cometbft/src/abci/types.rs similarity index 100% rename from tendermint/src/abci/types.rs rename to cometbft/src/abci/types.rs diff --git a/tendermint/src/account.rs b/cometbft/src/account.rs similarity index 100% rename from tendermint/src/account.rs rename to cometbft/src/account.rs diff --git a/tendermint/src/block.rs b/cometbft/src/block.rs similarity index 100% rename from tendermint/src/block.rs rename to cometbft/src/block.rs diff --git a/tendermint/src/block/block_id_flag.rs b/cometbft/src/block/block_id_flag.rs similarity index 100% rename from tendermint/src/block/block_id_flag.rs rename to cometbft/src/block/block_id_flag.rs diff --git a/tendermint/src/block/commit.rs b/cometbft/src/block/commit.rs similarity index 100% rename from tendermint/src/block/commit.rs rename to cometbft/src/block/commit.rs diff --git a/tendermint/src/block/commit_sig.rs b/cometbft/src/block/commit_sig.rs similarity index 100% rename from tendermint/src/block/commit_sig.rs rename to cometbft/src/block/commit_sig.rs diff --git a/tendermint/src/block/header.rs b/cometbft/src/block/header.rs similarity index 100% rename from tendermint/src/block/header.rs rename to cometbft/src/block/header.rs diff --git a/tendermint/src/block/height.rs b/cometbft/src/block/height.rs similarity index 100% rename from tendermint/src/block/height.rs rename to cometbft/src/block/height.rs diff --git a/tendermint/src/block/id.rs b/cometbft/src/block/id.rs similarity index 100% rename from tendermint/src/block/id.rs rename to cometbft/src/block/id.rs diff --git a/tendermint/src/block/meta.rs b/cometbft/src/block/meta.rs similarity index 100% rename from tendermint/src/block/meta.rs rename to cometbft/src/block/meta.rs diff --git a/tendermint/src/block/parts.rs b/cometbft/src/block/parts.rs similarity index 100% rename from tendermint/src/block/parts.rs rename to cometbft/src/block/parts.rs diff --git a/tendermint/src/block/round.rs b/cometbft/src/block/round.rs similarity index 100% rename from tendermint/src/block/round.rs rename to cometbft/src/block/round.rs diff --git a/tendermint/src/block/signed_header.rs b/cometbft/src/block/signed_header.rs similarity index 100% rename from tendermint/src/block/signed_header.rs rename to cometbft/src/block/signed_header.rs diff --git a/tendermint/src/block/size.rs b/cometbft/src/block/size.rs similarity index 100% rename from tendermint/src/block/size.rs rename to cometbft/src/block/size.rs diff --git a/tendermint/src/chain.rs b/cometbft/src/chain.rs similarity index 100% rename from tendermint/src/chain.rs rename to cometbft/src/chain.rs diff --git a/tendermint/src/chain/id.rs b/cometbft/src/chain/id.rs similarity index 100% rename from tendermint/src/chain/id.rs rename to cometbft/src/chain/id.rs diff --git a/tendermint/src/chain/info.rs b/cometbft/src/chain/info.rs similarity index 100% rename from tendermint/src/chain/info.rs rename to cometbft/src/chain/info.rs diff --git a/tendermint/src/channel.rs b/cometbft/src/channel.rs similarity index 100% rename from tendermint/src/channel.rs rename to cometbft/src/channel.rs diff --git a/tendermint/src/channel/id.rs b/cometbft/src/channel/id.rs similarity index 100% rename from tendermint/src/channel/id.rs rename to cometbft/src/channel/id.rs diff --git a/tendermint/src/consensus.rs b/cometbft/src/consensus.rs similarity index 100% rename from tendermint/src/consensus.rs rename to cometbft/src/consensus.rs diff --git a/tendermint/src/consensus/params.rs b/cometbft/src/consensus/params.rs similarity index 100% rename from tendermint/src/consensus/params.rs rename to cometbft/src/consensus/params.rs diff --git a/tendermint/src/consensus/state.rs b/cometbft/src/consensus/state.rs similarity index 100% rename from tendermint/src/consensus/state.rs rename to cometbft/src/consensus/state.rs diff --git a/tendermint/src/crypto.rs b/cometbft/src/crypto.rs similarity index 100% rename from tendermint/src/crypto.rs rename to cometbft/src/crypto.rs diff --git a/tendermint/src/crypto/default.rs b/cometbft/src/crypto/default.rs similarity index 100% rename from tendermint/src/crypto/default.rs rename to cometbft/src/crypto/default.rs diff --git a/tendermint/src/crypto/default/signature.rs b/cometbft/src/crypto/default/signature.rs similarity index 100% rename from tendermint/src/crypto/default/signature.rs rename to cometbft/src/crypto/default/signature.rs diff --git a/tendermint/src/crypto/ed25519.rs b/cometbft/src/crypto/ed25519.rs similarity index 100% rename from tendermint/src/crypto/ed25519.rs rename to cometbft/src/crypto/ed25519.rs diff --git a/tendermint/src/crypto/ed25519/signing_key.rs b/cometbft/src/crypto/ed25519/signing_key.rs similarity index 100% rename from tendermint/src/crypto/ed25519/signing_key.rs rename to cometbft/src/crypto/ed25519/signing_key.rs diff --git a/tendermint/src/crypto/ed25519/verification_key.rs b/cometbft/src/crypto/ed25519/verification_key.rs similarity index 100% rename from tendermint/src/crypto/ed25519/verification_key.rs rename to cometbft/src/crypto/ed25519/verification_key.rs diff --git a/tendermint/src/crypto/sha256.rs b/cometbft/src/crypto/sha256.rs similarity index 100% rename from tendermint/src/crypto/sha256.rs rename to cometbft/src/crypto/sha256.rs diff --git a/tendermint/src/crypto/signature.rs b/cometbft/src/crypto/signature.rs similarity index 100% rename from tendermint/src/crypto/signature.rs rename to cometbft/src/crypto/signature.rs diff --git a/tendermint/src/error.rs b/cometbft/src/error.rs similarity index 100% rename from tendermint/src/error.rs rename to cometbft/src/error.rs diff --git a/tendermint/src/evidence.rs b/cometbft/src/evidence.rs similarity index 100% rename from tendermint/src/evidence.rs rename to cometbft/src/evidence.rs diff --git a/tendermint/src/genesis.rs b/cometbft/src/genesis.rs similarity index 100% rename from tendermint/src/genesis.rs rename to cometbft/src/genesis.rs diff --git a/tendermint/src/hash.rs b/cometbft/src/hash.rs similarity index 100% rename from tendermint/src/hash.rs rename to cometbft/src/hash.rs diff --git a/tendermint/src/lib.rs b/cometbft/src/lib.rs similarity index 100% rename from tendermint/src/lib.rs rename to cometbft/src/lib.rs diff --git a/tendermint/src/merkle.rs b/cometbft/src/merkle.rs similarity index 100% rename from tendermint/src/merkle.rs rename to cometbft/src/merkle.rs diff --git a/tendermint/src/merkle/proof.rs b/cometbft/src/merkle/proof.rs similarity index 100% rename from tendermint/src/merkle/proof.rs rename to cometbft/src/merkle/proof.rs diff --git a/tendermint/src/moniker.rs b/cometbft/src/moniker.rs similarity index 100% rename from tendermint/src/moniker.rs rename to cometbft/src/moniker.rs diff --git a/tendermint/src/node.rs b/cometbft/src/node.rs similarity index 100% rename from tendermint/src/node.rs rename to cometbft/src/node.rs diff --git a/tendermint/src/node/id.rs b/cometbft/src/node/id.rs similarity index 100% rename from tendermint/src/node/id.rs rename to cometbft/src/node/id.rs diff --git a/tendermint/src/node/info.rs b/cometbft/src/node/info.rs similarity index 100% rename from tendermint/src/node/info.rs rename to cometbft/src/node/info.rs diff --git a/tendermint/src/prelude.rs b/cometbft/src/prelude.rs similarity index 100% rename from tendermint/src/prelude.rs rename to cometbft/src/prelude.rs diff --git a/tendermint/src/private_key.rs b/cometbft/src/private_key.rs similarity index 100% rename from tendermint/src/private_key.rs rename to cometbft/src/private_key.rs diff --git a/tendermint/src/privval.rs b/cometbft/src/privval.rs similarity index 100% rename from tendermint/src/privval.rs rename to cometbft/src/privval.rs diff --git a/tendermint/src/proposal.rs b/cometbft/src/proposal.rs similarity index 100% rename from tendermint/src/proposal.rs rename to cometbft/src/proposal.rs diff --git a/tendermint/src/proposal/canonical_proposal.rs b/cometbft/src/proposal/canonical_proposal.rs similarity index 100% rename from tendermint/src/proposal/canonical_proposal.rs rename to cometbft/src/proposal/canonical_proposal.rs diff --git a/tendermint/src/proposal/msg_type.rs b/cometbft/src/proposal/msg_type.rs similarity index 100% rename from tendermint/src/proposal/msg_type.rs rename to cometbft/src/proposal/msg_type.rs diff --git a/tendermint/src/proposal/sign_proposal.rs b/cometbft/src/proposal/sign_proposal.rs similarity index 100% rename from tendermint/src/proposal/sign_proposal.rs rename to cometbft/src/proposal/sign_proposal.rs diff --git a/tendermint/src/proto_macros.rs b/cometbft/src/proto_macros.rs similarity index 100% rename from tendermint/src/proto_macros.rs rename to cometbft/src/proto_macros.rs diff --git a/tendermint/src/public_key.rs b/cometbft/src/public_key.rs similarity index 100% rename from tendermint/src/public_key.rs rename to cometbft/src/public_key.rs diff --git a/tendermint/src/public_key/pub_key_request.rs b/cometbft/src/public_key/pub_key_request.rs similarity index 100% rename from tendermint/src/public_key/pub_key_request.rs rename to cometbft/src/public_key/pub_key_request.rs diff --git a/tendermint/src/public_key/pub_key_response.rs b/cometbft/src/public_key/pub_key_response.rs similarity index 100% rename from tendermint/src/public_key/pub_key_response.rs rename to cometbft/src/public_key/pub_key_response.rs diff --git a/tendermint/src/serializers.rs b/cometbft/src/serializers.rs similarity index 100% rename from tendermint/src/serializers.rs rename to cometbft/src/serializers.rs diff --git a/tendermint/src/serializers/apphash.rs b/cometbft/src/serializers/apphash.rs similarity index 100% rename from tendermint/src/serializers/apphash.rs rename to cometbft/src/serializers/apphash.rs diff --git a/tendermint/src/serializers/apphash_base64.rs b/cometbft/src/serializers/apphash_base64.rs similarity index 100% rename from tendermint/src/serializers/apphash_base64.rs rename to cometbft/src/serializers/apphash_base64.rs diff --git a/tendermint/src/serializers/hash.rs b/cometbft/src/serializers/hash.rs similarity index 100% rename from tendermint/src/serializers/hash.rs rename to cometbft/src/serializers/hash.rs diff --git a/tendermint/src/serializers/option_hash.rs b/cometbft/src/serializers/option_hash.rs similarity index 100% rename from tendermint/src/serializers/option_hash.rs rename to cometbft/src/serializers/option_hash.rs diff --git a/tendermint/src/serializers/time.rs b/cometbft/src/serializers/time.rs similarity index 100% rename from tendermint/src/serializers/time.rs rename to cometbft/src/serializers/time.rs diff --git a/tendermint/src/signature.rs b/cometbft/src/signature.rs similarity index 100% rename from tendermint/src/signature.rs rename to cometbft/src/signature.rs diff --git a/tendermint/src/test.rs b/cometbft/src/test.rs similarity index 100% rename from tendermint/src/test.rs rename to cometbft/src/test.rs diff --git a/tendermint/src/time.rs b/cometbft/src/time.rs similarity index 100% rename from tendermint/src/time.rs rename to cometbft/src/time.rs diff --git a/tendermint/src/timeout.rs b/cometbft/src/timeout.rs similarity index 100% rename from tendermint/src/timeout.rs rename to cometbft/src/timeout.rs diff --git a/tendermint/src/trust_threshold.rs b/cometbft/src/trust_threshold.rs similarity index 100% rename from tendermint/src/trust_threshold.rs rename to cometbft/src/trust_threshold.rs diff --git a/tendermint/src/tx.rs b/cometbft/src/tx.rs similarity index 100% rename from tendermint/src/tx.rs rename to cometbft/src/tx.rs diff --git a/tendermint/src/tx/proof.rs b/cometbft/src/tx/proof.rs similarity index 100% rename from tendermint/src/tx/proof.rs rename to cometbft/src/tx/proof.rs diff --git a/tendermint/src/v0_34.rs b/cometbft/src/v0_34.rs similarity index 100% rename from tendermint/src/v0_34.rs rename to cometbft/src/v0_34.rs diff --git a/tendermint/src/v0_34/abci.rs b/cometbft/src/v0_34/abci.rs similarity index 100% rename from tendermint/src/v0_34/abci.rs rename to cometbft/src/v0_34/abci.rs diff --git a/tendermint/src/v0_34/abci/request.rs b/cometbft/src/v0_34/abci/request.rs similarity index 100% rename from tendermint/src/v0_34/abci/request.rs rename to cometbft/src/v0_34/abci/request.rs diff --git a/tendermint/src/v0_34/abci/response.rs b/cometbft/src/v0_34/abci/response.rs similarity index 100% rename from tendermint/src/v0_34/abci/response.rs rename to cometbft/src/v0_34/abci/response.rs diff --git a/tendermint/src/v0_37.rs b/cometbft/src/v0_37.rs similarity index 100% rename from tendermint/src/v0_37.rs rename to cometbft/src/v0_37.rs diff --git a/tendermint/src/v0_37/abci.rs b/cometbft/src/v0_37/abci.rs similarity index 100% rename from tendermint/src/v0_37/abci.rs rename to cometbft/src/v0_37/abci.rs diff --git a/tendermint/src/v0_37/abci/request.rs b/cometbft/src/v0_37/abci/request.rs similarity index 100% rename from tendermint/src/v0_37/abci/request.rs rename to cometbft/src/v0_37/abci/request.rs diff --git a/tendermint/src/v0_37/abci/response.rs b/cometbft/src/v0_37/abci/response.rs similarity index 100% rename from tendermint/src/v0_37/abci/response.rs rename to cometbft/src/v0_37/abci/response.rs diff --git a/tendermint/src/v0_38.rs b/cometbft/src/v0_38.rs similarity index 100% rename from tendermint/src/v0_38.rs rename to cometbft/src/v0_38.rs diff --git a/tendermint/src/v0_38/abci.rs b/cometbft/src/v0_38/abci.rs similarity index 100% rename from tendermint/src/v0_38/abci.rs rename to cometbft/src/v0_38/abci.rs diff --git a/tendermint/src/v0_38/abci/request.rs b/cometbft/src/v0_38/abci/request.rs similarity index 100% rename from tendermint/src/v0_38/abci/request.rs rename to cometbft/src/v0_38/abci/request.rs diff --git a/tendermint/src/v0_38/abci/response.rs b/cometbft/src/v0_38/abci/response.rs similarity index 100% rename from tendermint/src/v0_38/abci/response.rs rename to cometbft/src/v0_38/abci/response.rs diff --git a/tendermint/src/validator.rs b/cometbft/src/validator.rs similarity index 100% rename from tendermint/src/validator.rs rename to cometbft/src/validator.rs diff --git a/tendermint/src/version.rs b/cometbft/src/version.rs similarity index 100% rename from tendermint/src/version.rs rename to cometbft/src/version.rs diff --git a/tendermint/src/vote.rs b/cometbft/src/vote.rs similarity index 100% rename from tendermint/src/vote.rs rename to cometbft/src/vote.rs diff --git a/tendermint/src/vote/canonical_vote.rs b/cometbft/src/vote/canonical_vote.rs similarity index 100% rename from tendermint/src/vote/canonical_vote.rs rename to cometbft/src/vote/canonical_vote.rs diff --git a/tendermint/src/vote/power.rs b/cometbft/src/vote/power.rs similarity index 100% rename from tendermint/src/vote/power.rs rename to cometbft/src/vote/power.rs diff --git a/tendermint/src/vote/sign_vote.rs b/cometbft/src/vote/sign_vote.rs similarity index 100% rename from tendermint/src/vote/sign_vote.rs rename to cometbft/src/vote/sign_vote.rs diff --git a/tendermint/src/vote/validator_index.rs b/cometbft/src/vote/validator_index.rs similarity index 100% rename from tendermint/src/vote/validator_index.rs rename to cometbft/src/vote/validator_index.rs diff --git a/tendermint/tests/alt_crypto.rs b/cometbft/tests/alt_crypto.rs similarity index 100% rename from tendermint/tests/alt_crypto.rs rename to cometbft/tests/alt_crypto.rs diff --git a/tendermint/tests/support/serialization/block/header.json b/cometbft/tests/support/serialization/block/header.json similarity index 100% rename from tendermint/tests/support/serialization/block/header.json rename to cometbft/tests/support/serialization/block/header.json diff --git a/tendermint/tests/support/serialization/block/header_with_known_hash.json b/cometbft/tests/support/serialization/block/header_with_known_hash.json similarity index 100% rename from tendermint/tests/support/serialization/block/header_with_known_hash.json rename to cometbft/tests/support/serialization/block/header_with_known_hash.json diff --git a/tendermint/tests/support/serialization/trust_threshold/fraction.json b/cometbft/tests/support/serialization/trust_threshold/fraction.json similarity index 100% rename from tendermint/tests/support/serialization/trust_threshold/fraction.json rename to cometbft/tests/support/serialization/trust_threshold/fraction.json diff --git a/config/Cargo.toml b/config/Cargo.toml index 5b7f50f0..103901d9 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "tendermint-config" +name = "cometbft-config" version = "0.34.0" # Also update depending crates (rpc, light-node, ..) when bumping this. license = "Apache-2.0" -homepage = "https://www.tendermint.com/" -repository = "https://github.com/informalsystems/tendermint-rs/tree/main/tendermint" +homepage = "https://cometbft.com/" +repository = "https://github.com/cometbft/cometbft-rs" readme = "../README.md" categories = ["cryptography", "cryptography::cryptocurrencies", "database"] -keywords = ["blockchain", "bft", "consensus", "cosmos", "tendermint"] +keywords = ["blockchain", "bft", "consensus", "cosmos", "cometbft", "tendermint"] edition = "2021" description = """ - tendermint-config provides functions for loading and validating Tendermint - configuration files. It is moved out of the tendermint crate for no_std support - in the tendermint crate. + cometbft-config provides functions for loading and validating CometBFT + configuration files. It is moved out of the CometBFT crate for no_std support + in the cometbft crate. """ authors = [ @@ -24,7 +24,7 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -tendermint = { version = "0.34.0", default-features = false, features = ["rust-crypto"], path = "../tendermint" } +cometbft = { version = "0.34.0", default-features = false, features = ["rust-crypto"], path = "../cometbft" } flex-error = { version = "0.4.4", default-features = false } serde = { version = "1", features = ["derive"] } serde_json = "1" @@ -35,4 +35,4 @@ url = { version = "2.2" } pretty_assertions = "1.3.0" [features] -secp256k1 = ["tendermint/secp256k1"] +secp256k1 = ["cometbft/secp256k1"] diff --git a/light-client-cli/Cargo.toml b/light-client-cli/Cargo.toml index fab0aed8..3c8cd1ec 100644 --- a/light-client-cli/Cargo.toml +++ b/light-client-cli/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "tendermint-light-client-cli" +name = "cometbft-light-client-cli" version = "0.34.0" edition = "2021" license = "Apache-2.0" readme = "README.md" -keywords = ["blockchain", "bft", "consensus", "cosmos", "tendermint"] +keywords = ["blockchain", "bft", "consensus", "cosmos", "cometbft", "tendermint"] categories = ["cryptography::cryptocurrencies", "network-programming"] -repository = "https://github.com/informalsystems/tendermint-rs" +repository = "https://github.com/cometbft/cometbft-rs" authors = [ "Informal Systems ", ] description = """ - Implementation of the Tendermint Light Client CLI. + The CometBFT Light Client command line tool. """ # docs.rs-specific configuration @@ -23,10 +23,10 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -tendermint = { version = "0.34.0", path = "../tendermint" } -tendermint-rpc = { version = "0.34.0", path = "../rpc", features = ["http-client"] } -tendermint-light-client = { version = "0.34.0", path = "../light-client" } -tendermint-light-client-detector = { version = "0.34.0", path = "../light-client-detector" } +cometbft = { version = "0.34.0", path = "../cometbft" } +cometbft-rpc = { version = "0.34.0", path = "../rpc", features = ["http-client"] } +cometbft-light-client = { version = "0.34.0", path = "../light-client" } +cometbft-light-client-detector = { version = "0.34.0", path = "../light-client-detector" } clap = { version = "4.1.8", features = ["derive"] } color-eyre = "0.6.2" diff --git a/light-client-detector/Cargo.toml b/light-client-detector/Cargo.toml index 3ee191cd..a512aa54 100644 --- a/light-client-detector/Cargo.toml +++ b/light-client-detector/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "tendermint-light-client-detector" +name = "cometbft-light-client-detector" version = "0.34.0" edition = "2021" license = "Apache-2.0" readme = "README.md" -keywords = ["blockchain", "bft", "consensus", "cosmos", "tendermint"] +keywords = ["blockchain", "bft", "consensus", "cosmos", "cometbft", "tendermint"] categories = ["cryptography::cryptocurrencies", "network-programming"] -repository = "https://github.com/informalsystems/tendermint-rs" +repository = "https://github.com/cometbft/cometbft-rs" authors = [ "Informal Systems ", ] description = """ - Implementation of the Tendermint Light Client Attack Detector. + CometBFT Light Client Attack Detector. """ # docs.rs-specific configuration @@ -23,10 +23,10 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -tendermint = { version = "0.34.0", path = "../tendermint" } -tendermint-rpc = { version = "0.34.0", path = "../rpc", features = ["http-client"] } -tendermint-proto = { version = "0.34.0", path = "../proto" } -tendermint-light-client = { version = "0.34.0", path = "../light-client" } +cometbft = { version = "0.34.0", path = "../cometbft" } +cometbft-rpc = { version = "0.34.0", path = "../rpc", features = ["http-client"] } +cometbft-proto = { version = "0.34.0", path = "../proto" } +cometbft-light-client = { version = "0.34.0", path = "../light-client" } contracts = { version = "0.6.2", default-features = false } crossbeam-channel = { version = "0.4.2", default-features = false } diff --git a/light-client-js/Cargo.toml b/light-client-js/Cargo.toml index 29d29f23..1f848d17 100644 --- a/light-client-js/Cargo.toml +++ b/light-client-js/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "tendermint-light-client-js" +name = "cometbft-light-client-js" version = "0.34.0" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" readme = "README.md" -keywords = ["blockchain", "bft", "consensus", "light-client", "tendermint"] +keywords = ["blockchain", "bft", "consensus", "light-client", "cometbft", "tendermint"] categories = ["cryptography::cryptocurrencies", "network-programming"] -repository = "https://github.com/informalsystems/tendermint-rs" +repository = "https://github.com/cometbft/cometbft-rs" description = """ - tendermint-light-client-js provides a lightweight, WASM-based interface to - the Tendermint Light Client's verification functionality. + cometbft-light-client-js provides a lightweight, WASM-based interface to + the CometBFT Light Client's verification functionality. """ [lib] @@ -22,8 +22,8 @@ default = ["console_error_panic_hook"] [dependencies] serde = { version = "1.0", default-features = false, features = [ "derive" ] } serde_json = { version = "1.0", default-features = false } -tendermint = { version = "0.34.0", default-features = false, path = "../tendermint" } -tendermint-light-client-verifier = { version = "0.34.0", features = ["rust-crypto"], default-features = false, path = "../light-client-verifier" } +cometbft = { version = "0.34.0", default-features = false, path = "../cometbft" } +cometbft-light-client-verifier = { version = "0.34.0", features = ["rust-crypto"], default-features = false, path = "../light-client-verifier" } wasm-bindgen = { version = "0.2.63", default-features = false, features = [ "serde-serialize" ] } serde-wasm-bindgen = { version = "0.4.5", default-features = false } diff --git a/light-client-verifier/Cargo.toml b/light-client-verifier/Cargo.toml index ae46d809..69b68c0b 100644 --- a/light-client-verifier/Cargo.toml +++ b/light-client-verifier/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "tendermint-light-client-verifier" +name = "cometbft-light-client-verifier" version = "0.34.0" edition = "2021" license = "Apache-2.0" readme = "README.md" -keywords = ["blockchain", "bft", "consensus", "cosmos", "tendermint"] +keywords = ["blockchain", "bft", "consensus", "cosmos", "cometbft", "tendermint"] categories = ["cryptography::cryptocurrencies", "network-programming"] -repository = "https://github.com/informalsystems/tendermint-rs" +repository = "https://github.com/cometbft/cometbft-rs" authors = [ "Informal Systems ", ] description = """ - Implementation of the Tendermint Light Client Verification Algorithm. + Implementation of the CometBFT Light Client Verification Algorithm. """ # docs.rs-specific configuration @@ -24,10 +24,10 @@ rustdoc-args = ["--cfg", "docsrs"] [features] default = ["rust-crypto", "flex-error/std"] -rust-crypto = ["tendermint/rust-crypto"] +rust-crypto = ["cometbft/rust-crypto"] [dependencies] -tendermint = { version = "0.34.0", path = "../tendermint", default-features = false } +cometbft = { version = "0.34.0", path = "../cometbft", default-features = false } derive_more = { version = "0.99.5", default-features = false, features = ["display"] } serde = { version = "1.0.106", default-features = false } @@ -35,5 +35,5 @@ time = { version = "0.3", default-features = false } flex-error = { version = "0.4.4", default-features = false } [dev-dependencies] -tendermint-testgen = { path = "../testgen", default-features = false } +cometbft-testgen = { path = "../testgen", default-features = false } sha2 = { version = "0.10", default-features = false } diff --git a/light-client/Cargo.toml b/light-client/Cargo.toml index 3acaf1dd..700d8aa6 100644 --- a/light-client/Cargo.toml +++ b/light-client/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "tendermint-light-client" +name = "cometbft-light-client" version = "0.34.0" edition = "2021" license = "Apache-2.0" readme = "README.md" -keywords = ["blockchain", "bft", "consensus", "cosmos", "tendermint"] +keywords = ["blockchain", "bft", "consensus", "cosmos", "cometbft", "tendermint"] categories = ["cryptography::cryptocurrencies", "network-programming"] -repository = "https://github.com/informalsystems/tendermint-rs" +repository = "https://github.com/cometbft/cometbft-rs" authors = [ "Informal Systems ", "Ismail Khoffi ", @@ -14,7 +14,7 @@ authors = [ ] description = """ - Implementation of the Tendermint Light Client Verification Protocol. + Implementation of the CometBFT Light Client Verification Protocol. """ # docs.rs-specific configuration @@ -26,18 +26,18 @@ rustdoc-args = ["--cfg", "docsrs"] [features] default = ["rpc-client", "flex-error/std"] -rpc-client = ["tokio", "rust-crypto", "tendermint-rpc/http-client"] -rust-crypto = ["tendermint/rust-crypto", "tendermint-light-client-verifier/rust-crypto"] -secp256k1 = ["tendermint/secp256k1", "tendermint-rpc/secp256k1"] +rpc-client = ["tokio", "rust-crypto", "cometbft-rpc/http-client"] +rust-crypto = ["cometbft/rust-crypto", "cometbft-light-client-verifier/rust-crypto"] +secp256k1 = ["cometbft/secp256k1", "cometbft-rpc/secp256k1"] lightstore-sled = ["sled"] unstable = ["rust-crypto"] # Enable to execute long-running model-based tests mbt = ["rust-crypto"] [dependencies] -tendermint = { version = "0.34.0", path = "../tendermint", default-features = false } -tendermint-rpc = { version = "0.34.0", path = "../rpc", default-features = false } -tendermint-light-client-verifier = { version = "0.34.0", path = "../light-client-verifier", default-features = false } +cometbft = { version = "0.34.0", path = "../cometbft", default-features = false } +cometbft-rpc = { version = "0.34.0", path = "../rpc", default-features = false } +cometbft-light-client-verifier = { version = "0.34.0", path = "../light-client-verifier", default-features = false } contracts = { version = "0.6.2", default-features = false } crossbeam-channel = { version = "0.4.2", default-features = false } @@ -56,7 +56,7 @@ serde_json = { version = "1.0.51", default-features = false } regex = { version = "1.7.3" } [dev-dependencies] -tendermint-testgen = { path = "../testgen", default-features = false } +cometbft-testgen = { path = "../testgen", default-features = false } serde_json = { version = "1.0.51", default-features = false } gumdrop = { version = "0.8.0", default-features = false } diff --git a/p2p/Cargo.toml b/p2p/Cargo.toml index 6246a847..4a0fce2d 100644 --- a/p2p/Cargo.toml +++ b/p2p/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "tendermint-p2p" +name = "cometbft-p2p" version = "0.34.0" edition = "2021" license = "Apache-2.0" -repository = "https://github.com/informalsystems/tendermint-rs" -homepage = "https://tendermint.com" +repository = "https://github.com/cometbft/cometbft-rs" +homepage = "https://cometbft.com" readme = "README.md" -keywords = ["p2p", "tendermint", "cosmos"] +keywords = ["p2p", "cometbft", "tendermint", "cosmos"] categories = ["cryptography::cryptocurrencies", "network-programming"] authors = [ "Informal Systems ", @@ -16,7 +16,7 @@ authors = [ ] description = """ - The Tendermint P2P stack in Rust. + The CometBFT P2P stack in Rust. """ [lib] @@ -44,9 +44,9 @@ aead = { version = "0.5", default-features = false } flex-error = { version = "0.4.4", default-features = false } # path dependencies -tendermint = { path = "../tendermint", version = "0.34.0", default-features = false } -tendermint-proto = { path = "../proto", version = "0.34.0", default-features = false } -tendermint-std-ext = { path = "../std-ext", version = "0.34.0", default-features = false } +cometbft = { path = "../cometbft", version = "0.34.0", default-features = false } +cometbft-proto = { path = "../proto", version = "0.34.0", default-features = false } +cometbft-std-ext = { path = "../std-ext", version = "0.34.0", default-features = false } # optional dependencies prost-derive = { version = "0.12", optional = true } diff --git a/pbt-gen/Cargo.toml b/pbt-gen/Cargo.toml index d6740c1a..9a04b354 100644 --- a/pbt-gen/Cargo.toml +++ b/pbt-gen/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "tendermint-pbt-gen" +name = "cometbft-pbt-gen" version = "0.34.0" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" readme = "README.md" categories = ["development-tools"] -keywords = ["tendermint", "property-based testing"] -repository = "https://github.com/informalsystems/tendermint-rs" +keywords = ["cometbft", "tendermint", "property-based testing"] +repository = "https://github.com/cometbft/cometbft-rs" description = """ An internal crate providing proptest generators used across our crates and not depending on any code internal to those crates. diff --git a/proto/Cargo.toml b/proto/Cargo.toml index 264dbb53..fc593c8d 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "tendermint-proto" +name = "cometbft-proto" version = "0.34.0" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" -repository = "https://github.com/informalsystems/tendermint-rs/tree/main/proto" +repository = "https://github.com/cometbft/cometbft-rs" readme = "README.md" categories = ["cryptography", "cryptography::cryptocurrencies", "database"] -keywords = ["blockchain", "tendermint", "proto"] +keywords = ["blockchain", "cometbft", "tendermint", "proto"] description = """ - tendermint-proto is a the Rust implementation of the Tendermint proto structs. + A Rust implementation of the CometBFT proto structs. """ [features] diff --git a/release.sh b/release.sh index e6b5f943..071ce121 100755 --- a/release.sh +++ b/release.sh @@ -18,19 +18,18 @@ set -e # A space-separated list of all the crates we want to publish, in the order in # which they must be published. It's important to respect this order, since # each subsequent crate depends on one or more of the preceding ones. -DEFAULT_CRATES="tendermint-proto \ - tendermint-std-ext \ - tendermint \ - tendermint-config \ - tendermint-abci \ - tendermint-rpc \ - tendermint-p2p \ - tendermint-light-client-verifier \ - tendermint-light-client \ - tendermint-light-client-detector \ - tendermint-light-client-cli \ - tendermint-light-client-js \ - tendermint-testgen" +DEFAULT_CRATES="cometbft-proto \ + cometbft-std-ext \ + cometbft \ + cometbft-config \ + cometbft-rpc \ + cometbft-p2p \ + cometbft-light-client-verifier \ + cometbft-light-client \ + cometbft-light-client-detector \ + cometbft-light-client-cli \ + cometbft-light-client-js \ + cometbft-testgen" # Allows us to override the crates we want to publish. CRATES=${*:-${DEFAULT_CRATES}} diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index c2f2b7f2..db60557e 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "tendermint-rpc" +name = "cometbft-rpc" version = "0.34.0" edition = "2021" license = "Apache-2.0" -homepage = "https://www.tendermint.com/" -repository = "https://github.com/informalsystems/tendermint-rs" +homepage = "https://cometbft.com/" +repository = "https://github.com/cometbft/cometbft-rs" readme = "README.md" -keywords = ["blockchain", "cosmos", "tendermint"] +keywords = ["blockchain", "cosmos", "cometbft", "tendermint"] categories = ["cryptography::cryptocurrencies", "network-programming"] authors = [ "Informal Systems ", @@ -15,7 +15,7 @@ authors = [ ] description = """ - tendermint-rpc contains the core types returned by a Tendermint node's RPC endpoint. + cometbft-rpc contains the core types returned by a CometBFT node's RPC endpoint. All networking related features are feature guarded to keep the dependencies small in cases where only the core types are needed. """ @@ -24,7 +24,7 @@ description = """ all-features = true [[bin]] -name = "tendermint-rpc" +name = "cometbft-rpc" path = "src/client/bin/main.rs" required-features = [ "cli" ] @@ -42,7 +42,7 @@ http-client = [ "tokio/macros", "tracing" ] -secp256k1 = [ "tendermint/secp256k1" ] +secp256k1 = [ "cometbft/secp256k1" ] websocket-client = [ "async-tungstenite", "futures", @@ -55,9 +55,9 @@ websocket-client = [ ] [dependencies] -tendermint = { version = "0.34.0", default-features = false, path = "../tendermint" } -tendermint-config = { version = "0.34.0", path = "../config", default-features = false } -tendermint-proto = { version = "0.34.0", path = "../proto", default-features = false } +cometbft = { version = "0.34.0", default-features = false, path = "../cometbft" } +cometbft-config = { version = "0.34.0", path = "../config", default-features = false } +cometbft-proto = { version = "0.34.0", path = "../proto", default-features = false } async-trait = { version = "0.1", default-features = false } bytes = { version = "1.0", default-features = false } diff --git a/std-ext/Cargo.toml b/std-ext/Cargo.toml index bcdd6434..3947f02a 100644 --- a/std-ext/Cargo.toml +++ b/std-ext/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "tendermint-std-ext" +name = "cometbft-std-ext" version = "0.34.0" edition = "2021" license = "Apache-2.0" -homepage = "https://www.tendermint.com/" -repository = "https://github.com/informalsystems/tendermint-rs" +homepage = "https://cometbft.com/" +repository = "https://github.com/cometbft/cometbft-rs" readme = "README.md" -keywords = ["blockchain", "cosmos", "tendermint"] +keywords = ["blockchain", "cosmos", "cometbft"] categories = ["development-tools"] authors = ["Informal Systems "] description = """ - tendermint-std-ext contains extensions to the Rust standard library for use - from tendermint-rs. + cometbft-std-ext contains extensions to the Rust standard library for use + from cometbft-rs. """ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/test/Cargo.toml b/test/Cargo.toml index 21e918a9..a550be9e 100644 --- a/test/Cargo.toml +++ b/test/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "tendermint-test" -description = "Tendermint workspace tests and common utilities for testing." +name = "cometbft-test" +description = "cometbft workspace tests and common utilities for testing." version = "0.34.0" edition = "2021" license = "Apache-2.0" categories = ["development", "test", "tools"] -repository = "https://github.com/informalsystems/tendermint-rs" -keywords = ["blockchain", "tendermint", "testing"] +repository = "https://github.com/cometbft/cometbft-rs" +keywords = ["blockchain", "cometbft", "testing"] readme = "README.md" authors = ["Alexander Simmerl "] @@ -22,6 +22,6 @@ rand_core = { version = "0.6", default-features = false, features = ["std"] } readwrite = { version = "^0.1.1", default-features = false } subtle-encoding = { version = "0.5", default-features = false } -tendermint = { path = "../tendermint", default-features = false } -tendermint-p2p = { path = "../p2p", default-features = false } -tendermint-proto = { path = "../proto", default-features = false } +cometbft = { path = "../cometbft", default-features = false } +cometbft-p2p = { path = "../p2p", default-features = false } +cometbft-proto = { path = "../proto", default-features = false } diff --git a/testgen/Cargo.toml b/testgen/Cargo.toml index 2655ed0e..b05d27bd 100644 --- a/testgen/Cargo.toml +++ b/testgen/Cargo.toml @@ -1,22 +1,22 @@ [package] -name = "tendermint-testgen" +name = "cometbft-testgen" version = "0.34.0" authors = ["Informal Systems "] edition = "2021" readme = "README.md" license = "Apache-2.0" -homepage = "https://www.tendermint.com/" -repository = "https://github.com/informalsystems/tendermint-rs/tree/main/testgen" -keywords = ["blockchain", "tendermint", "testing"] +homepage = "https://cometbft.com/" +repository = "https://github.com/cometbft/cometbft-rs" +keywords = ["blockchain", "cometbft", "testing"] categories = ["cryptography::cryptocurrencies", "development-tools"] description = """ - tendermint-testgen is a library and a small binary utility for generating - tendermint datastructures from minimal input (for testing purposes only). + cometbft-testgen is a library and a small binary utility for generating + CometBFT datastructures from minimal input (for testing purposes only). The library also contains some functionality to simplify running test batches. """ [dependencies] -tendermint = { version = "0.34.0", path = "../tendermint", features = ["clock"] } +cometbft = { version = "0.34.0", path = "../cometbft", features = ["clock"] } serde = { version = "1", default-features = false, features = ["derive"] } serde_json = { version = "1", default-features = false, features = ["std"] } ed25519-consensus = { version = "2", default-features = false } @@ -26,5 +26,5 @@ tempfile = { version = "3.1.0", default-features = false } time = { package = "time", version = "0.3", default-features = false, features = ["std"] } [[bin]] -name = "tendermint-testgen" -path = "bin/tendermint-testgen.rs" +name = "cometbft-testgen" +path = "bin/cometbft-testgen.rs" diff --git a/tools/abci-test/Cargo.toml b/tools/abci-test/Cargo.toml index 6d3a680a..f4eba2f1 100644 --- a/tools/abci-test/Cargo.toml +++ b/tools/abci-test/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Informal Systems "] edition = "2021" description = """ abci-test provides some end-to-end integration testing between - tendermint-abci and a full Tendermint node. + cometbft-abci and a full CometBFT node. """ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -14,9 +14,9 @@ description = """ flex-error = { version = "0.4.4", default-features = false, features = ["std"] } futures = "0.3" structopt = "0.3" -tendermint = { version = "0.34.0", path = "../../tendermint" } -tendermint-config = { version = "0.34.0", path = "../../config" } -tendermint-rpc = { version = "0.34.0", path = "../../rpc", features = [ "websocket-client" ] } +cometbft = { version = "0.34.0", path = "../../cometbft" } +cometbft-config = { version = "0.34.0", path = "../../config" } +cometbft-rpc = { version = "0.34.0", path = "../../rpc", features = [ "websocket-client" ] } tracing = "0.1" tracing-subscriber = "0.2" tokio = { version = "1.20", features = ["full"] } diff --git a/tools/kvstore-test/Cargo.toml b/tools/kvstore-test/Cargo.toml index b070d257..4ed0b3ea 100644 --- a/tools/kvstore-test/Cargo.toml +++ b/tools/kvstore-test/Cargo.toml @@ -11,9 +11,9 @@ edition = "2021" [dev-dependencies] futures = "0.3" sha2 = "0.10" -tendermint = { version = "0.34.0", path = "../../tendermint" } -tendermint-light-client = { version = "0.34.0", path = "../../light-client", features = ["unstable"] } -tendermint-rpc = { version = "0.34.0", path = "../../rpc", features = [ "http-client", "websocket-client" ] } +cometbft = { version = "0.34.0", path = "../../cometbft" } +cometbft-light-client = { version = "0.34.0", path = "../../light-client", features = ["unstable"] } +cometbft-rpc = { version = "0.34.0", path = "../../rpc", features = [ "http-client", "websocket-client" ] } tokio = { version = "1.0", features = [ "rt-multi-thread", "macros" ] } tracing = "0.1" tracing-subscriber = "0.3" diff --git a/tools/no-std-check/Cargo.toml b/tools/no-std-check/Cargo.toml index ff4cb579..50efda0e 100644 --- a/tools/no-std-check/Cargo.toml +++ b/tools/no-std-check/Cargo.toml @@ -4,9 +4,9 @@ version = "0.1.0" edition = "2021" [dependencies] -tendermint = { path = "../../tendermint", default-features = false } -tendermint-proto = { path = "../../proto", default-features = false } -tendermint-light-client-verifier = { path = "../../light-client-verifier", default-features = false } +cometbft = { path = "../../cometbft", default-features = false } +cometbft-proto = { path = "../../proto", default-features = false } +cometbft-light-client-verifier = { path = "../../light-client-verifier", default-features = false } sp-core = { version = "4.0.0", default-features = false, optional = true } sp-io = { version = "4.0.0", default-features = false, optional = true } diff --git a/tools/proto-compiler/Cargo.toml b/tools/proto-compiler/Cargo.toml index 0eb8f885..bb9f09c4 100644 --- a/tools/proto-compiler/Cargo.toml +++ b/tools/proto-compiler/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "tendermint-proto-compiler" +name = "cometbft-proto-compiler" version = "0.3.0" authors = ["Informal Systems "] edition = "2021" diff --git a/tools/rpc-probe/Cargo.toml b/tools/rpc-probe/Cargo.toml index a5dc0aea..96bc20da 100644 --- a/tools/rpc-probe/Cargo.toml +++ b/tools/rpc-probe/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "tendermint-rpc-probe" +name = "cometbft-rpc-probe" version = "0.34.0" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" -homepage = "https://www.tendermint.com/" -repository = "https://github.com/informalsystems/tendermint-rs" +homepage = "https://cometbft.com/" +repository = "https://github.com/cometbft/cometbft-rs" readme = "README.md" description = """ - tendermint-rpc-probe allows us to probe a running Tendermint instance with + cometbft-rpc-probe allows us to probe a running CometBFT instance with a given sequence of requests, capturing those requests and/or responses. """