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

Reset bep3 swaps for zero height in migration #1135

Merged
merged 6 commits into from
Jan 15, 2022

Conversation

rhuairahrighairidh
Copy link
Member

@rhuairahrighairidh rhuairahrighairidh commented Jan 14, 2022

This PR copies over behaviour we've had in previous migrations.
Bep3 swaps use block height to track timeouts so they need updating as the block height is reset to zero in kava-9.

  • Completed Swaps
    • closed height is set to 1 so they are only stored in long term storage for 1 + default storage time (in block times)
  • Expired Swaps
    • expired height is reset to 1. Not strictly needed as keeper code operates off status
  • Open swaps
    • Incoming swaps are expired, causing bnb side to expire
    • Outoing swaps have their expiry extended by 48hrs after chain launch to leave time for claiming in case bnb side was claimed during launch downtime.

I also reinstated the app export test. I'd originally planned to reset swaps in the prepForZeroHeight function but stopped as it would've taken longer. Swaps shouldn't need reseting after kava-9 as future launches don't need the block height reset.

Copy link
Member

@karzak karzak left a comment

Choose a reason for hiding this comment

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

LGTM

@karzak karzak merged commit e9a28ce into master Jan 15, 2022
@karzak karzak deleted the ro-reset-bep3-swaps-in-migration branch January 15, 2022 03:17
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.

2 participants