-
Notifications
You must be signed in to change notification settings - Fork 127
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
Add integration test for auth failure between mining_device
and a pool
#1164
Add integration test for auth failure between mining_device
and a pool
#1164
Conversation
Bencher Report
Click to view all benchmark results
|
Bencher Report
Click to view all benchmark results
|
Bencher Report
🚨 14 ALERTS: Threshold Boundary Limits exceeded!
Click to view all benchmark results
|
Handle errors in `start` function for better user experience and to be able to catch errors in test environment, for example without introducing error handling, we do not get a proper response if the provided `coinbase_output` in the config is valid.
Adds a new property `state` to the pool struct. The main goal is providing abilities to mutate the state internally, i.e. only by the role itself, and abilities to view the state by the role runner.
A utility struct that wraps the original `PoolSv2` and provide some utility to start the pool role in testing env.
Isolating the library code into a `lib/mod.rs` and consume it in `main.rs`.
.. just return the error to the user to give an indication that an error occurd.
5557d25
to
2700a7d
Compare
This commit adds a new property to the `Running` state called `DroppedDownstreams` that saves a vector of `Vec<u32>`, u32 referring to the `downstream_id`.
failure with a pool. This test run a `TemplateProvider`, `PoolSv2` and a `mining_device` with the auth-failure flag enable which will result in the `PoolSv2` to reject the `mining_device`.
2700a7d
to
4ae9608
Compare
Bencher Report
Click to view all benchmark results
|
@@ -61,6 +61,7 @@ pub enum Error { | |||
HashrateError(InputError), | |||
LogicErrorMessage(std::boxed::Box<AllMessages<'static>>), | |||
JDSMissingTransactions, | |||
MiningChannelError(u32), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to add this error type? Also, let's not prepend the variant with the word Error
as it is redundant.
MiningChannelError(u32), | |
MiningChannel(u32), |
@@ -153,6 +154,7 @@ impl Display for Error { | |||
HashrateError(e) => write!(f, "Impossible to get Hashrate: {:?}", e), | |||
LogicErrorMessage(e) => write!(f, "Message is well formatted but can not be handled: {:?}", e), | |||
JDSMissingTransactions => write!(f, "JD server cannot propagate the block: missing transactions"), | |||
MiningChannelError(e) => write!(f, "Mining channel error: {:?}", e), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we come up with a more descriptive error message here?
MiningChannelError(e) => write!(f, "Mining channel error: {:?}", e), | |
MiningChannel(e) => write!(f, "Mining channel error: {:?}", e), |
will close this for now and wait for #1066 to get merged and then maybe re-open this.. |
Blocked by #1163 #1066 #1155 #1156
Resolves #1165
Note that majority of the commits here will be hopefully merged in the blocking PRs mentioned above. This PR should end up with the last three commits.
This should make the following test redundant https://github.com/stratum-mining/stratum/blob/main/test/message-generator/test/pool-sri-test-reject-auth/pool-sri-test-reject-auth.json