Replies: 6 comments 11 replies
|
one alternative I proposed:
|
|
proposal by @Fi3:
|
|
@Fi3 also mentioned that SRI might be already violating the since the refactors my detailed knowledge of the application layer is not so fresh anymore, so I'll defer to @GitGab19 + @Shourya742 to confirm whether this is currently true or not |
Btw, I think this statement is quite silly. Nobody can prevent me from writing so smart handling that it always makes a good decision based on the complicated error code. And if I do that, how is this a violation of the specification? Anyways, To be honest, I don't understand this 👇
IMO every submit is at any time either valid or not valid. Everything after SNPH, in example above, is clearly invalid and should be labeled as stale. If rejected, the reason is perhaps not as important. So I don't see any essential use case for automated actions. But on the other hand |
|
This discussion originate cause there are certain error that are very generic and it could be nice to take automatic action based on error code (that as per spec should be used only for logs). For example: /// Message used by upstream to reject [`SubmitSharesStandard`] or [`SubmitSharesExtended`].
///
/// In case the upstream is not able to immediately validate the submission, the error is sent as
/// soon as the result is known. This delayed validation can occur when a miner gets faster
/// updates about a new `prevhash` than the upstream does.
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SubmitSharesError<'decoder> {
/// Channel identification.
pub channel_id: u32,
/// Unique sequential identifier of the submit within the channel.
pub sequence_number: u32,
/// Rejection reason.
///
/// Possible error codes:
///
/// - invalid-channel-id
/// - stale-share
/// - difficulty-too-low
/// - invalid-job-id
pub error_code: Str0255<'decoder>,
}A stale-share is something that is supposed to happen (I would be concerned if I do not see any), so I do not want to close the connection if stale shares are below a certain threshold. Where all the other error codes should lead to immediately close the connection. I think that we can find other error that are too generic. I'm not trying to push for a spec change I just wanted to point it out. I'm more than ok in leaving the spec like that, since is not a big issue, the downstream in the specific above case can just trust upstream to close the connection when it make sense, and treat every share error that do not lead to connection being closed by upstream as a stale-share. |
|
cross referencing: stratum-mining/sv2-apps#364 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
recently @Fi3 reached out to me pointing out that this section of the spec is too limiting:
We should use this space to coordinate discussions on potential approaches to make this a bit more flexible.
All reactions