Conversation
|
@sdaftuar @sipa repeating my comment from bitcoin#30443 (with updated code). I made a branch sv2-cluster that combines bitcoin#28676 with bitcoin#29432: The main commit is bitcoin@625e444. The The Template Provider then uses that to see if sending a new It still takes 20-30ms on mainnet to create a template, without or the cluster mempool changes. I guess You can see it in action using Once the node is at the tip you'll see frequent It doesn't have to be very precise. The user can configure |
57e8908 to
82b40a8
Compare
5fa12a3 to
c0408d6
Compare
c0408d6 to
9a723c7
Compare
|
Reopening this on the main repo at bitcoin#31003 |
This adds
waitFeesChanged()to theMininginterface.The Stratum v2 protocol allows pushing out templates as fees in the mempool increase. This interface lets us know when it's time to do so.
Without Cluster Mempool however the implementation is "fake", instead returning every time a transaction is added to the mempool. So for now I'm keeping this draft. It's here to provide a complete and stable Mining interface for bitcoin#30437 to build on.
Unlike the entire
Mininginterface so far, this is not a refactor. It adds new functionality.The current implementation is very similiar to how longpolling in
getblocktemplateworks, which checksgetTransactionsUpdatedevery 10 seconds.However once Cluster Mempool is added it will be cheap enough to frequently generate a block template, check if the fees have gone up enough and then return. That would cause a behaviour change if
getblocktemplatewere to usewaitFeesChanged(), which is why this PR does not touch the longpolling code.TODO: