-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Networking: mempool anti-entropy protocol #2193
Comments
This is high-priority, but #1805 is higher priority. |
Notes from the architecture meeting:
|
Action items:
|
Is anything in place to ensure a newly-synchronized node gets a correct, up-to-date view of the mempool -- comparable to a node that has already been running for a while? When syncing a node I see logs that appear to show mempool txs being provided to the node, then quickly rejected or disposed of because of the incompatible/old (still syncing) chaintip. Then, once it's caught up to its neighbors, it's missing most or all the mempool txs. |
There isn't an API for this, but it can (and should) be added. Basically, what you could do is make it so that once the node reaches the chain tip, it goes and gets the sequences of transactions for origin addresses that have recently sent transactions, since these are the ones that are about to be mined. To do this, the node would do the following:
Each of these would be an API endpoint. To keep things simple, you could just have the p2p thread pull out rows from
|
I see these blocks with few transactions in them again. I know this can be caused by Bitcoin forking and STX miners being on the "wrong" chain. And onstacks.com/mining seems to have evidence for that (blocks with no or very few miners): I am wondering though if it can also have something to do with the sheer amount of transactions in the mempool there are over 10,000 now. This is a copy from stxstats.co: Perhaps it is a coincidence but I see blocks with few transactions often when the mempool has more than an average amount of transactions. Is it possible miners have a hard time finding transactions that can be mined (I suspect there will also be transactions that can not be mined because of leather-io/extension#2129 and leather-io/extension#1991 . Would the mempool anti-entropy protocol be a way to battle this (suspected) problem? |
A bit more data: If the miners have more transactions to pick from I would expect more transactions to be processed if there are more transactions in the mempool to pick from (more opportunity for optimal filling of blocks?) but it is not the case. Leading me to believe something may be up with the miner logic: further improvement is possible. |
stacksonchain.btc says stxstats.co may be overestimating the number of transactions. And that does show a less profound difference between the 14th and the 15th respectively 12.8k transactions and 12.3k transactions. |
Addressed with #2884 |
Right now, Stacks nodes do not synchronize their mempools with one another. They should try to do so, in order to ensure that a transaction sent to one node will eventually reach all potential miners.
There's a lot of different ways to do this, and will need to be researched a bit before being implemented. Will follow up on this issue with proposals.
The text was updated successfully, but these errors were encountered: