-
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lorbax
force-pushed
the
mempool-to-jd-server-applications-vendored-rebased
branch
5 times, most recently
from
October 11, 2023 15:56
08a7884
to
4758e68
Compare
vendored jsonrpc is working and imported adding boilerplate for mempool logic
add a method that retrieves the mempool, in which the transactions are ordered by size.
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.
the function in /roles/jd-server/src/lib/mempool/mod.rs named verify_short_id must be uncommented and modified to compile
lorbax
force-pushed
the
mempool-to-jd-server-applications-vendored-rebased
branch
3 times, most recently
from
October 12, 2023 16:22
a16708e
to
417e979
Compare
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
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.
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.
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.
fix clippy wornings and rust tests that do not pass in json vendored
lorbax
force-pushed
the
mempool-to-jd-server-applications-vendored-rebased
branch
from
October 12, 2023 16:29
417e979
to
f3fe4bb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.