-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: accomodate BTC-timestamping #40
Changes from 4 commits
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
|
@@ -62,14 +62,6 @@ func (fp *FinalityProviderInstance) FastSync(startHeight, endHeight uint64) (*Fa | |
fp.metrics.IncrementFpTotalBlocksWithoutVotingPower(fp.GetBtcPkHex()) | ||
continue | ||
} | ||
// check whether the randomness has been committed | ||
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. question: we can stop checking the randomness has been committed, because we don't need to send randomness for past blocks? 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. This is because in ADR-024, a fp can only have voting power if it has BTC-timestamped pub rand for the height. At Line 57, we have already checked whether the fp has voting power. This indicates whether the fp has timestamped pub rand or not, so we don't need to check randomness here |
||
hasRand, err := fp.hasRandomness(b) | ||
if err != nil { | ||
return nil, err | ||
} | ||
if !hasRand { | ||
break | ||
} | ||
// all good, add the block for catching up | ||
catchUpBlocks = append(catchUpBlocks, b) | ||
} | ||
|
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.
Is this enough? I thought we need to commit pub rand that can last for 1-2 weeks
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.
You are right. We have calculated the number as 7k in https://github.com/babylonlabs-io/pm/blob/main/adr/adr-024-timestamping-public-randomness.md. We should use it as default and set it smaller value for testing