Skip to content

Commit

Permalink
Clarify Bullshark is default, Tusk is still available for consensus (M…
Browse files Browse the repository at this point in the history
…ystenLabs#4394)

* Clarify Bullshark is default, Tusk is still available for consensus

* Fix Tusk link

* Replace list with Sui Consensus Engine
  • Loading branch information
Clay-Mysten authored Sep 1, 2022
1 parent a3b3f63 commit 0b2605b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 14 additions & 11 deletions doc/src/learn/architecture/consensus.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
---
title: Narwhal and Tusk, Sui's Consensus Engine
title: Narwhal, Bullshark, and Tusk, Sui's Consensus Engine
---

This is a brief introduction to [Narwhal and Bullshark](https://github.com/MystenLabs/narwhal), the high-throughput mempool and consensus offered by Mysten Labs. Sui runs consensus as needed to periodically checkpoint its state. And for those transactions that require a total ordering, Narwhal/Bullshark is the consensus engine of Sui.
This is a brief introduction to [Narwhal, Tusk](https://github.com/MystenLabs/narwhal), and [Bullshark](https://arxiv.org/abs/2201.05677), the high-throughput mempool and consensus offered by Mysten Labs. Sui runs consensus as needed to periodically checkpoint its state. And for those transactions that require a total ordering, Narwhal and either Bullshark or Tusk comprise the Sui Consensus Engine.

The dual name highlights that the systems split the responsibilities of:
- ensuring the availability of data submitted to consensus ([Narwhal](https://arxiv.org/abs/2105.11827))
- agreeing on a specific ordering of this data ([Bullshark](https://arxiv.org/abs/2201.05677))
- ensuring the availability of data submitted to consensus = [Narwhal](https://arxiv.org/abs/2105.11827)
- agreeing on a specific ordering of this data = [Bullshark](https://arxiv.org/abs/2201.05677) or [Tusk](https://github.com/MystenLabs/narwhal)

> **Note:** Bullshark has replaced the Tusk component of the consensus protocol for reduced latency and support for fairness (where even slow validators can contribute). See [DAG Meets BFT - The Next Generation of BFT Consensus](https://decentralizedthoughts.github.io/2022-06-28-DAG-meets-BFT/) for a comparison of the protocols.
In August 2022, Bullshark replaced the Tusk component of the consensus protocol as the default for reduced latency and support for fairness (where even slow validators can contribute). See [DAG Meets BFT - The Next Generation of BFT Consensus](https://decentralizedthoughts.github.io/2022-06-28-DAG-meets-BFT/) for a comparison of the protocols.

This is done in two layered modules, so Narwhal can also be used coupled with an external consensus algorithm, such as HotStuff, Istanbul BFT, or Tendermint. Narwhal is undergoing integration in the [Celo](https://www.youtube.com/watch?v=Lwheo3jhAZM) and [Sommelier](https://www.prnewswire.com/news-releases/sommelier-partners-with-mysten-labs-to-make-the-cosmos-blockchain-the-fastest-on-the-planet-301381122.html) blockchain.
Still, you may easily use Tusk instead of Bullshark by reverting the change shown in:
https://github.com/MystenLabs/narwhal/blob/85c226f2824010ff695d0bc5789a24cad2bce289/node/src/lib.rs#L266

Narwhal and Bullshark represent the latest variant of decades of work on multi-proposer, high-throughput consensus algorithms that reaches throughputs more than 125,000 transactions per second with a two-second latency for a deployment of 50 parties, with production cryptography, permanent storage, and a scaled-out primary-worker architecture.
Consensus is accomplished in two layered modules, so Narwhal can also be used coupled with an external consensus algorithm, such as HotStuff, Istanbul BFT, or Tendermint. Narwhal is undergoing integration in the [Celo](https://www.youtube.com/watch?v=Lwheo3jhAZM) and [Sommelier](https://www.prnewswire.com/news-releases/sommelier-partners-with-mysten-labs-to-make-the-cosmos-blockchain-the-fastest-on-the-planet-301381122.html) blockchain.

The Narwhal/Bullshark approach can offer dramatic scalability benefits in the following cases:
The Sui Consensus Engine represents the latest variant of decades of work on multi-proposer, high-throughput consensus algorithms that reaches throughputs more than 125,000 transactions per second with a two-second latency for a deployment of 50 parties, with production cryptography, permanent storage, and a scaled-out primary-worker architecture.

The Sui Consensus Engine approach can offer dramatic scalability benefits in the following cases:
- a blockchain that has experimented with larger and larger blocks and has measured runaway latencies before the execution phase,
- a blockchain with fast execution (e.g. focused on transactions, or with an UTXO data model), but which mempool and consensus do not keep up,

Expand All @@ -25,7 +28,7 @@ The Narwhal mempool offers:
* a structured graph data structure for traversing this information
* a scaled architecture, splitting the disk I/O and networking requirements across several [workers](https://github.com/MystenLabs/narwhal/tree/main/worker)

The [Bullshark consensus](https://github.com/MystenLabs/narwhal/tree/main/consensus) offers a zero-message overhead consensus algorithm, leveraging graph traversals.
The [consensus](https://github.com/MystenLabs/narwhal/tree/main/consensus) component offers a zero-message overhead consensus algorithm, leveraging graph traversals.

## Architecture

Expand Down Expand Up @@ -75,15 +78,15 @@ flowchart TB
* The certificates prove the data availability of each collection, or block, at each round.
* Their contents constitute a DAG that can be traversed identically at each honest node.

While the Bullshark consensus selects a specific DAG traversal among several a posteriori, both Bullshark and external consensus algorithms can add more sophistication to their selection of blocks / collections to reflect priority concerns.
While the Bullshark or Tusk consensus selects a specific DAG traversal among several a posteriori, both they and external consensus algorithms can add more sophistication to their selection of blocks / collections to reflect priority concerns.

## Dependencies

Narwhal is implemented using [Tokio](https://github.com/tokio-rs/tokio), [RocksDB](https://github.com/facebook/rocksdb/) and generic cryptography. The cryptography contains implementations of node signing using BLS12-377, BLS12-381, and Ed25519.

## Configuration

To conduct a fresh deployment of Narwhal and Bullshark, follow the instructions at [Running Benchmarks](https://github.com/mystenlabs/narwhal/tree/main/benchmark).
To conduct a fresh deployment of Sui Consensus Engine, follow the instructions at [Running Benchmarks](https://github.com/mystenlabs/narwhal/tree/main/benchmark).

## Further reading

Expand Down
2 changes: 1 addition & 1 deletion doc/src/learn/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ For a deep dive into Sui technology, see the [Sui Smart Contracts Platform](http

The following list includes the recent updates to Sui and the documentation:

* [Bullshark](https://arxiv.org/abs/2201.05677) replaced Tusk as the default consensus component of the [Narwhal](https://github.com/MystenLabs/narwhal)-based [Sui consensus engine](../learn/architecture/consensus.md) for reduced latency and support for fairness with slower validators. Note, Tusk may still be used.
* You must now specify the key scheme type as an argument (`secp256k1` or `ed25519`) when running either the `sui keytool generate` or `sui client new-address` commands, as shown in [adding accounts to the client](../build/cli-client.md#adding-accounts-to-the-client).
* [Sui version 0.8.0](https://github.com/MystenLabs/sui/releases/tag/devnet-0.8.0) is now live in Devnet with numerous fixes and enhancements, including new designs for [Sui Explorer](https://explorer.devnet.sui.io/) and [event query support](https://github.com/MystenLabs/sui/blob/main/crates/sui-json-rpc/src/event_api.rs#L122-L210) in fullnode.
* Follow the [Cryptography (math)](https://github.com/MystenLabs/sui/tree/main/sui_programmability/examples/math) example for a simple contract that hashes a piece of data using keccak256, recovers a [Secp256k1](https://crates.io/crates/secp256k1/) signature to its public key, and verifies a Secp256k1 signature, producing an event with the results.
* [Bullshark](https://arxiv.org/abs/2201.05677) has replaced Tusk as the consensus component of the [Narwhal](https://github.com/MystenLabs/narwhal)-based [Sui consensus engine](../learn/architecture/consensus.md) for reduced latency and support for fairness with slower validators.
* Sui now supports [shared objects](../build/objects.md#shared) that anyone can read or write to. For an example of creating and accessing a shared object, see [Shared Object](https://examples.sui.io/basics/shared-object.html#shared-object) on https://examples.sui.io/.
* Interact with the Sui network using our new [Rust SDK](../build/rust-sdk.md), a collection of Rust language [JSON-RPC wrapper and crypto utilities](https://github.com/MystenLabs/sui/tree/main/crates/sui-sdk).
* Sui now supports development using [Microsoft Windows 11, macOS, and Linux](../build/install.md#supported-oses). See [install Sui](../build/install.md#prerequisites) for the prerequisites of each operating system.
Expand Down

0 comments on commit 0b2605b

Please sign in to comment.