Skip to content

Commit

Permalink
[move] default POF bid from genesis (0LNetworkCommunity#86)
Browse files Browse the repository at this point in the history
Co-authored-by: 0o-de-lally <[email protected]>
  • Loading branch information
hemulin and 0o-de-lally committed Nov 5, 2023
1 parent 7812a31 commit b4cd0f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions framework/libra-framework/sources/modified_source/genesis.move
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,13 @@ module diem_framework::genesis {
infra_escrow::genesis_coin_validator(&create_signer(@0x0), *&validator.validator_config.owner_address);
if (testnet::is_not_mainnet()) {
let sig = create_signer(validator.validator_config.owner_address);
proof_of_fee::set_bid(&sig, 05, 1000);
proof_of_fee::set_bid(&sig, 0900, 1000); // make the genesis
// default 90% to align with thermostatic rule in the PoF paper.
// otherwise the thermostatic rule starts kicking-in immediately

// TODO: this is for testnet purposes only
// unlock some of the genesis validators coins so they can issue
// transactions from epoch 0 in test runners.
slow_wallet::slow_wallet_epoch_drip(diem_framework, 100000000);
};

Expand All @@ -270,11 +276,12 @@ module diem_framework::genesis {
});

musical_chairs::initialize(diem_framework, num_validators);

////////
// TODO: maybe consolidate reconfig methods in one place
// for smoke tests
// stake::maybe_reconfigure(diem_framework,
// validator_universe::get_eligible_validators());
///////
stake::on_new_epoch()
}

Expand Down
2 changes: 1 addition & 1 deletion tools/genesis/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub fn encode_genesis_change_set(

initialize_features(&mut session);

// TODO: consolidate with set_final_supply
// TODO: consolidate with set_final_supply below
initialize_diem_coin(&mut session);

// final supply must be set after coin is initialized, but before any
Expand Down

0 comments on commit b4cd0f7

Please sign in to comment.