forked from stratum-mining/stratum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tproxy test working with sv1-mining-device
- TRASLATION PROXY MG TEST A new test for the message generator. This test uses the sv1-mining-device in example. It was necessary as it is very ugly to include a cpuminer binary within the sri. This sv1-mining-device now works for the purposes of this test (for example, the miner target is hardcoded and it is below the target sent to the TProxy within the OpenExtendedMiningchannelSuccess message). The test is similar to a pool's mock, that simulates the communication between a TProxy and the upstream. The miner can be replaced with the preferred sv1 miner. You can do this by launching it as execution command in the test, or running a test without miner and launching separately a miner - SV1 MINING DEVICE (credits fi3) The sv1-mining-device is now working -- changes in /examples/sv1-mining-device/src/client.rs before the client submitted to the upstream, the version bits are changed. Now they are not, for simplicity before a job was obtained by notify using the implementation of From trait. This has a flaw, as the notify message does not include the extranonce, while the job contains the merkle root, in which is included the coinbase tx and, in turn, the extranonce. So it is impossible to obtain a job from a Notify message. Now the job is contructed properly using also the extranonce using Job::from_notify -- changes in /examples/sv1-mining-device/src/mod.rs The implementation of From trait for turning a Notify into a Job is now a method for Job and the merkle root is no longer hardcoded, but it is calculated using the coinbase_tx suffix, prefix, extranonce and path through merkle_root_from_path function -- changes in /examples/sv1-mining-device/src/miner.rs also the hash of the block is printed -- changes in /roles/translator/src/downstream_sv1/downstream.rs before the version_rolling_mask was obtained from new_version_rolling_mask, that was kind of hardcoded. Now it is set by the Configure message sent by the downstream. The same is for version_rolling_min_bit. -- changes in /roles/translator/src/downstream_sv1/mod.rs the above functions new_version_rolling_mask and new_version_rolling_min_bit are now not used elsewhere and can be removed. - OTHER CHANGES -- changes to protocols/v2/roles-logic-sv2/src/selectors.rs, to make clippy happy
- Loading branch information
Showing
9 changed files
with
331 additions
and
206 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
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