-
Notifications
You must be signed in to change notification settings - Fork 24
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
Pass MessageID To Broadcast #381
Conversation
@@ -20,7 +20,7 @@ func NewTestingNetwork(operatorID types.OperatorID, sk *rsa.PrivateKey) *Testing | |||
} | |||
} | |||
|
|||
func (net *TestingNetwork) Broadcast(message *types.SignedSSVMessage) error { | |||
func (net *TestingNetwork) Broadcast(msgID types.MessageID, message *types.SignedSSVMessage) error { |
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 am thinking about this further now...
you only need the ValidatorPublicKey
?
So maybe it is best to simply pass recipientID []byte
parameter for topic.
This is because in the very near future (cluster-based consensus), we will be using ClusterID
exclusively for topic calculation (at least this is the current plan), while it may not necessarily be in the MessageID
(duty dependent). So my offer will save a future change...
Your choice whether you want to change it now of course
I think Gal's point is valid though, if we can make it thinner and just pass validator pubkey then maybe it's better. |
@GalRogozinski @y0sher either way is fine for now, just noting the difference between the two |
@moshe-blox |
@GalRogozinski how so? i thought that MessageID can contain in it either the cluster id or the validator pk (if its a block proposal for example) sure, it makes sense if it's a []byte named |
@moshe-blox then in this case if you pass only validator pk |
@GalRogozinski it's an implementation problem no? we're going to maintain mappings between cluster ids and validators so it's shouldn't be an issue |
Overview
This PR is a follow up for #372.
Changes