sui icon indicating copy to clipboard operation
sui copied to clipboard

Adds pow function to math.move

Open 3rror404 opened this issue 2 years ago • 12 comments

3rror404 avatar Oct 28 '22 10:10 3rror404

💳 Wallet Extension has been built, you can download the packaged extension here: https://github.com/MystenLabs/sui/actions/runs/3346997858#artifacts

github-actions[bot] avatar Oct 28 '22 17:10 github-actions[bot]

(Actually, it's now back to you to undo the u128 support -- the tests look good, I was just looking at an old copy of the PR for some reason).

amnn avatar Oct 31 '22 09:10 amnn

Hi @amnn, how does the latest version look? Let me know if I have missed any of your requests.

3rror404 avatar Oct 31 '22 10:10 3rror404

Ah, @3rror404, this change requires updating the "empty genesis snapshot" (basically it changes the initial state of the chain).

You can do this by running cargo simtest which will initially fail and generate the new snapshot, and then cargo insta review to accept the new snapshot. This will require a bit of set-up to your development environment:

  • Installing nextest from https://nexte.st/book/pre-built-binaries.html
  • Installing insta from https://insta.rs/
  • Installing simtest by running https://github.com/MystenLabs/sui/blob/main/scripts/simtest/install.sh

amnn avatar Oct 31 '22 13:10 amnn

It looks like some of the other snapshots need to be updated as well. The steps I shared in my previous comment should work for those too, but you may need to run the test suite multiple times, or with the --no-fail-fast option, to make sure your test run identifies all the snapshots that need updating.

amnn avatar Oct 31 '22 14:10 amnn

Did that work correctly @amnn?

3rror404 avatar Oct 31 '22 15:10 3rror404

Let's see what the CI says -- I think I saw some other snapshots that needed updating (they are to do with the gas schedule and how much operations cost) -- if you run cargo simtest --no-fail-fast; cargo nextest run --no-fail-fast, you should be able to see if it worked locally as well (or get the snapshots to review if not).

amnn avatar Oct 31 '22 15:10 amnn

So, yep, CI tells us that there are some more snapshots to refresh. I believe they are runnable on your side with cargo nextest run --no-fail-fast. Thanks so much for sticking with this process!

amnn avatar Oct 31 '22 15:10 amnn

So, yep, CI tells us that there are some more snapshots to refresh. I believe they are runnable on your side with cargo nextest run --no-fail-fast. Thanks so much for sticking with this process!

The ideal way to do this is to review and accept the snapshots: For cost: cd crates/sui-cost cargo insta test --review Then hit a to accept the changes

For genesis: cd crates/sui-config cargo insta test --review Then hit a to accept the changes

oxade avatar Oct 31 '22 16:10 oxade

sui-cost gave me one review to accept but sui-config didn't. Does that mean something didn't work?

3rror404 avatar Oct 31 '22 16:10 3rror404

I believe you've already updated the sui-genesis one (that was the first one you did). Let's see what CI says!

amnn avatar Oct 31 '22 16:10 amnn

I believe you've correctly updated all the necessary snapshots now, but unfortunately they now conflict, so you'll need to rebase, and then re-run the snapshot commands. For that, following @oxade's commands should be all you need to do to update all snapshots, and I will watch it for CI to report all green and land it, to avoid another conflict.

amnn avatar Oct 31 '22 16:10 amnn

Excellent job @3rror404, thanks for sticking with it!

amnn avatar Oct 31 '22 21:10 amnn

Thank you for being so patient 😅

3rror404 avatar Oct 31 '22 22:10 3rror404