Skip to content

Commit

Permalink
slow wallet unlock with coin split factor
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Apr 13, 2023
1 parent 3f29687 commit 73331f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions diem-move/diem-framework/DPN/sources/0L/Globals.move
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ module Globals {
epoch_mining_thres_lower: 1, // in testnet, staging, we don't want
// to wait too long between proofs.
epoch_mining_thres_upper: 72, // upper bound enforced at 20 mins per proof.
epoch_slow_wallet_unlock: 10000000,
epoch_slow_wallet_unlock: 1000 * get_coin_split_factor() * COIN_SCALING_FACTOR,
min_blocks_per_epoch: 1000,
vouch_threshold: 0,
signing_threshold_pct: 3,
Expand All @@ -160,13 +160,12 @@ module Globals {
vdf_security_baseline: 512,
epoch_mining_thres_lower: 7, // NOTE: bootstrapping, allowance for operator error.
epoch_mining_thres_upper: 72, // upper bound enforced at 20 mins per proof.
epoch_slow_wallet_unlock: 1000 * COIN_SCALING_FACTOR, // approx 10 years for largest accounts in genesis.
epoch_slow_wallet_unlock: 1000 * get_coin_split_factor() * COIN_SCALING_FACTOR, // approx 10 years for largest accounts in genesis.
min_blocks_per_epoch: 10000,
vouch_threshold: 2, // Production is 2 vouchers per validator
signing_threshold_pct: 3,
}
}
}

}
}
4 changes: 2 additions & 2 deletions diem-move/diem-framework/DPN/sources/0L/Receipts.move
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ module Receipts {
assert!(is_init(addr), 0);
let state = borrow_global_mut<UserReceipts>(addr);
Vector::push_back(&mut state.destination, destination);
Vector::push_back(&mut state.cumulative, cumulative);
Vector::push_back(&mut state.cumulative, cumulative * Globals::get_coin_split_factor());
Vector::push_back(&mut state.last_payment_timestamp, last_payment_timestamp);
Vector::push_back(&mut state.last_payment_value, last_payment_value);
Vector::push_back(&mut state.last_payment_value, last_payment_value * get_coin_split_factor());
}

public fun is_init(addr: address):bool {
Expand Down

0 comments on commit 73331f1

Please sign in to comment.