Add bootstrap storage account to genesis (#4359)
* Add bootstrap storage account to genesis * Add storage account genesis command to run.sh * Update airdrop for all validators * Remove unhelpful Short for arg * Set the correct program owner
This commit is contained in:
@ -97,6 +97,14 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
.required(true)
|
||||
.help("Path to file containing the bootstrap leader's staking keypair"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("bootstrap_storage_keypair_file")
|
||||
.long("bootstrap-storage-keypair")
|
||||
.value_name("BOOTSTRAP STORAGE KEYPAIR")
|
||||
.takes_value(true)
|
||||
.required(true)
|
||||
.help("Path to file containing the bootstrap leader's storage keypair"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("bootstrap_leader_lamports")
|
||||
.long("bootstrap-leader-lamports")
|
||||
@ -156,6 +164,8 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
let bootstrap_leader_keypair_file = matches.value_of("bootstrap_leader_keypair_file").unwrap();
|
||||
let bootstrap_vote_keypair_file = matches.value_of("bootstrap_vote_keypair_file").unwrap();
|
||||
let bootstrap_stake_keypair_file = matches.value_of("bootstrap_stake_keypair_file").unwrap();
|
||||
let bootstrap_storage_keypair_file =
|
||||
matches.value_of("bootstrap_storage_keypair_file").unwrap();
|
||||
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);
|
||||
@ -165,6 +175,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
let bootstrap_leader_keypair = read_keypair(bootstrap_leader_keypair_file)?;
|
||||
let bootstrap_vote_keypair = read_keypair(bootstrap_vote_keypair_file)?;
|
||||
let bootstrap_stake_keypair = read_keypair(bootstrap_stake_keypair_file)?;
|
||||
let bootstrap_storage_keypair = read_keypair(bootstrap_storage_keypair_file)?;
|
||||
let mint_keypair = read_keypair(mint_keypair_file)?;
|
||||
|
||||
// TODO: de-duplicate the stake once passive staking
|
||||
@ -201,6 +212,11 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
bootstrap_leader_stake_lamports,
|
||||
),
|
||||
),
|
||||
// storage account
|
||||
(
|
||||
bootstrap_storage_keypair.pubkey(),
|
||||
Account::new(1, 1024 * 4, &solana_storage_api::id()),
|
||||
),
|
||||
],
|
||||
&[
|
||||
solana_vote_program!(),
|
||||
|
Reference in New Issue
Block a user