| Crates.io | tycho-consensus |
| lib.rs | tycho-consensus |
| version | 0.2.12 |
| created_at | 2024-10-31 22:37:28.088105+00 |
| updated_at | 2025-07-15 12:38:04.650083+00 |
| description | DAG-based consensus for external messages queue. |
| homepage | |
| repository | https://github.com/broxus/tycho |
| max_upload_size | |
| id | 1431009 |
| size | 648,658 |
Reference implementation of Tycho protocol.
Tycho is a high-performance protocol designed for building L1/L2 TVM blockchain networks. By utilizing DAG (Directed Acyclic Graph) for consensus and TVM (TON Virtual Machine) for parallel execution, Tycho works with high throughput and low latency.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt install build-essential git libssl-dev zlib1g-dev pkg-config clang jq
cargo install lychee cargo-shear cargo-nextest
just ci
check this guide.
# Generate zerostate config stub (with optional --force flag):
just init_zerostate_config
# Generate node config sub (with optional --force flag):
just init_node_config
# Generate a local network of 3 nodes (with optional --force flag):
just gen_network 3
# Start nodes in separate terminals or spawn them with `&`:
just node 1
just node 2
just node 3
[!NOTE] By default the
devprofile is used. Use this env to specify a different profile:export TYCHO_BUILD_PROFILE=release
By default, we compile RocksDB (a C++ project) from source during the build.
By linking to a prebuilt copy of RocksDB this work can be avoided
entirely. This is a huge win, especially if you clean the ./target directory
frequently.
To use a prebuilt RocksDB, set the ROCKSDB_LIB_DIR environment variable to
a location containing librocksdb.a:
export ROCKSDB_LIB_DIR=/usr/lib/
cargo build -p tycho-cli
Note, that the system must provide a recent version of the library which, depending on which operating system you're using, may require installing packages from a testing branch. Or you could build the RocksDB from source manually:
# Install dependencies
sudo apt install clang lld libjemalloc-dev libgflags-dev libzstd-dev liblz4-dev
# Clone the repo
cd /path/to
git clone https://github.com/facebook/rocksdb.git
cd rocksdb
git checkout v9.7.4
# Build the library
mkdir -p build && cd ./build
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release \
-DWITH_LZ4=ON -DWITH_ZSTD=ON -DWITH_JEMALLOC=ON ..
make -j16 rocksdb
# Set env somewhere
export ROCKSDB_LIB_DIR=/path/to/rocksdb/build
We welcome contributions to the project! If you notice any issues or errors, feel free to open an issue or submit a pull request.
Licensed under either of
at your option.