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

[Governance] Proof of Fee #1234

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
1b18a7a
For 0L genesis tools for hard forks, and migrations: create a MoveVm …
0o-de-lally Jan 25, 2023
4c5e0d2
wip testing fakeexector for account migrations
0o-de-lally Feb 2, 2023
4e1b6cb
Scaffolding tests for v6 genesis fork. first cleanup deprecated modules.
0o-de-lally Jan 25, 2023
d5b72e1
add fixtures for testing recovery genesis
0o-de-lally Jan 25, 2023
074636d
cleanup fixtures
0o-de-lally Jan 26, 2023
8ca37d0
integration test using blob from fixture to start a diem-node in test…
0o-de-lally Jan 26, 2023
e1b75c6
patch github actions tests
0o-de-lally Jan 26, 2023
757648c
full e2e test from db backup to starting a node
0o-de-lally Jan 27, 2023
19bd78f
Add diem_logger as per @corythian plus comments.
0o-de-lally Feb 1, 2023
1e5f1c6
query nodes to check if onchain state is the same as recovery.
0o-de-lally Feb 1, 2023
270f569
- include db reader util to inspect a genesis.blob.
0o-de-lally Feb 6, 2023
c5b9fa4
test to check validator count. cleanup test utlis
0o-de-lally Feb 6, 2023
e7df8b6
cleanup tests
0o-de-lally Feb 6, 2023
66c4ffe
stub a "check" feature, to check a json file agains the output genesi…
0o-de-lally Feb 6, 2023
203ac54
finish balance comparison with error list.
0o-de-lally Feb 6, 2023
7c43037
clean
0o-de-lally Feb 6, 2023
12e6479
test to create single validator and check output.
0o-de-lally Feb 7, 2023
6bc8809
skip comparing system zero address.
0o-de-lally Feb 7, 2023
6156a0b
cargo fix
0o-de-lally Feb 7, 2023
6da792c
cargo fmt
0o-de-lally Feb 7, 2023
6a4f3d6
create function to start a vm executor, and uses a function pointer t…
0o-de-lally Feb 7, 2023
886bec0
experimenting with alternative way of starting a vm genesis session
0o-de-lally Feb 7, 2023
1766888
runs
0o-de-lally Feb 7, 2023
f0b6c3b
cleanup
0o-de-lally Feb 8, 2023
6cbe210
need to explicitly set the validators at genesis
0o-de-lally Feb 8, 2023
395568c
test to confirm genesis validator set, is the same as defined set.
0o-de-lally Feb 8, 2023
fded61e
tests for validator set and balance passing
0o-de-lally Feb 8, 2023
e1c43b0
change fixtures, make node start from command line
0o-de-lally Feb 8, 2023
979e811
can start a test node from genesis blob
0o-de-lally Feb 9, 2023
20590e0
can genesis tools test can start a node from a genesis and query for …
0o-de-lally Feb 9, 2023
de04d53
make ol version of swarm config generator in ol/smoke_tests
0o-de-lally Feb 9, 2023
204ef91
wip
0o-de-lally Feb 9, 2023
478a270
move legacyRecovery to ol/types. So now we can run the user migration…
0o-de-lally Feb 12, 2023
682c017
create GenesisMigration user migration test. Builds.
0o-de-lally Feb 12, 2023
e88bdfa
ol/genesis-tools builds with refactor
0o-de-lally Feb 12, 2023
f96281a
refactored with clean build
0o-de-lally Feb 12, 2023
a9d59cb
minor refactors
0o-de-lally Feb 12, 2023
67dd432
can migrate the balance of end users with new design
0o-de-lally Feb 12, 2023
e80ea3c
migration successfully migrates balances of users, validators, and op…
0o-de-lally Feb 13, 2023
a2fe6c5
cleanup unused files. clippy,
0o-de-lally Feb 16, 2023
0908511
tests passing
0o-de-lally Feb 16, 2023
bc23fce
PoF requires all nodes to have equal weight in consensus per the paper.
0o-de-lally Jan 27, 2023
6149591
Update ci.yaml (#1239)
0xzoz Feb 17, 2023
6707f06
[Genesis] Migration tools for genesis from legacy accounts (#1237)
0o-de-lally Feb 23, 2023
8e5ea07
initial scaffold of proof-of-fee auction. Borrows code from NodeWeigh…
0o-de-lally Jan 27, 2023
e3c56b6
implement seat filling algo, which considers the 1/3 unproven node li…
0o-de-lally Jan 27, 2023
89d99c2
patch
0o-de-lally Jan 27, 2023
ef6ca83
patch
0o-de-lally Jan 27, 2023
a08280d
builds
0o-de-lally Jan 28, 2023
cc047a8
implement vm function to pay fee from user account
0o-de-lally Feb 9, 2023
24f9fb9
all validators are charged fee at epoch boundary
0o-de-lally Feb 9, 2023
21e39aa
cleanup validator set proposal functions
0o-de-lally Feb 9, 2023
6990356
refactor jail function at epoch boundary
0o-de-lally Feb 9, 2023
dfbd7e1
make epoch boundry _meta_epoch.move pass
0o-de-lally Feb 9, 2023
494b6a2
filter for vouches on proof of fee
0o-de-lally Feb 9, 2023
0d6a20a
initialize val account with a PoF struct
0o-de-lally Feb 9, 2023
58022cd
epoch reconfiguration meta tests passing. PoF bid initialization unit…
0o-de-lally Feb 9, 2023
e3e62ac
patch issue with failover
0o-de-lally Feb 10, 2023
86cff9c
add bid restrictions, and checking upon seating
0o-de-lally Feb 10, 2023
71d1306
burn excess fees than needed for validators
0o-de-lally Feb 10, 2023
b94cf69
reward thermostat initial implementation
0o-de-lally Feb 10, 2023
ca72274
genesis init fee baseline
0o-de-lally Feb 13, 2023
26ea59e
patch bug in thermostat
0o-de-lally Feb 13, 2023
4e53184
more tests for fill_seats, and thermostat. patches
0o-de-lally Feb 13, 2023
a75ad4d
test
0o-de-lally Feb 13, 2023
6d86a28
consolidate validator audits, check for the case that there are fewer…
0o-de-lally Feb 14, 2023
68e566e
add test fixtures, modify some APIs "tell don't ask" pattern. Add sev…
0o-de-lally Feb 14, 2023
03f25e8
add unit tests for thermostat. Patch a couple bugs
0o-de-lally Feb 14, 2023
52d5393
tests for thermostat increase/decrease
0o-de-lally Feb 14, 2023
23ef787
deprecate Audit.move, and create tests for qualifications in Proofoff…
0o-de-lally Feb 15, 2023
c0aedc9
Jailing mechanism needs update after deprecating Towers. Proposing he…
0o-de-lally Feb 15, 2023
c2be0b0
audit tests for vouch, expired bids, no_funds
0o-de-lally Feb 15, 2023
e0ff590
covered all proof of fee functions, tests for all common scenarios of…
0o-de-lally Feb 15, 2023
f70e875
patch seating failover
0o-de-lally Feb 15, 2023
861ff0e
Clean up Cases.move. Patch Vouch tests fixtures
0o-de-lally Feb 15, 2023
a177f09
adjust fixtures for reconfiguration tests, deprecate some tests, patc…
0o-de-lally Feb 15, 2023
7df1ace
patch all reconfig test fixtures. remove deprecated burn tests.
0o-de-lally Feb 15, 2023
31556f3
continue patching tests and removing deprecated scenarios
0o-de-lally Feb 16, 2023
958758e
All transactional tests passing!
0o-de-lally Feb 16, 2023
a7d6e06
txs transaction apis for setting and retracting bids.
0o-de-lally Feb 23, 2023
c395a71
test for set and retract
0o-de-lally Feb 23, 2023
26607be
Merge branch 'v6' into v6-0d-proof-of-fee
0o-de-lally Feb 23, 2023
f813790
Merge branch 'v6' into v6-0d-proof-of-fee
0o-de-lally Apr 5, 2023
67f24fd
cleanup prints
0o-de-lally Apr 5, 2023
05e43c2
add struct in TransactionFee to track origin of fees FeeMaker
0o-de-lally Apr 5, 2023
6c4df6d
refactor Burn to consider the preference of the user FeeMaker
0o-de-lally Apr 5, 2023
b6e03b6
cleanup
0o-de-lally Apr 5, 2023
49dec6e
init FeeMaker on account creation
0o-de-lally Apr 5, 2023
6800e56
patch tests to remove `print`
0o-de-lally Apr 5, 2023
84b7d07
patch epoch boundary burn ratios
0o-de-lally Apr 5, 2023
fcbc4e5
all tests passing
0o-de-lally Apr 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ compiled_package_info:
? address: "00000000000000000000000000000001"
name: Ancestry
: DiemFramework
? address: "00000000000000000000000000000001"
name: Audit
: DiemFramework
? address: "00000000000000000000000000000001"
name: Authenticator
: DiemFramework
Expand Down Expand Up @@ -223,6 +220,9 @@ compiled_package_info:
? address: "00000000000000000000000000000001"
name: PersistenceDemo
: DiemFramework
? address: "00000000000000000000000000000001"
name: ProofOfFee
: DiemFramework
? address: "00000000000000000000000000000001"
name: Receipts
: DiemFramework
Expand Down Expand Up @@ -346,7 +346,7 @@ compiled_package_info:
? address: "00000000000000000000000000000001"
name: XUS
: DiemFramework
source_digest: E73442AD7A1B65175ABE2ACCB60D6A59204FBFD1C63E20E767E29AAC56BD3285
source_digest: 110A62F23F4C530726F3CD908ED8A7393D8E6E9D5B8E6F2543C536D0C02458CB
build_flags:
dev_mode: false
test_mode: false
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@


<pre><code><b>use</b> <a href="CoreAddresses.md#0x1_CoreAddresses">0x1::CoreAddresses</a>;
<b>use</b> <a href="Debug.md#0x1_Debug">0x1::Debug</a>;
<b>use</b> <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Option.md#0x1_Option">0x1::Option</a>;
<b>use</b> <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Signer.md#0x1_Signer">0x1::Signer</a>;
<b>use</b> <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector">0x1::Vector</a>;
Expand Down Expand Up @@ -67,7 +66,7 @@


<pre><code><b>public</b> <b>fun</b> <a href="Ancestry.md#0x1_Ancestry_init">init</a>(new_account_sig: &signer, onboarder_sig: &signer ) <b>acquires</b> <a href="Ancestry.md#0x1_Ancestry">Ancestry</a>{
print(&100100);
// print(&100100);
<b>let</b> parent = <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Signer.md#0x1_Signer_address_of">Signer::address_of</a>(onboarder_sig);
<a href="Ancestry.md#0x1_Ancestry_set_tree">set_tree</a>(new_account_sig, parent);
}
Expand All @@ -94,7 +93,7 @@

<pre><code><b>fun</b> <a href="Ancestry.md#0x1_Ancestry_set_tree">set_tree</a>(new_account_sig: &signer, parent: <b>address</b> ) <b>acquires</b> <a href="Ancestry.md#0x1_Ancestry">Ancestry</a> {
<b>let</b> child = <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Signer.md#0x1_Signer_address_of">Signer::address_of</a>(new_account_sig);
print(&100200);
// print(&100200);
<b>let</b> new_tree = <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector_empty">Vector::empty</a>&lt;<b>address</b>&gt;();

// get the parent's ancestry <b>if</b> initialized.
Expand All @@ -103,31 +102,31 @@
<b>if</b> (<b>exists</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(parent)) {
<b>let</b> parent_state = <b>borrow_global_mut</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(parent);
<b>let</b> parent_tree = *&parent_state.tree;
print(&100210);
// print(&100210);
<b>if</b> (<a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector_length">Vector::length</a>&lt;<b>address</b>&gt;(&parent_tree) &gt; 0) {
<a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector_append">Vector::append</a>(&<b>mut</b> new_tree, parent_tree);
};
print(&100220);
// print(&100220);
};

// add the parent <b>to</b> the tree
<a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector_push_back">Vector::push_back</a>(&<b>mut</b> new_tree, parent);
print(&100230);
// print(&100230);

<b>if</b> (!<b>exists</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(child)) {
<b>move_to</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(new_account_sig, <a href="Ancestry.md#0x1_Ancestry">Ancestry</a> {
tree: new_tree,
});
print(&100240);
// print(&100240);

} <b>else</b> {
// this is only for migration cases.
<b>let</b> child_ancestry = <b>borrow_global_mut</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(child);
child_ancestry.tree = new_tree;
print(&100250);
// print(&100250);

};
print(&100260);
// print(&100260);

}
</code></pre>
Expand Down Expand Up @@ -183,40 +182,40 @@
<pre><code><b>public</b> <b>fun</b> <a href="Ancestry.md#0x1_Ancestry_is_family">is_family</a>(left: <b>address</b>, right: <b>address</b>): (bool, <b>address</b>) <b>acquires</b> <a href="Ancestry.md#0x1_Ancestry">Ancestry</a> {
<b>let</b> is_family = <b>false</b>;
<b>let</b> common_ancestor = @0x0;
print(&100300);
print(&<b>exists</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(left));
print(&<b>exists</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(right));
// // print(&100300);
// // print(&<b>exists</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(left));
// // print(&<b>exists</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(right));

// <b>if</b> (<b>exists</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(left) && <b>exists</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(right)) {
// <b>if</b> tree is empty it will still work.
print(&100310);
// // print(&100310);
<b>let</b> left_tree = <a href="Ancestry.md#0x1_Ancestry_get_tree">get_tree</a>(left);
print(&100311);
// // print(&100311);
<b>let</b> right_tree = <a href="Ancestry.md#0x1_Ancestry_get_tree">get_tree</a>(right);

print(&100320);
// // print(&100320);

// check for direct relationship.
<b>if</b> (<a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector_contains">Vector::contains</a>(&left_tree, &right)) <b>return</b> (<b>true</b>, right);
<b>if</b> (<a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector_contains">Vector::contains</a>(&right_tree, &left)) <b>return</b> (<b>true</b>, left);

print(&100330);
// // print(&100330);
<b>let</b> i = 0;
// check every <b>address</b> on the list <b>if</b> there are overlaps.
<b>while</b> (i &lt; <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector_length">Vector::length</a>&lt;<b>address</b>&gt;(&left_tree)) {
print(&100341);
// // print(&100341);
<b>let</b> family_addr = <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector_borrow">Vector::borrow</a>(&left_tree, i);
<b>if</b> (<a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector_contains">Vector::contains</a>(&right_tree, family_addr)) {
is_family = <b>true</b>;
common_ancestor = *family_addr;
print(&100342);
// // print(&100342);
<b>break</b>
};
i = i + 1;
};
print(&100350);
// // print(&100350);
// };
print(&100360);
// // print(&100360);
(is_family, common_ancestor)
}
</code></pre>
Expand Down Expand Up @@ -322,13 +321,13 @@
<b>move_to</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(child_sig, <a href="Ancestry.md#0x1_Ancestry">Ancestry</a> {
tree: migrate_tree,
});
print(&100240);
// print(&100240);

} <b>else</b> {
// this is only for migration cases.
<b>let</b> child_ancestry = <b>borrow_global_mut</b>&lt;<a href="Ancestry.md#0x1_Ancestry">Ancestry</a>&gt;(child);
child_ancestry.tree = migrate_tree;
print(&100250);
// print(&100250);

};
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ This module enables automatic payments from accounts to community wallets at epo
- [Function `find`](#0x1_AutoPay_find)


<pre><code><b>use</b> <a href="CommunityWallet.md#0x1_CommunityWallet">0x1::CommunityWallet</a>;
<b>use</b> <a href="DiemAccount.md#0x1_DiemAccount">0x1::DiemAccount</a>;
<pre><code><b>use</b> <a href="DiemAccount.md#0x1_DiemAccount">0x1::DiemAccount</a>;
<b>use</b> <a href="DiemConfig.md#0x1_DiemConfig">0x1::DiemConfig</a>;
<b>use</b> <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Errors.md#0x1_Errors">0x1::Errors</a>;
<b>use</b> <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/FixedPoint32.md#0x1_FixedPoint32">0x1::FixedPoint32</a>;
Expand Down Expand Up @@ -352,16 +351,6 @@ Maximum value for the Payment type selection



<a name="0x1_AutoPay_PAYEE_NOT_COMMUNITY_WALLET"></a>

Attempt to make a payment to a non-community-wallet


<pre><code><b>const</b> <a href="AutoPay.md#0x1_AutoPay_PAYEE_NOT_COMMUNITY_WALLET">PAYEE_NOT_COMMUNITY_WALLET</a>: u64 = 10024;
</code></pre>



<a name="0x1_AutoPay_PERCENT_OF_BALANCE"></a>

send percent of balance at end of epoch payment type
Expand Down Expand Up @@ -601,7 +590,6 @@ Attempt to use a UID that is already taken
<b>let</b> bal_change_since_last_run = <b>if</b> (pre_run_bal &gt; my_autopay_state.prev_bal) {
pre_run_bal - my_autopay_state.prev_bal
} <b>else</b> { 0 };

// go through the pledges
<b>while</b> (payments_idx &lt; payments_len) {
<b>let</b> payment = <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Vector.md#0x1_Vector_borrow_mut">Vector::borrow_mut</a>&lt;<a href="AutoPay.md#0x1_AutoPay_Payment">Payment</a>&gt;(payments, payments_idx);
Expand Down Expand Up @@ -648,10 +636,6 @@ Attempt to use a UID that is already taken
payment: &<b>mut</b> <a href="AutoPay.md#0x1_AutoPay_Payment">Payment</a>,
bal_change_since_last_run: u64,
): bool {
// check payees are community wallets, only community wallets are allowed
// <b>to</b> receive autopay (bypassing account limits)
<b>if</b> (!<a href="CommunityWallet.md#0x1_CommunityWallet_is_comm">CommunityWallet::is_comm</a>(payment.payee)) { <b>return</b> <b>false</b> }; // do nothing but don't delete instruction };

<a href="Roles.md#0x1_Roles_assert_diem_root">Roles::assert_diem_root</a>(vm);
<b>let</b> epoch = <a href="DiemConfig.md#0x1_DiemConfig_get_current_epoch">DiemConfig::get_current_epoch</a>();
<b>let</b> account_bal = <a href="DiemAccount.md#0x1_DiemAccount_balance">DiemAccount::balance</a>&lt;<a href="GAS.md#0x1_GAS">GAS</a>&gt;(*account_addr);
Expand Down Expand Up @@ -687,7 +671,7 @@ Attempt to use a UID that is already taken
};

<b>if</b> (amount != 0 && amount &lt;= account_bal) {
<a href="DiemAccount.md#0x1_DiemAccount_vm_make_payment_no_limit">DiemAccount::vm_make_payment_no_limit</a>&lt;<a href="GAS.md#0x1_GAS">GAS</a>&gt;(
<a href="DiemAccount.md#0x1_DiemAccount_vm_pay_from">DiemAccount::vm_pay_from</a>&lt;<a href="GAS.md#0x1_GAS">GAS</a>&gt;(
*account_addr, payment.payee, amount, b"autopay", b"", vm
);
};
Expand Down Expand Up @@ -807,16 +791,16 @@ Attempt to use a UID that is already taken
payee: <b>address</b>,
end_epoch: u64,
amt: u64
) <b>acquires</b> <a href="AutoPay.md#0x1_AutoPay_UserAutoPay">UserAutoPay</a>, <a href="AutoPay.md#0x1_AutoPay_AccountLimitsEnable">AccountLimitsEnable</a> {
) <b>acquires</b> <a href="AutoPay.md#0x1_AutoPay_UserAutoPay">UserAutoPay</a> {
<b>let</b> addr = <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Signer.md#0x1_Signer_address_of">Signer::address_of</a>(sender);
// Confirm that no payment <b>exists</b> <b>with</b> the same uid
<b>let</b> index = <a href="AutoPay.md#0x1_AutoPay_find">find</a>(addr, uid);
<b>assert</b>!(<a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Option.md#0x1_Option_is_none">Option::is_none</a>&lt;u64&gt;(&index), <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Errors.md#0x1_Errors_invalid_argument">Errors::invalid_argument</a>(<a href="AutoPay.md#0x1_AutoPay_UID_TAKEN">UID_TAKEN</a>));

// TODO: This check already <b>exists</b> at the time of execution.
<b>if</b> (<b>borrow_global</b>&lt;<a href="AutoPay.md#0x1_AutoPay_AccountLimitsEnable">AccountLimitsEnable</a>&gt;(@DiemRoot).enabled) {
<b>assert</b>!(<a href="CommunityWallet.md#0x1_CommunityWallet_is_comm">CommunityWallet::is_comm</a>(payee), <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Errors.md#0x1_Errors_invalid_argument">Errors::invalid_argument</a>(<a href="AutoPay.md#0x1_AutoPay_PAYEE_NOT_COMMUNITY_WALLET">PAYEE_NOT_COMMUNITY_WALLET</a>));
};
// // TODO: This check already <b>exists</b> at the time of execution.
// <b>if</b> (<b>borrow_global</b>&lt;<a href="AutoPay.md#0x1_AutoPay_AccountLimitsEnable">AccountLimitsEnable</a>&gt;(@DiemRoot).enabled) {
// <b>assert</b>!(<a href="CommunityWallet.md#0x1_CommunityWallet_is_comm">CommunityWallet::is_comm</a>(payee), <a href="../../../../../../../DPN/releases/artifacts/current/build/MoveStdlib/docs/Errors.md#0x1_Errors_invalid_argument">Errors::invalid_argument</a>(PAYEE_NOT_COMMUNITY_WALLET));
// };

<b>let</b> payments = &<b>mut</b> <b>borrow_global_mut</b>&lt;<a href="AutoPay.md#0x1_AutoPay_UserAutoPay">UserAutoPay</a>&gt;(addr).payments;
<b>assert</b>!(
Expand Down
Loading