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

[move] Remove framework bloat #205

Closed
wants to merge 11 commits into from
10 changes: 7 additions & 3 deletions framework/libra-framework/sources/modified_source/account.move
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@ module diem_framework::account {

// use diem_std::debug::print;

#[test_only]
friend diem_framework::diem_account;
friend diem_framework::coin;
friend diem_framework::genesis;
friend diem_framework::resource_account;
friend diem_framework::transaction_validation;
//////// 0L ////////
friend ol_framework::ol_account;
friend diem_framework::multisig_account;

#[test_only]
friend diem_framework::diem_account;
#[test_only]
friend diem_framework::resource_account;
Copy link
Contributor

Choose a reason for hiding this comment

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

changing this to use the test_only pragma prevented multiple step upgrades to complete both vanilla and with --danger-force-upgrade

//////// end 0L ////////

/// Resource representing an account.
struct Account has key, store {
authentication_key: vector<u8>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[test_only]
/// A resource account is used to manage resources independent of an account managed by a user.
/// This contains several utilities to make using resource accounts more effective.
///
Expand Down Expand Up @@ -58,6 +59,7 @@
/// module.resource_signer_cap = option::some(resource_signer_cap);
/// }
/// ```

module diem_framework::resource_account {
use std::error;
use std::signer;
Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

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

changes to this file prevent single step upgrades to complete both vanilla and with --danger-force-upgrade

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spec diem_framework::diem_coin {
spec ol_framework::libra_coin {
spec module {
pragma verify = true;
pragma aborts_if_is_strict;
Expand All @@ -8,7 +8,7 @@ spec diem_framework::diem_coin {
pragma aborts_if_is_partial;
let addr = signer::address_of(diem_framework);
ensures exists<MintCapStore>(addr);
ensures exists<coin::CoinInfo<DiemCoin>>(addr);
ensures exists<coin::CoinInfo<LibraCoin>>(addr);
}

spec destroy_mint_cap {
Expand All @@ -22,10 +22,10 @@ spec diem_framework::diem_coin {
pragma verify = false;
}

// Only callable in tests and testnets.not needed verify.
spec mint {
pragma verify = false;
}
// // Only callable in tests and testnets.not needed verify.
// spec mint {
// pragma verify = false;
// }

// Only callable in tests and testnets.not needed verify.
spec delegate_mint_capability {
Expand Down
Binary file removed framework/releases/release-6.9.6.mrb
Binary file not shown.
Loading