From 92185c017cf93769bc9750a91fc156862faa81c1 Mon Sep 17 00:00:00 2001 From: Zach Date: Wed, 5 Sep 2018 02:30:36 -0400 Subject: [PATCH] Several minor docs & spec cleanup (#2330) * addr_book_strick=false on local nets * link to spec * spec: remove TODO, see #1749 instead * spec: make issues from TODOs * update docs on addr_book_strict option --- config/config.go | 1 + config/toml.go | 1 + docs/spec/README.md | 2 +- docs/spec/blockchain/blockchain.md | 2 +- docs/spec/blockchain/encoding.md | 2 +- docs/spec/blockchain/state.md | 4 ++-- docs/spec/reactors/block_sync/impl.md | 5 ----- docs/tendermint-core/configuration.md | 1 + docs/tendermint-core/running-in-production.md | 4 ++-- docs/tendermint-core/secure-p2p.md | 4 ++++ 10 files changed, 14 insertions(+), 12 deletions(-) diff --git a/config/config.go b/config/config.go index de2251408..facb415f3 100644 --- a/config/config.go +++ b/config/config.go @@ -293,6 +293,7 @@ type P2PConfig struct { AddrBook string `mapstructure:"addr_book_file"` // Set true for strict address routability rules + // Set false for private or local networks AddrBookStrict bool `mapstructure:"addr_book_strict"` // Maximum number of inbound peers diff --git a/config/toml.go b/config/toml.go index 255fa2b52..184ce87bd 100644 --- a/config/toml.go +++ b/config/toml.go @@ -165,6 +165,7 @@ upnp = {{ .P2P.UPNP }} addr_book_file = "{{ js .P2P.AddrBook }}" # Set true for strict address routability rules +# Set false for private or local networks addr_book_strict = {{ .P2P.AddrBookStrict }} # Time to wait before flushing messages out on the connection, in ms diff --git a/docs/spec/README.md b/docs/spec/README.md index 82ed9717f..4de5104f1 100644 --- a/docs/spec/README.md +++ b/docs/spec/README.md @@ -31,7 +31,7 @@ please submit them to our [bug bounty](https://tendermint.com/security)! - [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 +- Evidence: Forthcoming, see [this issue](https://github.com/tendermint/tendermint/issues/2329). ### Software diff --git a/docs/spec/blockchain/blockchain.md b/docs/spec/blockchain/blockchain.md index e1e0c3fe8..ec1ab48c9 100644 --- a/docs/spec/blockchain/blockchain.md +++ b/docs/spec/blockchain/blockchain.md @@ -147,7 +147,7 @@ where `Signature` is the DER encoded signature, ie: ## Evidence -TODO +Forthcoming, see [this issue](https://github.com/tendermint/tendermint/issues/2329) ## Validation diff --git a/docs/spec/blockchain/encoding.md b/docs/spec/blockchain/encoding.md index a0acad393..3ed06260f 100644 --- a/docs/spec/blockchain/encoding.md +++ b/docs/spec/blockchain/encoding.md @@ -275,7 +275,7 @@ Because Tendermint only uses a Simple Merkle Tree, application developers are ex ### Amino -TODO: improve this +This section is pending an update, see [this issue](https://github.com/tendermint/tendermint/issues/1749). Amino also supports JSON encoding - registered types are simply encoded as: diff --git a/docs/spec/blockchain/state.md b/docs/spec/blockchain/state.md index 726015eac..92df20f3d 100644 --- a/docs/spec/blockchain/state.md +++ b/docs/spec/blockchain/state.md @@ -11,7 +11,7 @@ included in a block or gossipped over the network, and we never compute its hash. However, the types it contains are part of the specification, since their Merkle roots are included in blocks. -For details on an implementation of `State` with persistence, see TODO +Details on an implementation of `State` with persistence is forthcoming, see [this issue](https://github.com/tendermint/tendermint/issues/1152) ```go type State struct { @@ -77,4 +77,4 @@ func TotalVotingPower(vals []Validators) int64{ ### ConsensusParams -TODO +This section is forthcoming. See [this issue](https://github.com/tendermint/tendermint/issues/1152). diff --git a/docs/spec/reactors/block_sync/impl.md b/docs/spec/reactors/block_sync/impl.md index ff067b841..195f9b862 100644 --- a/docs/spec/reactors/block_sync/impl.md +++ b/docs/spec/reactors/block_sync/impl.md @@ -39,8 +39,3 @@ ## Block Store - persists blocks to disk - -# TODO - -- How does the switch from bcR to conR happen? Does conR persist blocks to disk too? -- What is the interaction between the consensus and blockchain reactors? diff --git a/docs/tendermint-core/configuration.md b/docs/tendermint-core/configuration.md index 099b9dbd8..13ea76da2 100644 --- a/docs/tendermint-core/configuration.md +++ b/docs/tendermint-core/configuration.md @@ -112,6 +112,7 @@ upnp = false addr_book_file = "addrbook.json" # Set true for strict address routability rules +# Set false for private or local networks addr_book_strict = true # Time to wait before flushing messages out on the connection, in ms diff --git a/docs/tendermint-core/running-in-production.md b/docs/tendermint-core/running-in-production.md index 76465b8e7..cb228be4a 100644 --- a/docs/tendermint-core/running-in-production.md +++ b/docs/tendermint-core/running-in-production.md @@ -270,9 +270,9 @@ saving it to the address book. The address is considered as routable if the IP is [valid and within allowed ranges](https://github.com/tendermint/tendermint/blob/27bd1deabe4ba6a2d9b463b8f3e3f1e31b993e61/p2p/netaddress.go#L209). -This may not be the case for private networks, where your IP range is usually +This may not be the case for private or local networks, where your IP range is usually strictly limited and private. If that case, you need to set `addr_book_strict` -to `false` (turn off). +to `false` (turn it off). - `rpc.max_open_connections` diff --git a/docs/tendermint-core/secure-p2p.md b/docs/tendermint-core/secure-p2p.md index 1d90e0588..01d2f22b5 100644 --- a/docs/tendermint-core/secure-p2p.md +++ b/docs/tendermint-core/secure-p2p.md @@ -59,6 +59,10 @@ are connected to at least one validator. Authenticated encryption is enabled by default. +## Specification + +The full p2p specification can be found [here](https://github.com/tendermint/tendermint/tree/master/docs/spec/p2p). + ## Additional Reading - [Implementation](https://github.com/tendermint/tendermint/blob/64bae01d007b5bee0d0827ab53259ffd5910b4e6/p2p/conn/secret_connection.go#L47)