You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The declared transaction in declared mining job are stored as a whole in the JDS mempool. The transactions in in declared jobs are recognized because they have this form (like txid: Txid <-- Some(Transaction) in the hashmap). In JDsMemppol::update_mempool() we create a new hashmap mempool_ordered. Inside the task spawned, the node's mempool is stored in in the variable mempool: Vec<Txid>. For every entry txid of this vector, if there was a transaction in the mutex mempool of the form txid: Txid <-- Some(Transaction), then the whole transaction is stored in mempool_ordered. The other transactions in mempool are stored in mempool_ordered as txid: Txid <-- None. Then JDS mempool is updated with mempool_ordered #833
As a consequence of that, if the downstream declares a transaction which is unknown to the node, then it gets lost during the update of the JDS mempool. If the mempool is updated frequently this may prevent to the block propagation for the JDS, which is not good.
If this is fixed, we must also remove the transactions of old declared jobs, otherwise the there is (very remote) risk of overflow.
The declared transaction in declared mining job are stored as a whole in the JDS mempool. The transactions in in declared jobs are recognized because they have this form (like
txid: Txid <-- Some(Transaction)
in the hashmap). InJDsMemppol::update_mempool()
we create a new hashmapmempool_ordered
. Inside the task spawned, the node's mempool is stored in in the variablemempool: Vec<Txid>
. For every entrytxid
of this vector, if there was a transaction in the mutex mempool of the formtxid: Txid <-- Some(Transaction)
, then the whole transaction is stored inmempool_ordered
. The other transactions inmempool
are stored inmempool_ordered
astxid: Txid <-- None
. Then JDS mempool is updated withmempool_ordered
#833
As a consequence of that, if the downstream declares a transaction which is unknown to the node, then it gets lost during the update of the JDS mempool. If the mempool is updated frequently this may prevent to the block propagation for the JDS, which is not good.
If this is fixed, we must also remove the transactions of old declared jobs, otherwise the there is (very remote) risk of overflow.
Fix this issue after merging of PR833.
The text was updated successfully, but these errors were encountered: