hexresearch / hexresearch/hschain

WIP: Update mempool performance

Open
#556 2 comments 0 reactions 1 assignee Claimed by @dmalkr View on GitHub
consensus engine enhancement
Dominant language
C
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

# Preliminary questions

* [ ] Does almost all nodes must have current transaction set for work, or just majority of nodes (2/3+)?
* [ ] Which is most probably count of nodes in system? 10, 100, 1000, 1000000?
* [ ] Does we need transaction exchange for PoS, PoW or for both?

# 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".

* [ ] Pull-based quering about transactions. One node can generate random bitmaps (which in OR-sum form bitmap all filled with "1") and dispatch connected nodes. Other nodes send only matched transactions. This method can be used to initialize mempool when new node starts (or when node was offline a long period of time).
* [ ] Bitmap size. Average mempool size in BitCoin according to https://jochen-hoenicke.de/queue/#0,1y is 10000 transactions. We can use this value to estimate our future size. So 2^15 - 2^16 bits (32768-65536 bits) length is enough for the bitmap (which represents mempool) to be sparse. And also it is relatively small: 4-8Kb.
* [ ] Push based spead of a single transaction. When transaction appear, it can be broadcasted across the network by push. What to do with duplication of this transaction on some nodes? Is it important?
* [ ] Or node can collect transactions a short period of time, and other nodes can query it periodically (using pull-based & bitmap-based method).

# Filtering

* [ ] It is need to benchmark first and select suitable data structure...

-----

See also: #430, #58

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.