Skip to content

Fix staking migration#1004

Merged
0x4007 merged 5 commits intoubiquity:developmentfrom
ryzhak:fix/1001
Sep 17, 2025
Merged

Fix staking migration#1004
0x4007 merged 5 commits intoubiquity:developmentfrom
ryzhak:fix/1001

Conversation

@ryzhak
Copy link
Contributor

@ryzhak ryzhak commented Sep 15, 2025

Resolves #1001

Depends on #1003

This PR fixes staking migration which was broken after changes in #999

How to QA production staking: https://gist.github.com/ryzhak/78ffabebeef6540b4e085c132df1d6a8

Note, here we set block.number + 10 because foundry works pretty weird (at least the latest v1.3.5.). It seems it caches block.number at the beginning of the script and later (if there was a new block mined) here doesn't fetch the latest block.number but uses the cached one. Hence the error Error: reverted with: Can't start in the past occurs. Setting it to block.number + 10 helps both for QA and production deploy in case a new block is mined somewhere in the middle of migration execution. Setting staking start time to block.number + 10 simply delays staking start time for ~2 mins.

@ryzhak ryzhak requested a review from rndquu as a code owner September 15, 2025 09:02
@ubiquity-os
Copy link
Contributor

ubiquity-os bot commented Sep 15, 2025

Caution

No labels are set.

@0x4007 0x4007 requested a review from whilefoo September 15, 2025 10:02
Copy link

@whilefoo whilefoo left a comment

Choose a reason for hiding this comment

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

shouldn't development script be also fixed?

@ryzhak
Copy link
Contributor Author

ryzhak commented Sep 17, 2025

shouldn't development script be also fixed?

Fixed in c09cf21

@0x4007 0x4007 merged commit f43ae3d into ubiquity:development Sep 17, 2025
16 of 18 checks passed
@ryzhak ryzhak deleted the fix/1001 branch September 17, 2025 14:54
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.

Staking deploy script outdated

3 participants