You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Jae Kwon 1789f39a3e Channels do not have integrated filters. They're only for multiplexing. 11 years ago
..
README.md Channels do not have integrated filters. They're only for multiplexing. 11 years ago
addrbook.go . 11 years ago
client.go Channels do not have integrated filters. They're only for multiplexing. 11 years ago
connection.go Channels do not have integrated filters. They're only for multiplexing. 11 years ago
connection_test.go Channels do not have integrated filters. They're only for multiplexing. 11 years ago
knownaddress.go working draft of peer 11 years ago
listener.go Channels do not have integrated filters. They're only for multiplexing. 11 years ago
log.go working draft of peer 11 years ago
msg.go . 11 years ago
netaddress.go working draft of peer 11 years ago
peer.go Channels do not have integrated filters. They're only for multiplexing. 11 years ago
server.go Channels do not have integrated filters. They're only for multiplexing. 11 years ago
set.go Channels do not have integrated filters. They're only for multiplexing. 11 years ago
upnp.go Channels do not have integrated filters. They're only for multiplexing. 11 years ago
upnp_test.go Channels do not have integrated filters. They're only for multiplexing. 11 years ago
util.go stripped addrmanager from btcd 11 years ago

README.md

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 ""
Filter None
Messages in this channel is not filtered.
Messages
  • PingMsg/PongMsg
  • PeerExchangeMsg
  • RefreshFilterMsg

Block channel

The block channel is used to propagate block or header information to new peers or peers catching up with the blockchain.

Channel "block"
Filter 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'.
Messages
  • RequestMsg
  • BlockMsg
  • HeaderMsg

Mempool channel

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.

Channel "mempool"
Filter Bloom filter (n:10k, p:0.02 -> k:6, m:10KB)
Each peer's filter has a random nonce that scrambles the message hashes
The filter & nonce refreshes every new block
Messages
  • MempoolTxMsg

Consensus channel

The consensus channel broadcasts all information used in the rounds of the Tendermint consensus mechanism.

Channel "consensus"
Filter Bitarray filter
Each validator has a predetermined index in the bitarray
Refreshes every new consensus round
Messages
  • ProposalMsg
  • VoteMsg
  • NewBlockMsg

Resources