aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[Community] Add coin::unfreeze_coin_store function to coin module

Open PaulFidika opened this issue 2 years ago • 3 comments

Description

Coin can now be unfrozen. I preferred the term 'unfreeze' to 'thaw' (like on Solana) because I thought it was simpler, but either function name works for me.

Test Plan

I added a unit test in the coin.move module.

closes #3850


This change is Reviewable

PaulFidika avatar Sep 10 '22 03:09 PaulFidika

@PaulFidika please run pre-commit or look at the lint issues:

diff --git a/aptos-move/framework/aptos-framework/sources/coin.move b/aptos-move/framework/aptos-framework/sources/coin.move
index ec34d9c..ff016a9 100644
--- a/aptos-move/framework/aptos-framework/sources/coin.move
+++ b/aptos-move/framework/aptos-framework/sources/coin.move
@@ -810,7 +810,7 @@ module aptos_framework::coin {
         let account_addr = signer::address_of(&account);
         account::create_account_for_test(account_addr);
         let (burn_cap, freeze_cap, mint_cap) = initialize_and_register_fake_money(&account, 18, true);
-        
+
         let coins_minted = mint<FakeMoney>(100, &mint_cap);
         freeze_coin_store(account_addr, &freeze_cap);
         unfreeze_coin_store(account_addr, &freeze_cap);
diff --git a/aptos-move/framework/aptos-framework/sources/reconfiguration.move b/aptos-move/framework/aptos-framework/sources/reconfiguration.move
index 41502bd..aa38[96](https://github.com/aptos-labs/aptos-core/runs/8286835606?check_suite_focus=true#step:5:101)2 [100](https://github.com/aptos-labs/aptos-core/runs/8286835606?check_suite_focus=true#step:5:105)644
--- a/aptos-move/framework/aptos-framework/sources/reconfiguration.move
+++ b/aptos-move/framework/aptos-framework/sources/reconfiguration.move
@@ -36,7 +36,7 @@ module aptos_framework::reconfiguration {
         events: event::EventHandle<NewEpochEvent>,
     }
 
-    /// Reconfiguration will be disabled if this resource is published under the 
+    /// Reconfiguration will be disabled if this resource is published under the
     /// aptos_framework system address
     struct DisableReconfiguration has key {}
     ```

davidiw avatar Sep 11 '22 01:09 davidiw

How do I do that? Sorry; I'm new here. So the issue is that my code is formatted correctly?

PaulFidika avatar Sep 11 '22 20:09 PaulFidika

install pre-commit and run it? I use arch linux, it was in aur, which I used yay to install. I think it is in brew for macs.

davidiw avatar Sep 12 '22 03:09 davidiw

do you have plans to return to this? otherwise I can pass it off to someone else to wrap up.

davidiw avatar Sep 21 '22 04:09 davidiw

do you have plans to return to this? otherwise I can pass it off to someone else to wrap up.

sorry for not getting back to this sooner. I installed pre-commit and ran it. Did that work correctly? Thanks; I'll make this part of my standard workflow in the future.

PaulFidika avatar Sep 23 '22 00:09 PaulFidika

@PaulFidika issue persists...

davidiw avatar Sep 23 '22 04:09 davidiw

Okay now it's fixed!

PaulFidika avatar Sep 26 '22 22:09 PaulFidika

Forge is running suite land_blocking on 964bb11651847070e4d5b21a3c77bb5af5bc4101

github-actions[bot] avatar Sep 26 '22 23:09 github-actions[bot]

Forge is running suite compat on 843b204dce971d98449b82624f4f684c7a18b991 ==> 964bb11651847070e4d5b21a3c77bb5af5bc4101

github-actions[bot] avatar Sep 26 '22 23:09 github-actions[bot]

:white_check_mark: Forge suite compat success on 843b204dce971d98449b82624f4f684c7a18b991 ==> 964bb11651847070e4d5b21a3c77bb5af5bc4101

Compatibility test results for 843b204dce971d98449b82624f4f684c7a18b991 ==> 964bb11651847070e4d5b21a3c77bb5af5bc4101 (PR)
1. Check liveness of validators at old version: 843b204dce971d98449b82624f4f684c7a18b991
compatibility::simple-validator-upgrade::liveness-check : 6108 TPS, 2627 ms latency, 3700 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: 964bb11651847070e4d5b21a3c77bb5af5bc4101
compatibility::simple-validator-upgrade::single-validator-upgrade : 7120 TPS, 2895 ms latency, 3600 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: 964bb11651847070e4d5b21a3c77bb5af5bc4101
compatibility::simple-validator-upgrade::half-validator-upgrade : 7488 TPS, 3061 ms latency, 4200 ms p99 latency,no expired txns
4. upgrading second batch to new version: 964bb11651847070e4d5b21a3c77bb5af5bc4101
compatibility::simple-validator-upgrade::rest-validator-upgrade : 6340 TPS, 2918 ms latency, 4300 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for 843b204dce971d98449b82624f4f684c7a18b991 ==> 964bb11651847070e4d5b21a3c77bb5af5bc4101 passed
Test Ok

github-actions[bot] avatar Sep 27 '22 00:09 github-actions[bot]

:white_check_mark: Forge suite land_blocking success on 964bb11651847070e4d5b21a3c77bb5af5bc4101

performance benchmark with full nodes : 7186 TPS, 4135 ms latency, 12300 ms p99 latency,no expired txns
Test Ok

github-actions[bot] avatar Sep 27 '22 00:09 github-actions[bot]