-
Notifications
You must be signed in to change notification settings - Fork 639
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
Add height voting for chits #2102
Changes from 20 commits
9d70593
53fffe1
d9227fc
400255c
cc6905a
80fef0a
95cf59f
c5cdc20
a9fc1ff
54e0e11
178882b
f12b555
fbb3817
36b3879
155eec9
5f1005e
157a4e8
061d231
755e374
bdf293c
83fd55b
a97e487
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -303,6 +303,7 @@ message PushQuery { | |
uint64 deadline = 3; | ||
bytes container = 4; | ||
EngineType engine_type = 5; | ||
uint64 requested_height = 6; | ||
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. Should we populate requestedHeight last in the messages above then? 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. The order doesn't actually matter... I felt like the code flowed more naturally with the order I used... The only reason the proto uses this order is because it is required for compatibility |
||
} | ||
|
||
// Message that contains a preferred container ID to query other peers | ||
|
@@ -316,6 +317,7 @@ message PullQuery { | |
uint64 deadline = 3; | ||
bytes container_id = 4; | ||
EngineType engine_type = 5; | ||
uint64 requested_height = 6; | ||
} | ||
|
||
// Message that contains the votes/preferences of the node. It is sent in | ||
|
@@ -326,14 +328,14 @@ message PullQuery { | |
// will respond with a "get" message to fetch the missing block from the remote | ||
// peer. | ||
message Chits { | ||
reserved 5; // Until Cortina upgrade is activated | ||
|
||
bytes chain_id = 1; | ||
uint32 request_id = 2; | ||
// Represents the current preferred block. | ||
bytes preferred_id = 3; | ||
// Represents the last accepted block. | ||
bytes accepted_id = 4; | ||
// Represents the current preferred block at the requested height. | ||
bytes preferred_id_at_height = 5; | ||
} | ||
|
||
message AppRequest { | ||
|
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.
This also allows us to apply votes on a failed chit, right? Or am I too optimistic?
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.
We use the
AcceptedID
for failed chits. I don't think it would be safe to re-use thePreferredIDAtHeight
in the same way unless we included an additional boolean (to say ifPreferredIDAtHeight
was accepted).