Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Update specification of light client algorithm to align with the code #61

Merged
merged 23 commits into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a4b68ec
Add non-recursive specification of Bisection algorithm
milosevic Nov 15, 2019
4ee393c
Clean up error conditions and simplify pseudocode
milosevic Nov 28, 2019
2306108
Apply suggestions from code review
milosevic Dec 2, 2019
afda2d3
some suggestions for pseuodocode changes
Dec 6, 2019
5c58084
Improved error handling
milosevic Dec 6, 2019
069906a
Improve algorithms
milosevic Dec 11, 2019
9ddfc79
Add explanation on difference between trusted models
milosevic Dec 11, 2019
8528cdb
Merge remote-tracking branch 'remotes/origin/master' into zm_lite_cli…
milosevic Dec 11, 2019
4f7c555
Address reviewer's comments
milosevic Dec 12, 2019
ee0cc53
Addressing reviewer's comments
milosevic Dec 25, 2019
0adde9d
Separating algorithm from proofs
milosevic Dec 26, 2019
4a9eb1f
Intermediate commit (aligning spec with the code)
milosevic Dec 31, 2019
7130c2e
Removing Store from API and providing end-to-end timing guarantees
milosevic Jan 6, 2020
146e251
Address reviewer comment's. Intermediate commit
milosevic Jan 8, 2020
f26eb4e
light client dir and readmes
ebuchman Jan 22, 2020
eb9e1f9
titles
ebuchman Jan 22, 2020
e342c21
add redirects
ebuchman Jan 22, 2020
0358389
add diagram
ebuchman Jan 22, 2020
d1bd98d
detection TODO
ebuchman Jan 22, 2020
bd2f41b
fix image
ebuchman Jan 22, 2020
c35d6e7
update readme
ebuchman Jan 22, 2020
dc54206
Merge pull request #73 from tendermint/bucky/light-reorg
milosevic Jan 23, 2020
026fdde
Aligh the correctness arguments with the pseudocode changes
milosevic Jan 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
320 changes: 2 additions & 318 deletions spec/consensus/fork-accountability.md

Large diffs are not rendered by default.

319 changes: 2 additions & 317 deletions spec/consensus/light-client.md

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions spec/consensus/light-client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Tendermint Light Client Protocol

NOTE: This specification is under heavy development and is not yet complete nor
accurate.

## Contents

- [Motivation](#motivation)
- [Structure](#structure)
- [Core Verification](./verification.md)
- [Fork Detection](./detection.md)
- [Fork Accountability](./accountability.md)

## Motivation

The Tendermint Light Client is motivated by the need for a light weight protocol
to sync with a Tendermint blockchain, with the least processing necessary to
securely verify a recent state. The protocol consists of managing trusted validator
sets and trusted block headers, and is based primarily on checking hashes
and verifying Tendermint commit signatures.

Motivating use cases include:

- Light Node: a daemon that syncs a blockchain to the latest committed header by making RPC requests to full nodes.
- State Sync: a reactor that syncs a blockchain to a recent committed state by making P2P requests to full nodes.
- IBC Client: an ABCI application library that syncs a blockchain to a recent committed header by receiving proof-carrying
transactions from "IBC relayers", who make RPC requests to full nodes on behalf of the IBC clients.

## Structure

### Components

The Tendermint Light Client consists of three primary components:

- [Core Verification](./verification.md): verifying hashes, signatures, and validator set changes
- [Fork Detection](./detection.md): talking to multiple peers to detect Byzantine behaviour
- [Fork Accountability](./accountability.md): analyzing Byzantine behaviour to hold validators accountable.

While every light client must perform core verification and fork detection
to achieve their prescribed security level, fork accountability is expected to
be done by full nodes and validators, and is thus more accurately a component of
the full node consensus protocol, though it is included here since it is
primarily concerned with providing security to light clients.

A schematic of the core verification and fork detection components in
a Light Node are depicted below. The schematic is quite similar for other use cases.
Note that fork accountability is not depicted, as it is the responsibility of the
full nodes.

![Light Client Diagram](./assets/light-node-image.png).

### Synchrony

Light clients are fundamentally synchronous protocols,
where security is restricted by the interval during which a validator can be punished
for Byzantine behaviour. We assume here that such intervals have fixed and known minimal duration
referred to commonly as a blockchain's Unbonding Period.

A secure light client must guarantee that all three components -
core verification, fork detection, and fork accountability -
each with their own synchrony assumptions and fault model, can execute
sequentially and to completion within the given Unbonding Period.

TODO: define all the synchrony parameters used in the protocol and their
relation to the Unbonding Period.

319 changes: 319 additions & 0 deletions spec/consensus/light-client/accountability.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions spec/consensus/light-client/detection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Detection

TODO
Loading