-
Notifications
You must be signed in to change notification settings - Fork 476
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 timeboosted information to broadcast feed #2695
Add timeboosted information to broadcast feed #2695
Conversation
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.
Overall it looks good, just a few comments.
…BlockMetaData when updating message's BatchGasCost
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.
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.
generally LGTM. small comments
BlockHash: &msgResult.BlockHash, | ||
// maybe if blockhash is differing we clear out previous timeboosted and not send timeboosted info to broadcasting? |
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.
Good idea. If blockHash doesn't agree clear BlockMetadata.
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.
Cool. I think the best place to implement this is in Bulk syncing of missing BlockMetadata PR, since it tracks missing blockMetadata and in there we can clear out blockMetadata and mark it as missing in DB so that it will be refetched later on
This PR adds a new field
blockMetadata
to theBroadcastFeedMessage
struct that represents whether a particular transaction in the block was time-boosted or not.The field
blockMetadata
is an array of bytes and it starts with a 0 (version) followed by ceil(N/8) number of bytes where N is the number of txs in the block. Basicallyn
th bit of thek
th byte of blockMetadata byte array represents the status of8*(k-1)+(n+1)
th transaction, if its 1 means the tx was timeboosted else it wasn't.Example: if blockMetadata array viewed as bits is
00000000 01100101
then 2nd, 3rd, 6th and 8th transactions in the block were timeboosted.Resolves NIT-2779