-
Notifications
You must be signed in to change notification settings - Fork 57
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
Exponential backoff in logic call skips, frequent Ethereum height updates #400
Conversation
EricBolten
commented
Apr 22, 2022
•
edited
Loading
edited
- Rather than skipping calls forever after one failure, implement an exponential backoff scheme to allow for retries against transient Ethereum error conditions. Much like the previous version, this is in-memory only and the backoff process will reset on process restart.
- Add the ability to permanently skip calls in addition to having the backoff option.
- Add code to parse Gravity-defined error types, and use them to handle permanent skip conditions (yes, this code is pretty ugly, but functional).
- Add code to the gravity module and the orchestrator to periodically submit observed Ethereum heights, so we don't have to wait for a bridge event to let the Cosmos chain know the current Ethereum height. It chooses a height by a consensus-weighted vote on acceptable heights (e.g. equal to or lower than the observed height of each validator).
- Add a query endpoint so you can use the CLI to look up what the last observed heights are.
LGTM |
_ => None | ||
} | ||
} | ||
_ => None |
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 can see what you meant about matching
Codecov Report
@@ Coverage Diff @@
## main #400 +/- ##
==========================================
+ Coverage 28.26% 28.68% +0.42%
==========================================
Files 47 47
Lines 6401 6550 +149
==========================================
+ Hits 1809 1879 +70
- Misses 4447 4524 +77
- Partials 145 147 +2
|
@@ -161,7 +161,8 @@ func eventVoteRecordTally(ctx sdk.Context, k keeper.Keeper) { | |||
// 2. The proposed consensus heights from this process are greater than the values stored from the last time | |||
// we observed an Ethereum event from the bridge | |||
func updateObservedEthereumHeight(ctx sdk.Context, k keeper.Keeper) { | |||
if ctx.BlockHeight()%10 != 0 { | |||
// wait some minutes before checking the height votes | |||
if ctx.BlockHeight()%50 != 0 { |
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.
should this be a param?