Separate bootstrap leader's stake lamports from its identity lamports (#4510)
* Revert "Prevent run.sh from running beyond the first epoch under normal use (#4498)"
This reverts commit d343c409e6
.
* Separate bootstrap leader's stake lamports from its identity lamports
This commit is contained in:
@ -113,6 +113,15 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
.required(true)
|
||||
.help("Number of lamports to assign to the bootstrap leader"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("bootstrap_leader_stake_lamports")
|
||||
.long("bootstrap-leader-stake-lamports")
|
||||
.value_name("LAMPORTS")
|
||||
.takes_value(true)
|
||||
.default_value(default_bootstrap_leader_lamports)
|
||||
.required(true)
|
||||
.help("Number of lamports to assign to the bootstrap leader's stake account"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("lamports_per_signature")
|
||||
.long("lamports-per-signature")
|
||||
@ -158,11 +167,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
.default_value(default_slots_per_epoch)
|
||||
.help("The number of slots in an epoch"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("disable_epoch_warmup")
|
||||
.long("--disable-epoch-warmup")
|
||||
.hidden(true),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
let bootstrap_leader_keypair_file = matches.value_of("bootstrap_leader_keypair_file").unwrap();
|
||||
@ -173,8 +177,9 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
let mint_keypair_file = matches.value_of("mint_keypair_file").unwrap();
|
||||
let ledger_path = matches.value_of("ledger_path").unwrap();
|
||||
let lamports = value_t_or_exit!(matches, "lamports", u64);
|
||||
let bootstrap_leader_lamports = value_t_or_exit!(matches, "bootstrap_leader_lamports", u64);
|
||||
let bootstrap_leader_stake_lamports =
|
||||
value_t_or_exit!(matches, "bootstrap_leader_lamports", u64);
|
||||
value_t_or_exit!(matches, "bootstrap_leader_stake_lamports", u64);
|
||||
|
||||
let bootstrap_leader_keypair = read_keypair(bootstrap_leader_keypair_file)?;
|
||||
let bootstrap_vote_keypair = read_keypair(bootstrap_vote_keypair_file)?;
|
||||
@ -203,7 +208,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
// node needs an account to issue votes from
|
||||
(
|
||||
bootstrap_leader_keypair.pubkey(),
|
||||
Account::new(1, 0, &system_program::id()),
|
||||
Account::new(bootstrap_leader_lamports, 0, &system_program::id()),
|
||||
),
|
||||
// where votes go to
|
||||
(bootstrap_vote_keypair.pubkey(), vote_account),
|
||||
@ -232,7 +237,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
value_t_or_exit!(matches, "lamports_per_signature", u64);
|
||||
genesis_block.ticks_per_slot = value_t_or_exit!(matches, "ticks_per_slot", u64);
|
||||
genesis_block.slots_per_epoch = value_t_or_exit!(matches, "slots_per_epoch", u64);
|
||||
genesis_block.epoch_warmup = !matches.is_present("disable_epoch_warmup");
|
||||
genesis_block.poh_config.target_tick_duration =
|
||||
Duration::from_millis(value_t_or_exit!(matches, "target_tick_duration", u64));
|
||||
|
||||
|
Reference in New Issue
Block a user