Skip to content
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

bug: fix invalid accumulation time genesis validation #1550

Merged
merged 4 commits into from Apr 13, 2023

Conversation

pirtleshell
Copy link
Member

@pirtleshell pirtleshell commented Apr 12, 2023

Description

Mainnet genesis exports fail validation checks due to incentive accumulation times being more than a year ago. This PR removes the faulty validation, replacing it instead with a check that ensures the value is set. This way, no matter how much time passes, an exported genesis will still have a valid accumulation time value while still preventing misconfiguration from rewarding from the beginning of the unix epoch.

before:

panic: found accumulation time '2021-06-10 16:43:11.679705 +0000 UTC' more than '8760h0m0s' behind genesis time '2023-04-12 16:55:11.803644562 +0000 UTC'

after:

File at export-4355333.json is a valid genesis file

Checklist

  • Changelog has been updated as necessary.

@pirtleshell pirtleshell changed the title bug: increase valid accumulation time to 5 years bug: fix invalid accumulation time genesis validation Apr 12, 2023
x/incentive/genesis.go Outdated Show resolved Hide resolved
@pirtleshell pirtleshell merged commit 79eaad6 into master Apr 13, 2023
8 checks passed
@pirtleshell pirtleshell deleted the rp-update-max-accumulation branch April 13, 2023 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants