Skip to content

Commit

Permalink
Avoid a blank section for Design, by moving the Design Overview there.
Browse files Browse the repository at this point in the history
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
  • Loading branch information
daira committed Oct 10, 2024
1 parent 556623a commit 26318f6
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 46 deletions.
3 changes: 1 addition & 2 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
- [Get Involved](./introduction/get-involved.md)
- [Terminology](./terminology.md)
- [Design](./design.md)
- [Overview](./design/overview.md)
- [Design at a Glance](./design/overview/design-at-a-glance.md)
- [Design at a Glance](./design/design-at-a-glance.md)
- [Design Goals](./design/goals.md)
- [Crosslink](./design/crosslink.md)
- [The Arguments for Bounded Dynamic Availability and Finality Overrides](./design/crosslink/the-arguments-for-bounded-dynamic-availability-and-finality-overrides.md)
Expand Down
15 changes: 14 additions & 1 deletion src/design.md
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
# Design
# Design Overview

This design augments the existing Zcash Proof-of-Work (PoW) network with a new consensus layer which provides *trailing finality*, called the *Trailing Finality Layer (TFL)*.

This layer enables blocks produced via PoW to become *final* which ensures they may never be rolled back. This enables safer and simpler wallets and other infrastructure, and aids trust-minimized cross-chain bridges.

This consensus layer uses a finalizing *Proof-of-Stake (PoS)* consensus protocol, and enables ZEC holders to earn protocol rewards for contributing to the security of the Zcash network. By integrating a PoS layer with the current PoW Zcash protocol, this design specifies a *hybrid consensus protocol*.

The integration of the current PoW consensus with the TFL produces a new top-level consensus protocol referred to as *PoW+TFL*.

In the following subchapters we introduce the [Design at a Glance](./design/design-at-a-glance.md), then provide an overview of the major components of the design.

Following this overview chapter, we proceed into a detailed [Protocol Specification (TODO)]().

28 changes: 28 additions & 0 deletions src/design/design-at-a-glance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Design at a Glance

The [PoW+TFL](../terminology.md#definition-pow-tfl) consensus protocol is logically an extension of the Zcash consensus rules to introduce [trailing finality](../terminology.md#definition-trailing-finality). This is achieved by compartmentalizing the top-level PoW+TFL protocol into two [consensus subprotocols](../terminology.md#definition-consensus-subprotocols), one embodying most of the current consensus logic of Zcash and another the TFL. These protocols interact through a [hybrid construction](../terminology.md#definition-hybrid-construction), which specifies how the protocols interact, and what changes from "off-the-shelf" behavior, if any, need to be imposed on the subprotocols. Each of these components (the two subprotocols and the hybrid construction) are somewhat modular: different subprotocols or hybrid constructions may be combined (with some modification) to produce a candidate [PoW+TFL](../terminology.md#definition-pow-tfl) protocol.

**TODO:** [Add a protocol component diagram to "Design at a Glance" #122](https://github.com/Electric-Coin-Company/tfl-book/issues/122)

## Hybrid Construction

The [hybrid construction](../terminology.md#definition-hybrid-construction) is a major design component of the full consensus protocol which specifies how the subprotocols integrate. So far we have considered three candidates:

1. The implied/loosely defined hybrid construction [presented at Zcon4](https://www.youtube.com/watch?v=qhMzMYeEPMM&list=PL40dyJ0UYTLII7oQRQmNOFf0d2iKT35tL&index=17).
2. The [Snap-and-Chat](../terminology.md#definition-snap-and-chat) from the [Ebb-and-Flow paper](https://eprint.iacr.org/2020/1091).
3. The [Crosslink](../terminology.md#definition-crosslink) construction.

Currently we believe [Crosslink](../terminology.md#definition-crosslink) is the best candidate, due to security considerations.

**TODO:** [Explain why we're more confident in Crosslink security vs the other hybrid construction candidates #123](https://github.com/Electric-Coin-Company/tfl-book/issues/123)

## Subprotocols

The PoW+TFL hybrid consensus consists of two interacting subprotocols:

1. [PoW Subprotocol](../terminology.md#definition-pow): this subprotocol is very similar to NU5 or NU6 consensus. It is a design goal of the TFL design to minimize changes to this subprotocol. Note: the shorthand "PoW" is potentially misleading, because this subprotocol is also responsible for the bulk of all supply and transaction semantic consensus rules.
2. [PoS Subprotocol](../terminology.md#definition-pos): this is a new subprotocol which provides trailing finality via a finalizing PoS protocol.

**TODO:** [Clarify the distinctions between pure PoW, the PoW subprotocol, NU6, and fork-choice vs all of transaction semantics. #119](https://github.com/Electric-Coin-Company/tfl-book/issues/119)

Note that the [hybrid construction](../terminology.md#definition-hybrid-construction) may require modification to the "off-the-shelf" versions of these subprotocols. In particular [Crosslink](../terminology.md#definition-crosslink) requires each protocol to refer to the state of the other to provide [objective validity](../terminology.md#definition-objective-validity).
14 changes: 0 additions & 14 deletions src/design/overview.md

This file was deleted.

28 changes: 0 additions & 28 deletions src/design/overview/design-at-a-glance.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/introduction/trailing-finality-layer-in-a-nutshell.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ There will be certain narrow exceptional areas if those products, services, or t

### Modular Design

By conceptualizing the TFL as a distinct "layer" or subprotocol, the consensus rules can be described in terms of two [consensus subprotocols](../terminology.md#definition-consensus-subprotocols), one embodying most of the current consensus logic of Zcash and another the TFL. These protocols interact through a [hybrid construction](../terminology.md#definition-hybrid-construction). See [Design at a Glance](../design/overview/design-at-a-glance.md) to learn more about these distinct subprotocols.
By conceptualizing the TFL as a distinct "layer" or subprotocol, the consensus rules can be described in terms of two [consensus subprotocols](../terminology.md#definition-consensus-subprotocols), one embodying most of the current consensus logic of Zcash and another the TFL. These protocols interact through a [hybrid construction](../terminology.md#definition-hybrid-construction). See [Design at a Glance](../design/design-at-a-glance.md) to learn more about these distinct subprotocols.

Reasoning about the whole protocol can leverage analysis and understanding of each subprotocol and the hybrid construction somewhat independently due to this modular design. Note that although this design is modular, the hybrid construction may require modifications to the [PoW] and/or [PoS] subprotocols to protect safety and liveness properties. Nevertheless, the modularity still improves analysis and reasoning compared to a monolithic design.

Expand Down

0 comments on commit 26318f6

Please sign in to comment.