-
Notifications
You must be signed in to change notification settings - Fork 78
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
Introduce protobuf types under new pkg directory #56
Changes from 1 commit
2290a08
1bcb6f7
abea7e2
30b7ae1
62b8038
1e71aec
57df3f2
ca1913c
c7228d1
bd88baf
8cc74d6
19d4a44
c8b128d
94adfc7
e81b9dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
An EncryptedEnvelope is a special envelope needed for certain phases of DKG. Update document for the channel field in GossipMessage; note that we use keccak as the has function, and that pub keys are specifically StakingPubKeys.
- v2.1.0
- v2.0.1
- v2.0.0
- v2.0.0-m7
- v2.0.0-m6
- v2.0.0-m5
- v2.0.0-m4
- v2.0.0-m3
- v2.0.0-m3-rc
- v2.0.0-m2
- v2.0.0-m1
- v1.21.0
- v1.3.1
- v1.3.0
- v1.3.0-rc.4
- v1.3.0-rc.3
- v1.3.0-rc.2
- v1.3.0-rc.1
- v1.3.0-rc
- v1.2.4-rc
- v.1.2.3-rc
- v1.2.2
- v1.2.1
- v1.2.0
- v1.2.0-rc.1
- v1.2.0-rc
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1-rc
- v1.1.0-rc
- v1.0.1
- v0.14.1-rc
- v0.14.0-rc
- v0.13.0-rc
- v0.12.0-rc
- v0.11.0-rc
- v0.10.0
- v0.9.1
- v0.9.0
- v0.8.0
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.0
- v0.3.0
- v0.2.0
- token-dashboard/v1.20.0
- token-dashboard/v1.19.1
- token-dashboard/v1.19.0
- token-dashboard/v1.18.0
- token-dashboard/v1.17.1
- token-dashboard/v1.17.0
- token-dashboard/v1.16.2
- token-dashboard/v1.16.1
- token-dashboard/v1.16.0
- token-dashboard/v1.15.3
- token-dashboard/v1.15.2
- token-dashboard/v1.15.1
- token-dashboard/v1.15.0
- token-dashboard/v1.14.0
- token-dashboard/v1.13.0
- token-dashboard/v1.12.1
- token-dashboard/v1.12.0
- token-dashboard/v1.11.0
- token-dashboard/v1.10.2
- token-dashboard/v1.10.1
- token-dashboard/v1.10.0
- token-dashboard/v1.9.0
- token-dashboard/v1.8.1
- token-dashboard/v1.8.0
- token-dashboard/v1.7.2
- token-dashboard/v1.7.1
- token-dashboard/v1.7.0
- token-dashboard/v1.6.0
- token-dashboard/v1.5.0
- token-dashboard/v1.4.1
- token-dashboard/v1.4.0
- token-dashboard/v1.3.3
- token-dashboard/v1.3.2
- token-dashboard/v1.3.1
- token-dashboard/v1.3.0
- token-dashboard/v1.3.0-rc.1
- solidity/v2.0.1
- solidity/v2.0.0
- solidity/v1.7.0
- solidity/v1.6.0
- solidity/v1.5.0
- solidity/v1.4.1
- solidity/v1.4.0
- solidity/v1.3.0
- solidity/v1.3.0-rc.1
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ package gossip; | |
|
||
// Envelope contains a marshalled Message as the payload | ||
// and a signature over the payload as signature. | ||
// It also contains the Identities of the sender and receiver. | ||
// Optionally may contain an encrypted Envelope (in which case the payload will be empty). | ||
message Envelope { | ||
// A Marshaled GossipMessage | ||
bytes payload = 1; | ||
|
@@ -16,21 +18,32 @@ message Envelope { | |
// Signature of the message | ||
bytes signature = 4; | ||
|
||
EncryptedEnvelope encrypted_envelope = 5; | ||
|
||
// TODO: this envelope needs an enum detailing which type of GossipMesssage it is. | ||
} | ||
|
||
// EncryptedEnvelope is a marshalled encrypted message. | ||
message EncryptedEnvelope { | ||
bytes payload = 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to introduce message that will be stuffed into payload. |
||
bytes signature = 4; | ||
} | ||
|
||
message Identity { | ||
// TODO: consolidate and remove redundant | ||
bytes public_key = 1; | ||
bytes bls_id = 2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we're still aiming at deriving the public key from the BLS id or vice versa, so we may just want to include one of these? @mhluongo did you have any specific thoughts on relationship between BLS id, public key for participation in libp2p, and staking key? I guess one question is whether the BLS id will be stable across groups... It could be, but it doesn't have to be, and if we're looking at anonymity and such for the future, it might be ideal to design with an independent BLS id. On the flip side… BLS ids are pretty big, so passing them around with all messages could be inefficient. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Punted the BLS ID discussion to #61. |
||
bytes peer_id = 3; | ||
} | ||
|
||
message GossipMessage { | ||
// Channel is isomorphic to the group name as well as the pubsub channel | ||
// Channel names are HASH(PubKey1 || ... || PubKeyN) of all valid group members. | ||
// Channel names are Keccak(StakingPubKey1 || ... || StakingPubKeyN) of | ||
// all valid group members. | ||
bytes channel = 1; | ||
|
||
// Proof that the peer that sent this message knows the channel's name. | ||
bytes channel_MAC = 2; | ||
|
||
// TODO: define various messages this GossipMessage can be. Use oneof. | ||
} | ||
} |
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.
If the encrypted envelope is at the end, should the payload also be at the end? Seems like it will make it easier to see that these are related.
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.
Reiterating this because I think it got collapsed incorrectly: