Table of Contents
How Pay uses the Peer to Peer Network
In the Bitcoin Whitepaper the concept of simplified payment verification (SPV) was described (chapter 8). The basic protocol used on the Bitcoin Cash network gives us the ability to securely run a wallet.
The main Bitcoin Cash network is known as the peer-to-peer (P2P) network which is in large part responsible to give BCH its decentralized nature. The decentralization is important because it gives Flowee Pay the option of anonymity and privacy. Flowee Pay can connect to any node in the world run by anyone that wants to run that node. Without central servers surveillance systems lose their power over us.
The P2PNet component, part of the Flowee libs, gives us most of the features we need to have full confidence in our payment process.
- P2PNet uses the 'headers' message to build the longest chain. It also has the latest checkpoints to quickly reject alternative networks.
Block-Headers are validated for correctness and we calculate the most work-chain just like a full node does. - New blocks are seen via 'inv' and fetched via 'headers'.
- New transactions seen via 'inv' are fetched via the 'getdata' call.
- P2PNet uses bloom filters together with merkleblock requests and the mempool call to get a filtered view of the chain from peers.
Merkle blocks include a proof-of-inclusion of transactions, which we fully validate. - Created transactions are sent using the normal TX call.
Privacy Segments
In the quick overview above we talk about bloom filters. These filters are not as private as they were initially introduced. The problem is mostly because the amount of traffic to disappear in is too low still. The result is that transactions that actually match the filter likely belong to the wallet. Failing the intention of there being plausible deniability. Until such a time when we have so many transactions that ours can disappear in the noise, this is a problem that needs a second solution.
In P2PNet the concept of privacy segments is introduced. Each privacy segment is completely separated from any other and each has its own bloom filter. The P2PNet library ensures that we remember for each peer which segment we sent them last time connecting only the same one again.
This strategy allows us to behave like multiple individuals in the same application.
Further strategies towards cycling through privacy segments are planned to avoid those segments becoming too big and carrying around their entire history.
This is a strategic solution to the leaking of data onto the Internet, by allowing people to use a strategy they already know: multiple entities that can be separated in such a way that combining them becomes much harder.