-
Notifications
You must be signed in to change notification settings - Fork 12
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
create validation stub to facilitate parallel work on validation and message passing #137
Conversation
use tracing::debug; | ||
|
||
// TODO taken from go-SSV as rough guidance. feel free to adjust as needed. https://github.com/ssvlabs/ssv/blob/e12abf7dfbbd068b99612fa2ebbe7e3372e57280/message/validation/errors.go#L55 | ||
pub enum ValidationFailure { |
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.
I see some errors in here that require qbft specific data. How do we plan on getting access to that data? or should these errors be used within qbft?
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.
excellent question 😅
if we really end up needing some of the internal qbft state, then this approach is too naive, and we will need some callback system for parts of the validation. We'll see. This was just a quick copy&paste.
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.
There's a potential double decoding cause we need to try to decode to check UndecodableMessageData
. We are routing messages with the processor and receiving results through queues. It might be controversial, but we could have a queue for something like std::Resut<our::Result, ValidationFailure>. In this way, we could split the validation and do each part where it's more appropriate. Thoughts?
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.
@Zacholme7 the validation here
anchor/anchor/common/qbft/src/lib.rs
Line 436 in 1648e15
if valid_data.hash != wrapped_msg.qbft_message.root { |
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.
It seems there's a lot of overlap. What kind of validation are we supposed to do in the validator crate?
Think we should just get this in or keep it as a draft for now? |
marked it as draft as #147 includes it and we can therefore just merge that. As soon as that is done, we can close this one |
Superseded by #152. |
Two remaining tasks for the MVP are message passing and validation. This PR enables parallel work on this by adding a stub - and creating a todo location for validation and for message passing, allowing two team members to work simultaneously on one topic each.