cometbft-p2p

Crates.iocometbft-p2p
lib.rscometbft-p2p
version0.1.0
created_at2025-08-26 16:40:41.292225+00
updated_at2025-08-26 16:40:41.292225+00
descriptionPure Rust implementation of CometBFT's encrypted P2P protocol
homepage
repositoryhttps://github.com/iqlusioninc/iqkms
max_upload_size
id1811458
size125,324
Tony Arcieri (iqlusion) (tony-iqlusion)

documentation

README

cometbft-p2p

Crate Docs Apache 2.0 Licensed MSRV

Pure Rust implementation of the Secret Connection transport encryption protocol used by CometBFT for peer-to-peer (P2P) connections.

Features

  • Synchronous SecretConnection implementation for std::io (e.g. TcpStream)
  • AsyncSecretConnection implementation based on tokio
  • Protobuf Message-oriented interface which abstracts away low-level buffering/framing
  • Support for splitting connections into separate readers/writers that can be used concurrently
  • Self-contained with no dependencies on legacy tendermint-rs

Compatibility

Tested in production with CometBFT v0.37, v0.38, and v1.0.

Should also be compatible with legacy Tendermint versions v0.34+, as well as earlier versions of CometBFT.

Cryptographic algorithms

The Secret Connection protocol uses the following cryptographic algorithms:

  • Identity: Ed25519
  • Key exchange: X25519
  • Packet encryption: ChaCha20Poly1305

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file 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.

Commit count: 28

cargo fmt