From b4a766063d623248e19c88f33640d1d45ad159c3 Mon Sep 17 00:00:00 2001 From: jaekwon Date: Tue, 24 Jun 2014 23:58:38 -0700 Subject: [PATCH 1/5] Update README.md --- peer/README.md | 94 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 24 deletions(-) diff --git a/peer/README.md b/peer/README.md index 766b5c5c0..2ec6ebf4f 100644 --- a/peer/README.md +++ b/peer/README.md @@ -1,38 +1,84 @@ ## Channel "" -Filter: None - -Messages: -* RefreshFilterMsg -* PeerExchangeMsg + + + + + + + + + +
FilterNone
Messages +
    +
  • RefreshFilterMsg
  • +
  • PeerExchangeMsg
  • +
+
## Channel "block" -Filter: Custom filter. - -Messages: -* BlockMsg -* HeaderMsg + + + + + + + + + +
FilterCustom
Messages +
    +
  • RequestMsg
  • +
  • BlockMsg
  • +
  • HeaderMsg
  • +
+
## Channel "mempool" -Filter: Bloom filter (n:10k, p:0.02 -> k:6, m:10KB) - -FilterRefresh: Every new block. - -Messages: -* MempoolTxMsg - + + + + + + + + + +
Filter + Bloom filter (n:10k, p:0.02 -> k:6, m:10KB)
+ Refreshes every new block +
Messages +
    +
  • MempoolTxMsg
  • +
+
+ + +## Channel "consensus" + + + + + + + + + +
Filter + Bitarray filter
+ Refreshes every new consensus round +
Messages +
    +
  • ProposalMsg
  • +
  • VoteMsg
  • +
  • NewBlockMsg
  • +
+
-## Channel "consensus" -Filter: Bitarray filter -FilterRefresh: Every new block. -Messages: -* ProposalMsg -* VoteMsg -* NewBlockMsg From 463d964fbbdced2338a4ba22ad373360462d33e8 Mon Sep 17 00:00:00 2001 From: jaekwon Date: Wed, 25 Jun 2014 11:40:26 -0700 Subject: [PATCH 2/5] Update README.md --- peer/README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/peer/README.md b/peer/README.md index 2ec6ebf4f..392dfa2cb 100644 --- a/peer/README.md +++ b/peer/README.md @@ -2,11 +2,11 @@ - + - +
FilterFilter None
MessagesMessage
  • RefreshFilterMsg
  • @@ -21,11 +21,14 @@ - - + + - +
    FilterCustomFilter + Custom
    + Nodes should only advertise having a header or block at height 'h' if it also has all the headers or blocks less than 'h'. Thus this filter need only keep track of two integers -- one for the most recent header height 'h_h' and one for the most recent block height 'h_b', where 'h_b' <= 'h_h'. +
    MessagesMessages
    • RequestMsg
    • @@ -41,14 +44,14 @@ - + - +
      FilterFilter Bloom filter (n:10k, p:0.02 -> k:6, m:10KB)
      Refreshes every new block
      MessagesMessages
      • MempoolTxMsg
      • @@ -61,14 +64,14 @@ ## Channel "consensus" - + - +
        FilterFilter Bitarray filter
        Refreshes every new consensus round
        MessagesMessages
        • ProposalMsg
        • From 2139b488effecee3dadcbdd48ada8049e4fa2774 Mon Sep 17 00:00:00 2001 From: jaekwon Date: Wed, 25 Jun 2014 11:58:34 -0700 Subject: [PATCH 3/5] Update README.md --- peer/README.md | 53 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/peer/README.md b/peer/README.md index 392dfa2cb..ee6da1677 100644 --- a/peer/README.md +++ b/peer/README.md @@ -1,25 +1,43 @@ -## Channel "" +## Channels + +Each peer connection is multiplexed into channels. Each channel can optionally have an associated filter which determines whether the peer already knows of the message. The system is designed to be easily extensible for various applications. +
          + +### Default channel + +The default channel is used to communicate state changes, pings, peer exchange, and other automatic internal messages that all P2P protocols would want implemented. + + + + - + - +
          Channel""
          FilterNoneNone
          Messages in this channel is not filtered.
          MessageMessages
            -
          • RefreshFilterMsg
          • +
          • PingMsg/PongMsg
          • PeerExchangeMsg
          • +
          • RefreshFilterMsg
          +
          +### Block channel -## Channel "block" +The block channel is used to propagate block or header information to new peers or peers catching up with the blockchain. + + + +
          Channel"block"
          Filter @@ -38,16 +56,23 @@
          +
          +### Mempool channel -## Channel "mempool" +The mempool channel is used for broadcasting new transactions that haven't yet entered the blockchain. It uses a lossy bloom filter on either end, but with sufficient fanout and filter nonce updates every new block, all transactions will eventually reach every node. + + + + @@ -59,14 +84,22 @@
          Channel"mempool"
          Filter Bloom filter (n:10k, p:0.02 -> k:6, m:10KB)
          - Refreshes every new block + Each peer's filter has a random nonce that scrambles the message hashes
          + The filter & nonce refreshes every new block
          +
          + +### Consensus channel +The consensus channel broadcasts all information used in the rounds of the Tendermint consensus mechanism. -## Channel "consensus" + + + + @@ -81,7 +114,3 @@
          Channel"consensus"
          Filter Bitarray filter
          + Each validator has a predetermined index in teh bitarray
          Refreshes every new consensus round
          - - - - From c27b7ff4ad9ec7fd6987d558443a0981cc1aa09a Mon Sep 17 00:00:00 2001 From: jaekwon Date: Wed, 25 Jun 2014 12:06:59 -0700 Subject: [PATCH 4/5] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 398ccfb63..ba434511a 100644 --- a/README.md +++ b/README.md @@ -1 +1,11 @@ TenderMint - proof of concept + +* **peer:** P2P networking stack. Designed to be extensible. [docs](https://github.com/tendermint/tendermint/peer/README.md) +* **merkle:** Immutable Persistent Merkle-ized AVL+ Tree, used primarily for keeping track of mutable state like account balances. [docs](https://github.com/tendermint/tendermint/blob/master/merkle/README.md) +* **crypto:** Includes cgo bindings of ed25519. [docs](https://github.com/tendermint/tendermint/blob/master/crypto/README.md) + +### Status + +* Still implementing peer/* +* Ed25519 bindings *complete* +* merkle/* *complete* From 5f266617987d4a8fba0cf58c98dcabb7d0cd17f7 Mon Sep 17 00:00:00 2001 From: jaekwon Date: Wed, 25 Jun 2014 21:15:11 -0700 Subject: [PATCH 5/5] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ba434511a..822df3e00 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ TenderMint - proof of concept -* **peer:** P2P networking stack. Designed to be extensible. [docs](https://github.com/tendermint/tendermint/peer/README.md) -* **merkle:** Immutable Persistent Merkle-ized AVL+ Tree, used primarily for keeping track of mutable state like account balances. [docs](https://github.com/tendermint/tendermint/blob/master/merkle/README.md) -* **crypto:** Includes cgo bindings of ed25519. [docs](https://github.com/tendermint/tendermint/blob/master/crypto/README.md) +* **[peer](https://github.com/tendermint/tendermint/blob/master/peer):** P2P networking stack. Designed to be extensible. +* **[merkle](https://github.com/tendermint/tendermint/blob/master/merkle):** Immutable Persistent Merkle-ized AVL+ Tree, used primarily for keeping track of mutable state like account balances. +* **[crypto](https://github.com/tendermint/tendermint/blob/master/crypto):** Includes cgo bindings of ed25519. ### Status