Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Tashi Vertex
Rust bindings for Tashi Vertex, an embedded Byzantine fault-tolerant consensus engine based on the Hashgraph algorithm.
Tashi Vertex uses a DAG (Directed Acyclic Graph) of cryptographically signed events and virtual voting to achieve consensus finality in under 100 milliseconds — without exchanging explicit vote messages. For a detailed explanation, see the Vertex whitepaper.
Features
- Fast BFT Consensus — sub-100ms finality with tolerance up to
f = ⌊(n-1)/3⌋Byzantine participants - Async-first — socket binding and message receiving are
Future-based - Zero runtime dependencies — only links dynamically to the
tashi-vertexC library - Safe FFI — opaque pointer wrappers with automatic cleanup via
Drop - Configurable — 15+ tunable engine parameters (heartbeat, latency thresholds, epoch sizing, etc.)
- Base58 utilities — encode/decode keys and binary data
Installation
Add the crate to your project:
Build Requirements
- CMake >= 4.0
- The Tashi Vertex shared library (
libtashi-vertex.so/.dylib/.dll), fetched automatically by the build script
Quick Start
Generate a keypair for your node:
use KeySecret;
let secret = generate;
let public = secret.public;
println!; // Base58-encoded DER
println!;
Run a minimal consensus network:
use ;
async
API Overview
| Type | Description |
|---|---|
[Engine] |
Starts and drives the consensus engine — send transactions and receive ordered messages |
[Context] |
Runtime context managing async operations and resources |
[Socket] |
Async network socket bound to a local address |
[Options] |
Engine configuration (heartbeat, latency, epoch size, threading, etc.) |
[Message] |
Received message — either an Event or a SyncPoint |
[Event] |
A finalized event carrying consensus-ordered transactions |
[Transaction] |
Allocated buffer for submitting data to the network |
[KeySecret] |
Ed25519 secret key for signing (Base58/DER serializable) |
[KeyPublic] |
Ed25519 public key for verification (Base58/DER serializable) |
[Peers] |
Set of network participants with addresses and capabilities |
[SyncPoint] |
Session management decision from the consensus layer |
[base58] |
Base58 encoding/decoding utilities |
Examples
The examples/ directory contains runnable demos:
key-generate— Generate a new keypairkey-parse— Parse Base58-encoded keyspingback— Full multi-peer consensus network with transaction exchange
Running the Pingback Example
The pingback example runs a 3-node consensus network where each node sends a PING transaction. First, generate a keypair for each node:
Then start each node in a separate terminal, passing the other two nodes as peers:
Once all three nodes are running, each will reach consensus and print the ordered events:
:: Configured network for 3 peers
:: Initialized runtime
:: Bound local socket
:: Started the consensus engine
> Received SYNC POINT
> Received EVENT
- From: aSq9DsNNvGhY...
- Created: 1770174202473826258
- Consensus: 1770174208954261963
- Transactions: 1
- >> PING
> Received EVENT
- From: aSq9DsNNvGhY...
- Created: 1770174208954261966
- Consensus: 1770174208954261964
- Transactions: 1
- >> PING
> Received EVENT
- From: aSq9DsNNvGhY...
- Created: 1770174216230094057
- Consensus: 1770174208954261965
- Transactions: 1
- >> PING
License
This project is licensed under the Apache License, Version 2.0 (LICENSE).
Dynamic Linking to Tashi Vertex
This project dynamically links to the Tashi Vertex binary library (proprietary). Its origin and licensing details are provided in the NOTICE file.
Disclaimer: The Apache 2.0 license applies only to the source code of this project. The Tashi Vertex binary is not part of this open-source distribution and is governed by its own commercial license.