From 423fef1416539ebbf322c52f1caeb26fbbd197ad Mon Sep 17 00:00:00 2001 From: Zach Ramsay Date: Wed, 23 May 2018 10:01:32 -0400 Subject: [PATCH] docs: use absolute links (#1617) --- docs/spec/README.md | 16 ++++++++-------- docs/spec/blockchain/blockchain.md | 2 +- docs/spec/blockchain/encoding.md | 7 ++++--- docs/spec/blockchain/state.md | 3 +-- docs/spec/consensus/abci.md | 4 +--- docs/spec/p2p/node.md | 2 +- docs/spec/p2p/peer.md | 2 +- docs/spec/reactors/consensus/consensus.md | 4 ++-- .../reactors/consensus/proposer-selection.md | 1 - docs/spec/reactors/mempool/README.md | 11 ----------- docs/spec/reactors/mempool/messages.md | 3 ++- docs/spec/reactors/pex/pex.md | 4 ++-- docs/specification/new-spec/README.md | 2 +- p2p/README.md | 10 +++++----- 14 files changed, 29 insertions(+), 42 deletions(-) delete mode 100644 docs/spec/reactors/mempool/README.md diff --git a/docs/spec/README.md b/docs/spec/README.md index e13e65c1f..e2f6d1fa1 100644 --- a/docs/spec/README.md +++ b/docs/spec/README.md @@ -14,9 +14,9 @@ please submit them to our [bug bounty](https://tendermint.com/security)! ### Data Structures -- [Encoding and Digests](./blockchain/encoding.md) -- [Blockchain](./blockchain/blockchain.md) -- [State](./blockchain/state.md) +- [Encoding and Digests](https://github.com/tendermint/tendermint/blob/master/docs/spec/blockchain/encoding.md) +- [Blockchain](https://github.com/tendermint/tendermint/blob/master/docs/spec/blockchain/blockchain.md) +- [State](https://github.com/tendermint/tendermint/blob/master/docs/spec/blockchain/state.md) ### Consensus Protocol @@ -24,11 +24,11 @@ please submit them to our [bug bounty](https://tendermint.com/security)! ### P2P and Network Protocols -- [The Base P2P Layer](p2p): multiplex the protocols ("reactors") on authenticated and encrypted TCP connections -- [Peer Exchange (PEX)](reactors/pex): gossip known peer addresses so peers can find each other -- [Block Sync](reactors/block_sync): gossip blocks so peers can catch up quickly -- [Consensus](reactors/consensus): gossip votes and block parts so new blocks can be committed -- [Mempool](reactors/mempool): gossip transactions so they get included in blocks +- [The Base P2P Layer](https://github.com/tendermint/tendermint/tree/master/docs/spec/p2p): multiplex the protocols ("reactors") on authenticated and encrypted TCP connections +- [Peer Exchange (PEX)](https://github.com/tendermint/tendermint/tree/master/docs/spec/reactors/pex): gossip known peer addresses so peers can find each other +- [Block Sync](https://github.com/tendermint/tendermint/tree/master/docs/spec/reactors/block_sync): gossip blocks so peers can catch up quickly +- [Consensus](https://github.com/tendermint/tendermint/tree/master/docs/spec/reactors/consensus): gossip votes and block parts so new blocks can be committed +- [Mempool](https://github.com/tendermint/tendermint/tree/master/docs/spec/reactors/mempool): gossip transactions so they get included in blocks - Evidence: TODO ### More diff --git a/docs/spec/blockchain/blockchain.md b/docs/spec/blockchain/blockchain.md index d95d5d330..7ef0d768c 100644 --- a/docs/spec/blockchain/blockchain.md +++ b/docs/spec/blockchain/blockchain.md @@ -162,7 +162,7 @@ We refer to certain globally available objects: and `state` keeps track of the validator set, the consensus parameters and other results from the application. Elements of an object are accessed as expected, -ie. `block.Header`. See [here](state.md) for the definition of `state`. +ie. `block.Header`. See [here](https://github.com/tendermint/tendermint/blob/master/docs/spec/blockchain/state.md) for the definition of `state`. ### Header diff --git a/docs/spec/blockchain/encoding.md b/docs/spec/blockchain/encoding.md index f897bb1dc..9817d4ed5 100644 --- a/docs/spec/blockchain/encoding.md +++ b/docs/spec/blockchain/encoding.md @@ -2,7 +2,7 @@ ## Amino -Tendermint uses the Protobuf3 derrivative [Amino]() for all data structures. +Tendermint uses the Protobuf3 derivative [Amino](https://github.com/tendermint/go-amino for all data structures). Think of Amino as an object-oriented Protobuf3 with native JSON support. The goal of the Amino encoding protocol is to bring parity between application logic objects and persistence objects. @@ -51,8 +51,8 @@ Notice that when encoding byte-arrays, the length of the byte-array is appended to the PrefixBytes. Thus the encoding of a byte array becomes ` ` -(NOTE: the remainder of this section on Public Key Cryptography can be generated -from [this script](./scripts/crypto.go)) +NOTE: the remainder of this section on Public Key Cryptography can be generated +from [this script](https://github.com/tendermint/tendermint/blob/master/docs/spec/scripts/crypto.go) ### PubKeyEd25519 @@ -290,6 +290,7 @@ Amino also supports JSON encoding - registered types are simply encoded as: "type": "", "value": } +``` For instance, an ED25519 PubKey would look like: diff --git a/docs/spec/blockchain/state.md b/docs/spec/blockchain/state.md index c7de007f3..3b374f70a 100644 --- a/docs/spec/blockchain/state.md +++ b/docs/spec/blockchain/state.md @@ -77,5 +77,4 @@ func TotalVotingPower(vals []Validators) int64{ ### ConsensusParams -TODO: - +TODO diff --git a/docs/spec/consensus/abci.md b/docs/spec/consensus/abci.md index a16dd8fce..aa09cf3ad 100644 --- a/docs/spec/consensus/abci.md +++ b/docs/spec/consensus/abci.md @@ -58,7 +58,7 @@ message Validator { ``` The `pub_key` is the Amino encoded public key for the validator. For details on -Amino encoded public keys, see the [section of the encoding spec](./encoding.md#public-key-cryptography). +Amino encoded public keys, see the [section of the encoding spec](https://github.com/tendermint/tendermint/blob/master/docs/spec/blockchain/encoding.md#public-key-cryptography). For Ed25519 pubkeys, the Amino prefix is always "1624DE6220". For example, the 32-byte Ed25519 pubkey `76852933A4686A721442E931A8415F62F5F1AEDF4910F1F252FB393F74C40C85` would be @@ -121,7 +121,6 @@ stateBlockHeight = height of the last block for which Tendermint completed all block processing and saved all ABCI results to disk appBlockHeight = height of the last block for which ABCI app succesfully completely Commit - ``` Note we always have `storeBlockHeight >= stateBlockHeight` and `storeBlockHeight >= appBlockHeight` @@ -165,4 +164,3 @@ If `storeBlockHeight == stateBlockHeight+1` If appBlockHeight == storeBlockHeight { update the state using the saved ABCI responses but dont run the block against the real app. This happens if we crashed after the app finished Commit but before Tendermint saved the state. - diff --git a/docs/spec/p2p/node.md b/docs/spec/p2p/node.md index 5f5b312ce..366b27dd2 100644 --- a/docs/spec/p2p/node.md +++ b/docs/spec/p2p/node.md @@ -12,7 +12,7 @@ Seeds should operate full nodes with the PEX reactor in a "crawler" mode that continuously explores to validate the availability of peers. Seeds should only respond with some top percentile of the best peers it knows about. -See [the peer-exchange docs](../reactors/pex/pex.md)for details on peer quality. +See [the peer-exchange docs](https://github.com/tendermint/tendermint/blob/master/docs/spec/reactors/pex/pex.md)for details on peer quality. ## New Full Node diff --git a/docs/spec/p2p/peer.md b/docs/spec/p2p/peer.md index c9d05d5ac..2b8c48c16 100644 --- a/docs/spec/p2p/peer.md +++ b/docs/spec/p2p/peer.md @@ -2,7 +2,7 @@ This document explains how Tendermint Peers are identified and how they connect to one another. -For details on peer discovery, see the [peer exchange (PEX) reactor doc](../reactors/pex/pex.md). +For details on peer discovery, see the [peer exchange (PEX) reactor doc](https://github.com/tendermint/tendermint/blob/master/docs/spec/reactors/pex/pex.md). ## Peer Identity diff --git a/docs/spec/reactors/consensus/consensus.md b/docs/spec/reactors/consensus/consensus.md index d5655297b..4ea619b51 100644 --- a/docs/spec/reactors/consensus/consensus.md +++ b/docs/spec/reactors/consensus/consensus.md @@ -16,7 +16,7 @@ explained in a forthcoming document. For efficiency reasons, validators in Tendermint consensus protocol do not agree directly on the block as the block size is big, i.e., they don't embed the block inside `Proposal` and `VoteMessage`. Instead, they reach agreement on the `BlockID` (see `BlockID` definition in -[Blockchain](blockchain.md) section) that uniquely identifies each block. The block itself is +[Blockchain](https://github.com/tendermint/tendermint/blob/master/docs/spec/blockchain/blockchain.md#blockid) section) that uniquely identifies each block. The block itself is disseminated to validator processes using peer-to-peer gossiping protocol. It starts by having a proposer first splitting a block into a number of block parts, that are then gossiped between processes using `BlockPartMessage`. @@ -69,7 +69,7 @@ BlockID contains PartSetHeader. ## VoteMessage VoteMessage is sent to vote for some block (or to inform others that a process does not vote in the -current round). Vote is defined in [Blockchain](blockchain.md) section and contains validator's +current round). Vote is defined in the [Blockchain](https://github.com/tendermint/tendermint/blob/master/docs/spec/blockchain/blockchain.md#blockid) section and contains validator's information (validator address and index), height and round for which the vote is sent, vote type, blockID if process vote for some block (`nil` otherwise) and a timestamp when the vote is sent. The message is signed by the validator private key. diff --git a/docs/spec/reactors/consensus/proposer-selection.md b/docs/spec/reactors/consensus/proposer-selection.md index 01fa95b8a..649d3dd21 100644 --- a/docs/spec/reactors/consensus/proposer-selection.md +++ b/docs/spec/reactors/consensus/proposer-selection.md @@ -44,4 +44,3 @@ p0, p0, p0, p0, p0, p0, p0, p0, p0, p0, p0, p0, p0, p1, p0, p0, p0, p0, p0, etc This basically means that almost all rounds have the same proposer. But in this case, the process p0 has anyway enough voting power to decide whatever he wants, so the fact that he coordinates almost all rounds seems correct. - diff --git a/docs/spec/reactors/mempool/README.md b/docs/spec/reactors/mempool/README.md deleted file mode 100644 index 138b287a5..000000000 --- a/docs/spec/reactors/mempool/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Mempool Specification - -This package contains documents specifying the functionality -of the mempool module. - -Components: - -* [Config](./config.md) - how to configure it -* [External Messages](./messages.md) - The messages we accept over p2p and rpc interfaces -* [Functionality](./functionality.md) - high-level description of the functionality it provides -* [Concurrency Model](./concurrency.md) - What guarantees we provide, what locks we require. diff --git a/docs/spec/reactors/mempool/messages.md b/docs/spec/reactors/mempool/messages.md index 5bd1d1e55..e45ef02e0 100644 --- a/docs/spec/reactors/mempool/messages.md +++ b/docs/spec/reactors/mempool/messages.md @@ -32,6 +32,7 @@ wait before returning (sync makes sure CheckTx passes, commit makes sure it was included in a signed block). Request (`POST http://gaia.zone:46657/`): + ```json { "id": "", @@ -43,8 +44,8 @@ Request (`POST http://gaia.zone:46657/`): } ``` - Response: + ```json { "error": "", diff --git a/docs/spec/reactors/pex/pex.md b/docs/spec/reactors/pex/pex.md index 44a0e3fd8..317803b8e 100644 --- a/docs/spec/reactors/pex/pex.md +++ b/docs/spec/reactors/pex/pex.md @@ -117,7 +117,7 @@ current, past, and rate-of-change data to inform peer quality. While a PID trust metric has been implemented, it remains for future work to use it in the PEX. -See the [trustmetric](../../../architecture/adr-006-trust-metric.md ) -and [trustmetric useage](../../../architecture/adr-007-trust-metric-usage.md ) +See the [trustmetric](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-006-trust-metric.md) +and [trustmetric useage](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-007-trust-metric-usage.md) architecture docs for more details. diff --git a/docs/specification/new-spec/README.md b/docs/specification/new-spec/README.md index f5ebd2714..907ddd945 100644 --- a/docs/specification/new-spec/README.md +++ b/docs/specification/new-spec/README.md @@ -1 +1 @@ -Spec moved to [docs/spec](/docs/spec). +Spec moved to [docs/spec](https://github.com/tendermint/tendermint/tree/master/docs/spec). diff --git a/p2p/README.md b/p2p/README.md index 98e9ce2d9..819a5056b 100644 --- a/p2p/README.md +++ b/p2p/README.md @@ -4,8 +4,8 @@ The p2p package provides an abstraction around peer-to-peer communication. Docs: -- [Connection](../docs/spec/p2p/connection.md) for details on how connections and multiplexing work -- [Peer](../docs/spec/p2p/peer.md) for details on peer ID, handshakes, and peer exchange -- [Node](../docs/spec/p2p/node.md) for details about different types of nodes and how they should work -- [Pex](../docs/spec/reactors/pex/pex.md) for details on peer discovery and exchange -- [Config](../docs/spec/p2p/config.md) for details on some config option +- [Connection](https://github.com/tendermint/tendermint/blob/master/docs/spec/docs/spec/p2p/connection.md) for details on how connections and multiplexing work +- [Peer](https://github.com/tendermint/tendermint/blob/master/docs/spec/docs/spec/p2p/peer.md) for details on peer ID, handshakes, and peer exchange +- [Node](https://github.com/tendermint/tendermint/blob/master/docs/spec/docs/spec/p2p/node.md) for details about different types of nodes and how they should work +- [Pex](https://github.com/tendermint/tendermint/blob/master/docs/spec/docs/spec/reactors/pex/pex.md) for details on peer discovery and exchange +- [Config](https://github.com/tendermint/tendermint/blob/master/docs/spec/docs/spec/p2p/config.md) for details on some config option