-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improve Issues Around Waiting for Safe Txs #719
Conversation
@@ -167,7 +168,7 @@ func (cc *challengeConfirmer) beginConfirmationJob( | |||
} | |||
|
|||
onchainInheritedTimer, err := retry.UntilSucceeds(ctx, func() (protocol.InheritedTimer, error) { | |||
timer, innerErr := royalRootEdge.SafeHeadInheritedTimer(ctx) | |||
timer, innerErr := royalRootEdge.LatestInheritedTimer(ctx) |
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.
The internal call to the solidity will use the configured block number, so it will still use safe
underneath the hood if the user desires
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.
I feel like this would be a good candidate for some in-code documentation (a.k.a. a comment.)
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.
LGTM
@@ -167,7 +168,7 @@ func (cc *challengeConfirmer) beginConfirmationJob( | |||
} | |||
|
|||
onchainInheritedTimer, err := retry.UntilSucceeds(ctx, func() (protocol.InheritedTimer, error) { | |||
timer, innerErr := royalRootEdge.SafeHeadInheritedTimer(ctx) | |||
timer, innerErr := royalRootEdge.LatestInheritedTimer(ctx) |
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.
I feel like this would be a good candidate for some in-code documentation (a.k.a. a comment.)
This PR fixes a bug in the functions
waitForTxToBeSafe
inside the BoLD repo. These functions used to check that a tx receipt has passed a configured,safe
block number. However, in a bad merge, it was edited to just compare againstlatest
, which was incorrect. This led to a variety of UX issues in the BoLD v2 testnet and more egregious errors around attempting to send a ton of timer update txs at the end of a challenge.This PR also fixes the DB methods to use
latest
block number, as it is important our DB captures all data that is posted, even if it is reorged later. The DB does not need to be reorg safe as it is purely for informational purposes and data analysis. We also a removed a method to fetch the latest confirmed assertion via the rest API, as this can easily be retrieved via other means. The reason it was removed is because it was using several methods that were hard to configure the block number for, and it is just unnecessary in general.