We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Change the default upgrade timeout from absolute to relative. see this comment
Having looked briefly into this, it might be able to look like this
// getUpgradeTimeout returns the absolute timeout for the given upgrade. func (k Keeper) getUpgradeTimeout(ctx sdk.Context) types.Timeout { relativeTimeout := k.GetParams(ctx).UpgradeTimeout absoluteTimeoutHeight := clienttypes.NewHeight(clienttypes.ParseChainID(ctx.ChainID()), uint64(ctx.BlockHeight())+relativeTimeout.Height.RevisionHeight) absoluteTimeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + relativeTimeout.Timestamp return types.NewTimeout(absoluteTimeoutHeight, absoluteTimeoutTimestamp) }
However tests are failing with timeout issues in the HasPassed method. This needs to be figured out.
HasPassed
selfTime, timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()), t.Timestamp if selfTime >= timeoutTimestamp && timeoutTimestamp > 0 { return true, errorsmod.Wrapf(ErrInvalidUpgrade, "block timestamp >= upgrade timeout timestamp (%s >= %s)", ctx.BlockTime(), time.Unix(0, int64(timeoutTimestamp))) }
The text was updated successfully, but these errors were encountered:
getUpgradeTimeout
We are now no longer using timeout height for upgrades. We should make the timeout timestamp relative.
Sorry, something went wrong.
chatton
No branches or pull requests
Summary
Change the default upgrade timeout from absolute to relative. see this comment
Having looked briefly into this, it might be able to look like this
However tests are failing with timeout issues in the
HasPassed
method. This needs to be figured out.For Admin Use
The text was updated successfully, but these errors were encountered: