-
-
Notifications
You must be signed in to change notification settings - Fork 478
feat: add PTC data availability and quorum tracking #9284
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
Changes from all commits
6ea8d3c
84c5950
fbf3bda
28d71d8
0e1d19c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import {BitArray} from "@chainsafe/ssz"; | ||
| import {DataAvailabilityStatus} from "@lodestar/state-transition"; | ||
| import {Epoch, RootHex, Slot, UintNum64} from "@lodestar/types"; | ||
|
|
||
|
|
@@ -155,3 +156,19 @@ export type ProtoNode = ProtoBlock & { | |
| bestChild?: number; | ||
| bestDescendant?: number; | ||
| }; | ||
|
|
||
| /** | ||
| * type to track PTC votes | ||
| * | ||
| * true means quorum of yea, | ||
| * false means quorum of nay, | ||
| * null means not enough votes | ||
| */ | ||
| export type PTCQuorum = boolean | null; | ||
| export type PTCVotes = { | ||
| votes: BitArray; | ||
| payloadTimelyYea: number; | ||
|
Member
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. Not a fan of the yea/nay notation. Maybe
Member
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. Also looks like this
Member
Author
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. yes this is a tradeoff to minimize memory usage here. if we need attribution we can revisit, but i don't think it matters considering there's no carrot or stick incentives here. |
||
| payloadTimelyNay: number; | ||
| dataAvailableYea: number; | ||
| dataAvailableNay: number; | ||
| }; | ||
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.
do we really need two separate events, is there ever a reason (at least right now) to consume these separately?