-
Notifications
You must be signed in to change notification settings - Fork 126
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
Mempool to jd server applications vendored rebased #632
Merged
Fi3
merged 15 commits into
stratum-mining:dev
from
lorbax:mempool-to-jd-server-applications-vendored-rebased
Oct 12, 2023
Merged
Mempool to jd server applications vendored rebased #632
Fi3
merged 15 commits into
stratum-mining:dev
from
lorbax:mempool-to-jd-server-applications-vendored-rebased
Oct 12, 2023
Commits on Oct 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1c4a13b - Browse repository at this point
Copy the full SHA 1c4a13bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 76185e2 - Browse repository at this point
Copy the full SHA 76185e2View commit details -
started logic rust_bitcoincore_rpc client
vendored jsonrpc is working and imported adding boilerplate for mempool logic
Configuration menu - View commit details
-
Copy full SHA for 6e7449d - Browse repository at this point
Copy the full SHA 6e7449dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce73e17 - Browse repository at this point
Copy the full SHA ce73e17View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d4b61f - Browse repository at this point
Copy the full SHA 1d4b61fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 455d675 - Browse repository at this point
Copy the full SHA 455d675View commit details -
add a method that retrieves the mempool, in which the transactions are ordered by size.
Configuration menu - View commit details
-
Copy full SHA for ba7c0f9 - Browse repository at this point
Copy the full SHA ba7c0f9View commit details -
All the logic of the rpc_client is moved in a separate file rpc_client.rs Now the struct JDsMempool has also a client, which is inizialized in the new() method. The get_mempool() method becomes update_mempool This is far better as for updateing a mempool we do not reinizialise an rpc_clint but we use every time the same.
Configuration menu - View commit details
-
Copy full SHA for 28fb134 - Browse repository at this point
Copy the full SHA 28fb134View commit details -
Configuration menu - View commit details
-
Copy full SHA for 363f748 - Browse repository at this point
Copy the full SHA 363f748View commit details -
function verify_short__hash_id
the function in /roles/jd-server/src/lib/mempool/mod.rs named verify_short_id must be uncommented and modified to compile
Configuration menu - View commit details
-
Copy full SHA for bd5d33a - Browse repository at this point
Copy the full SHA bd5d33aView commit details -
JDsMempool::update_mempool and mempool in main
the method update_memppol of JDsMempool now is non-blocking. What we pay is a bit of performance, as we have to generate a new rpc client every time we update the mempool. To fix this requires a major refactoring of the rpc client, that I cannot do for lack of time the mempool is initialized in main and gets updated every second
Configuration menu - View commit details
-
Copy full SHA for 28478b5 - Browse repository at this point
Copy the full SHA 28478b5View commit details -
no errors in clippy, still few wornings to be solved. All except one are relative to unsed variables. This variables are the inputs of the function verify_short_id that still has to be implemented and will use them. The code can, and should, be tested.
Configuration menu - View commit details
-
Copy full SHA for 167a646 - Browse repository at this point
Copy the full SHA 167a646View commit details -
now this relies on a function that calculates the ShortHashId of a transaction, gicven a nonce and the txid. This is good as we can use this function elsewhere.
Configuration menu - View commit details
-
Copy full SHA for 66a69a0 - Browse repository at this point
Copy the full SHA 66a69a0View commit details -
improvements for the jd server
refactored the function that calculates the short_hash_id of a tyransaction given the txid and a nonce. Refacored the method that takes a mempool and a short tx id and verifies that there is that tx in the mempool. Now gives Some(tx, txid) in positive case, none otherwise. With all this machinery now we can identify the transactions sent in the declared mining job. The identified transaction are stored in a field of JobDeclaratorDownstream. It is also added a field that indicates how many transactions are unidentified. In the case this field is non zero, the JDS must send a ProvideMissingTransactions to the JDC.
Configuration menu - View commit details
-
Copy full SHA for 3047287 - Browse repository at this point
Copy the full SHA 3047287View commit details -
fix clippy wornings and rust tests that do not pass in json vendored
Configuration menu - View commit details
-
Copy full SHA for f3fe4bb - Browse repository at this point
Copy the full SHA f3fe4bbView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.