ssvlabs / ssv-spec

GNU General Public License v3.0
25 stars 22 forks source link

Pass MessageID To Broadcast #381

Closed olegshmuelov closed 4 months ago

olegshmuelov commented 4 months ago

Overview

This PR is a follow up for https://github.com/bloxapp/ssv-spec/pull/372.

Changes

y0sher commented 4 months ago

I think Gal's point is valid though, if we can make it thinner and just pass validator pubkey then maybe it's better.

moshe-blox commented 4 months ago

@GalRogozinski @y0sher imo consensus should make the least amount of assumptions on how p2p works passing only 'recipient' means consensus assumes subnets are by cluster id or validator pk but what if p2p wants to determine subnet by role + recipient?

either way is fine for now, just noting the difference between the two

GalRogozinski commented 4 months ago

@moshe-blox recipient is a general term that can be passed with no assumption... It could be that the messageID won't have the necessary information for the topic

moshe-blox commented 4 months ago

@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 recipient instead and as long as it's not spec-tested then the implementation is free to pass whatever it wants there

GalRogozinski commented 4 months ago

@moshe-blox Let say we decide to calculate all topics only with cluster_id%128, and for each validator we find the cluster it belongs to (current proposal)

then in this case if you pass only validator pk MessageID won't have enough information

moshe-blox commented 4 months ago

@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