-
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
Qbft new messages #111
base: unstable
Are you sure you want to change the base?
Qbft new messages #111
Conversation
edit: sorry, toned down this comment a bit. I am not happy with the approach to decide over
|
Hey @dknopik those are valid points. Ill walk through my thought process and we can go from there
Hopefully this makes sense, would like to hear your thoughts. |
Disclaimer: I haven't gone through this PR, but have some familiarity with the QBFT code. I agree that the QBFT process should be data agnostic, which is why I think its a good candidate for a generic. The generic D, allows us to come to consensus on anything. In the case that we get something from the network that is SSZ serialized, i.e, raw bytes and we want to come to consensus on that without any kind of checks or validation, we could run a QBFT Consensus with D: being I'm not sure about the difficulty of keeping the D generic, which is maybe why @Zacholme7 wants to move from it. The way I would imagine a message going in and out of anchor to look like is something like: In terms of the types and where they live, I think it depends on the dependency graph of our crates. For example in lighthouse, we have a Perhaps we can't do this for some reason, but this model has served us well in Lighthouse, so thought I'd mention it. |
Moving to generic D just within qbt instead of To make this fully generic and importable, we would have to work on defining some internal, ssv independent spec/type system that can map onto the SSV types. This is possible, but it does require work to get it to a place in which is is both fully generic and a perfect interop with go-ssv. Talked about this a little bit with kingy too but even if we made this fully generic and importable it does not have much use without surrounding infrastructure in place like networking and at that point someone could just write their own.
D cant be I think the best approach would be to keep some consensus specific generic |
Oh yeah. I think you're talking about maintaining the QBFT crate for others in the space. This was the original intent, but when we were building it, we decided to take that as far as reasonably possible. As soon as it got too hard ditch it. Assuming its just for Anchor and SSV, I think D is useful.
There must be a reason why D requires the trait bounds (I think i put them in there, but forgot why :p). If you go straight to |
Sorry my responses are vague. I'm in meetings all day. I will go over this code when I get a chance hopefully give some more helpful/informed responses :). |
@Zacholme7 thanks for your detailed thought process in your response!
This sounds very good to me, and is similar to what I had in mind when I introduced the first version of the |
I like this implementation and agree we only take the make generic approach as far as practical. Defining a generic with the required traits is plenty imo. Gimmie the weekend to look at this but from first read I think we're good to go on the approach. Thanks for the good discourse fellas. |
Issue Addressed
This PR attempts to align the QBFT logic closer to the specs.
Proposed Changes
There are a few changes
MessageContainer
for storing all of the messages processed and received.ssv_types
so that they can be used in both qbft and the network. Going to be a separate PR to remove these types from the networking crate and redirect logic tossv_types
WrappedQbftMessage
. This is analogous toProcessingMessage
in the spec. The manger will send WrappedQbftMessages to the qbft instance and the instance will send outUnsignedSSVMessage
.EthSpec
from the managerEthSpec
dependent types. Ex:DataSsz
Data + Encode
. This may have to be futher restricted to includeDecode
. This ensures that we are able to work in byte representation, like the spec.