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

v8 Upgrade Handler #683

Merged
merged 16 commits into from
Mar 25, 2023
Merged

v8 Upgrade Handler #683

merged 16 commits into from
Mar 25, 2023

Conversation

sampocs
Copy link
Collaborator

@sampocs sampocs commented Mar 23, 2023

Closes: #XXX

Context and purpose of the change

Upgrade handler for v8

Brief Changelog

  • Adds upgrade handler for v8
  • Adds evmos airdrop and resets existing airdrops

Author's Checklist

I have...

  • Run and PASSED locally all GAIA integration tests
  • If the change is contentful, I either:
    • Added a new unit test OR
    • Added test cases to existing unit tests
  • OR this change is a trivial rework / code cleanup without any test coverage

If skipped any of the tests above, explain.

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • reviewed state machine logic
  • reviewed API design and naming
  • manually tested (if applicable)
  • confirmed the author wrote unit tests for new logic
  • reviewed documentation exists and is accurate

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md?
  • This pull request updates existing proto field values (and require a backend and frontend migration)?
  • Does this pull request change existing proto field names (and require a frontend migration)?
    How is the feature or change documented?
    • not applicable
    • jira ticket XXX
    • specification (x/<module>/spec/)
    • README.md
    • not documented

@sampocs sampocs requested a review from a team March 23, 2023 20:29
Copy link
Collaborator Author

@sampocs sampocs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder we need to add distributor address for evmos

Copy link
Contributor

@shellvish shellvish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Only outstanding question, is there something we can do in the upgrade handler to print out logs when the Evmos airdrop is being added, and when the claims are being reset? Maybe something like "if index % 500 == 0, print index" ?


// Add the evmos airdrop
ctx.Logger().Info("Adding evmos airdrop...")
blockTime := uint64(ctx.BlockTime().Unix())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should pick a blocktime in the future I think

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call! should we shoot for next monday?


// Check that the params of the evmos airdrop were initialized
s.Require().Equal(v8.EvmosAirdropIdentifier, evmosAirdrop.AirdropIdentifier, "evmos airdrop identifier")
s.Require().Zero(evmosAirdrop.ClaimedSoFar.Int64(), "cevmos laimed so far")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, "evmos claimed so far"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@sampocs sampocs added A:automerge Automatically merge PR once checks pass and removed A:automerge Automatically merge PR once checks pass labels Mar 25, 2023
@sampocs sampocs merged commit 31c5dc4 into main Mar 25, 2023
sontrinh16 pushed a commit to notional-labs/stride that referenced this pull request Mar 27, 2023
Co-authored-by: vish-stride <vishal@stridelabs.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants