hexresearch / hschain

Other
4 stars 0 forks source link

WIP: Update mempool performance #556

Open dmalkr opened 4 years ago

dmalkr commented 4 years ago

Preliminary questions

Network improvement

Definition. Let's map all transactions to small bitmap using some hash function (or even last TXID bits). We below call such bitmap as "mempool bitmap", or just "bitmap".

Filtering


See also: #430, #58

Shimuuar commented 4 years ago

In my understanding any blockchain where anyone could submit transaction will need some variant of mempool to keep and propagate transactions which are not included in the blocks. Naturally mempool cannot provide any guarantee and transactions are disseminated on best effort basis. Only protection against censorship is number of nodes and routes and network and that most nodes have no interest in censorship. More specifically:

Does almost all nodes must have current transaction set for work, or just majority of nodes (2/3+)?

I think in mempool there's almost no MUSTs in RFC meaning. Miners/validators can continue to work regardless of mempool content. They still want to include as many TXs as possible for economic reasons.

Figures of merit for mempool are a) how long it takes for TX to propagate to 95% (or some other value) of nodes in the network. b) how quickly node that just joined network could sync mempool

Which is most probably count of nodes in system? 10, 100, 1000, 1000000?

Nobody knows. Hopefully a lot bitcoin has about 10^4-10^5 full nodes. Estimates are wildly different. If system is adopted we should have at least thousands of nodes.

Does we need transaction exchange for PoS, PoW or for both?

For all of them

dmalkr commented 4 years ago

So there are following tasks: