-
Notifications
You must be signed in to change notification settings - Fork 136
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
Custom transactions from JDC removed from mempool during update #840
Comments
NonsoAmadi10
added a commit
to NonsoAmadi10/stratum
that referenced
this issue
Jul 17, 2024
Modify the update_mempool function to update the jds mempool to save transactions declared by the downstream and get rid of others. Create a clear_declared_mining_job to remove old fat transactions before a new mining job is declared. Manage every unwrap by returning the proper error class and error message
NonsoAmadi10
added a commit
to NonsoAmadi10/stratum
that referenced
this issue
Jul 17, 2024
Modify the update_mempool function to update the jds mempool to save transactions declared by the downstream and get rid of others. Create a clear_declared_mining_job to remove old fat transactions before a new mining job is declared. Manage every unwrap by returning the proper error class and error message
jbesraa
pushed a commit
to jbesraa/stratum
that referenced
this issue
Jul 19, 2024
Modify the update_mempool function to update the jds mempool to save transactions declared by the downstream and get rid of others. Create a clear_declared_mining_job to remove old fat transactions before a new mining job is declared. Manage every unwrap by returning the proper error class and error message
NonsoAmadi10
added a commit
to NonsoAmadi10/stratum
that referenced
this issue
Aug 9, 2024
Modify the update_mempool function to update the jds mempool to save transactions declared by the downstream and get rid of others. Create a clear_declared_mining_job to remove old fat transactions before a new mining job is declared. Manage every unwrap by returning the proper error class and error message
4 tasks
github-project-automation
bot
moved this from Ready For Review 🔍
to Done ✅
in SV2 Roadmap 🛣️
Nov 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: