Add Storage accounts for all nodes (#4298)
* Setup storage keypairs for all nodes * Clean up naming * clippy * Update arg value_names
This commit is contained in:
parent
915956b94b
commit
fd3f2cb910
|
@ -76,7 +76,8 @@ impl Fullnode {
|
||||||
keypair: &Arc<Keypair>,
|
keypair: &Arc<Keypair>,
|
||||||
ledger_path: &str,
|
ledger_path: &str,
|
||||||
vote_account: &Pubkey,
|
vote_account: &Pubkey,
|
||||||
voting_keypair: T,
|
voting_keypair: &Arc<T>,
|
||||||
|
storage_keypair: &Arc<Keypair>,
|
||||||
entrypoint_info_option: Option<&ContactInfo>,
|
entrypoint_info_option: Option<&ContactInfo>,
|
||||||
config: &FullnodeConfig,
|
config: &FullnodeConfig,
|
||||||
) -> Self
|
) -> Self
|
||||||
|
@ -219,12 +220,13 @@ impl Fullnode {
|
||||||
let voting_keypair = if config.voting_disabled {
|
let voting_keypair = if config.voting_disabled {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
Some(Arc::new(voting_keypair))
|
Some(voting_keypair)
|
||||||
};
|
};
|
||||||
|
|
||||||
let tvu = Tvu::new(
|
let tvu = Tvu::new(
|
||||||
vote_account,
|
vote_account,
|
||||||
voting_keypair,
|
voting_keypair,
|
||||||
|
storage_keypair,
|
||||||
&bank_forks,
|
&bank_forks,
|
||||||
&cluster_info,
|
&cluster_info,
|
||||||
sockets,
|
sockets,
|
||||||
|
@ -355,13 +357,15 @@ pub fn new_fullnode_for_tests() -> (Fullnode, ContactInfo, Keypair, String) {
|
||||||
|
|
||||||
let (ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_block);
|
let (ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_block);
|
||||||
|
|
||||||
let voting_keypair = Keypair::new();
|
let voting_keypair = Arc::new(Keypair::new());
|
||||||
|
let storage_keypair = Arc::new(Keypair::new());
|
||||||
let node = Fullnode::new(
|
let node = Fullnode::new(
|
||||||
node,
|
node,
|
||||||
&node_keypair,
|
&node_keypair,
|
||||||
&ledger_path,
|
&ledger_path,
|
||||||
&voting_keypair.pubkey(),
|
&voting_keypair.pubkey(),
|
||||||
voting_keypair,
|
&voting_keypair,
|
||||||
|
&storage_keypair,
|
||||||
None,
|
None,
|
||||||
&FullnodeConfig::default(),
|
&FullnodeConfig::default(),
|
||||||
);
|
);
|
||||||
|
@ -387,13 +391,15 @@ mod tests {
|
||||||
create_genesis_block_with_leader(10_000, &leader_keypair.pubkey(), 1000).0;
|
create_genesis_block_with_leader(10_000, &leader_keypair.pubkey(), 1000).0;
|
||||||
let (validator_ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_block);
|
let (validator_ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_block);
|
||||||
|
|
||||||
let voting_keypair = Keypair::new();
|
let voting_keypair = Arc::new(Keypair::new());
|
||||||
|
let storage_keypair = Arc::new(Keypair::new());
|
||||||
let validator = Fullnode::new(
|
let validator = Fullnode::new(
|
||||||
validator_node,
|
validator_node,
|
||||||
&Arc::new(validator_keypair),
|
&Arc::new(validator_keypair),
|
||||||
&validator_ledger_path,
|
&validator_ledger_path,
|
||||||
&voting_keypair.pubkey(),
|
&voting_keypair.pubkey(),
|
||||||
voting_keypair,
|
&voting_keypair,
|
||||||
|
&storage_keypair,
|
||||||
Some(&leader_node.info),
|
Some(&leader_node.info),
|
||||||
&FullnodeConfig::default(),
|
&FullnodeConfig::default(),
|
||||||
);
|
);
|
||||||
|
@ -415,13 +421,15 @@ mod tests {
|
||||||
create_genesis_block_with_leader(10_000, &leader_keypair.pubkey(), 1000);
|
create_genesis_block_with_leader(10_000, &leader_keypair.pubkey(), 1000);
|
||||||
let (validator_ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_block);
|
let (validator_ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_block);
|
||||||
ledger_paths.push(validator_ledger_path.clone());
|
ledger_paths.push(validator_ledger_path.clone());
|
||||||
let voting_keypair = Keypair::new();
|
let voting_keypair = Arc::new(Keypair::new());
|
||||||
|
let storage_keypair = Arc::new(Keypair::new());
|
||||||
Fullnode::new(
|
Fullnode::new(
|
||||||
validator_node,
|
validator_node,
|
||||||
&Arc::new(validator_keypair),
|
&Arc::new(validator_keypair),
|
||||||
&validator_ledger_path,
|
&validator_ledger_path,
|
||||||
&voting_keypair.pubkey(),
|
&voting_keypair.pubkey(),
|
||||||
voting_keypair,
|
&voting_keypair,
|
||||||
|
&storage_keypair,
|
||||||
Some(&leader_node.info),
|
Some(&leader_node.info),
|
||||||
&FullnodeConfig::default(),
|
&FullnodeConfig::default(),
|
||||||
)
|
)
|
||||||
|
|
|
@ -27,18 +27,11 @@ use std::sync::Arc;
|
||||||
|
|
||||||
pub struct FullnodeInfo {
|
pub struct FullnodeInfo {
|
||||||
pub keypair: Arc<Keypair>,
|
pub keypair: Arc<Keypair>,
|
||||||
|
pub voting_keypair: Arc<Keypair>,
|
||||||
|
pub storage_keypair: Arc<Keypair>,
|
||||||
pub ledger_path: String,
|
pub ledger_path: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FullnodeInfo {
|
|
||||||
fn new(keypair: Arc<Keypair>, ledger_path: String) -> Self {
|
|
||||||
Self {
|
|
||||||
keypair,
|
|
||||||
ledger_path,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub struct ReplicatorInfo {
|
pub struct ReplicatorInfo {
|
||||||
pub replicator_storage_id: Pubkey,
|
pub replicator_storage_id: Pubkey,
|
||||||
pub ledger_path: String,
|
pub ledger_path: String,
|
||||||
|
@ -134,13 +127,15 @@ impl LocalCluster {
|
||||||
let (genesis_ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_block);
|
let (genesis_ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_block);
|
||||||
let leader_ledger_path = tmp_copy_blocktree!(&genesis_ledger_path);
|
let leader_ledger_path = tmp_copy_blocktree!(&genesis_ledger_path);
|
||||||
let leader_contact_info = leader_node.info.clone();
|
let leader_contact_info = leader_node.info.clone();
|
||||||
|
let leader_storage_keypair = Arc::new(Keypair::new());
|
||||||
|
let leader_voting_keypair = Arc::new(voting_keypair);
|
||||||
let leader_server = Fullnode::new(
|
let leader_server = Fullnode::new(
|
||||||
leader_node,
|
leader_node,
|
||||||
&leader_keypair,
|
&leader_keypair,
|
||||||
&leader_ledger_path,
|
&leader_ledger_path,
|
||||||
&voting_keypair.pubkey(),
|
&leader_voting_keypair.pubkey(),
|
||||||
voting_keypair,
|
&leader_voting_keypair,
|
||||||
|
&leader_storage_keypair,
|
||||||
None,
|
None,
|
||||||
&config.fullnode_config,
|
&config.fullnode_config,
|
||||||
);
|
);
|
||||||
|
@ -150,7 +145,12 @@ impl LocalCluster {
|
||||||
fullnodes.insert(leader_pubkey, leader_server);
|
fullnodes.insert(leader_pubkey, leader_server);
|
||||||
fullnode_infos.insert(
|
fullnode_infos.insert(
|
||||||
leader_pubkey,
|
leader_pubkey,
|
||||||
FullnodeInfo::new(leader_keypair.clone(), leader_ledger_path),
|
FullnodeInfo {
|
||||||
|
keypair: leader_keypair,
|
||||||
|
voting_keypair: leader_voting_keypair,
|
||||||
|
storage_keypair: leader_storage_keypair,
|
||||||
|
ledger_path: leader_ledger_path,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut cluster = Self {
|
let mut cluster = Self {
|
||||||
|
@ -221,6 +221,7 @@ impl LocalCluster {
|
||||||
// Must have enough tokens to fund vote account and set delegate
|
// Must have enough tokens to fund vote account and set delegate
|
||||||
let validator_keypair = Arc::new(Keypair::new());
|
let validator_keypair = Arc::new(Keypair::new());
|
||||||
let voting_keypair = Keypair::new();
|
let voting_keypair = Keypair::new();
|
||||||
|
let storage_keypair = Arc::new(Keypair::new());
|
||||||
let validator_pubkey = validator_keypair.pubkey();
|
let validator_pubkey = validator_keypair.pubkey();
|
||||||
let validator_node = Node::new_localhost_with_pubkey(&validator_keypair.pubkey());
|
let validator_node = Node::new_localhost_with_pubkey(&validator_keypair.pubkey());
|
||||||
let ledger_path = tmp_copy_blocktree!(&self.genesis_ledger_path);
|
let ledger_path = tmp_copy_blocktree!(&self.genesis_ledger_path);
|
||||||
|
@ -250,12 +251,14 @@ impl LocalCluster {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let voting_keypair = Arc::new(voting_keypair);
|
||||||
let validator_server = Fullnode::new(
|
let validator_server = Fullnode::new(
|
||||||
validator_node,
|
validator_node,
|
||||||
&validator_keypair,
|
&validator_keypair,
|
||||||
&ledger_path,
|
&ledger_path,
|
||||||
&voting_keypair.pubkey(),
|
&voting_keypair.pubkey(),
|
||||||
voting_keypair,
|
&voting_keypair,
|
||||||
|
&storage_keypair,
|
||||||
Some(&self.entry_point_info),
|
Some(&self.entry_point_info),
|
||||||
&fullnode_config,
|
&fullnode_config,
|
||||||
);
|
);
|
||||||
|
@ -265,12 +268,22 @@ impl LocalCluster {
|
||||||
if fullnode_config.voting_disabled {
|
if fullnode_config.voting_disabled {
|
||||||
self.listener_infos.insert(
|
self.listener_infos.insert(
|
||||||
validator_keypair.pubkey(),
|
validator_keypair.pubkey(),
|
||||||
FullnodeInfo::new(validator_keypair.clone(), ledger_path),
|
FullnodeInfo {
|
||||||
|
keypair: validator_keypair,
|
||||||
|
voting_keypair,
|
||||||
|
storage_keypair,
|
||||||
|
ledger_path,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
self.fullnode_infos.insert(
|
self.fullnode_infos.insert(
|
||||||
validator_keypair.pubkey(),
|
validator_keypair.pubkey(),
|
||||||
FullnodeInfo::new(validator_keypair.clone(), ledger_path),
|
FullnodeInfo {
|
||||||
|
keypair: validator_keypair,
|
||||||
|
voting_keypair,
|
||||||
|
storage_keypair,
|
||||||
|
ledger_path,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -467,13 +480,13 @@ impl Cluster for LocalCluster {
|
||||||
if pubkey == self.entry_point_info.id {
|
if pubkey == self.entry_point_info.id {
|
||||||
self.entry_point_info = node.info.clone();
|
self.entry_point_info = node.info.clone();
|
||||||
}
|
}
|
||||||
let new_voting_keypair = Keypair::new();
|
|
||||||
let restarted_node = Fullnode::new(
|
let restarted_node = Fullnode::new(
|
||||||
node,
|
node,
|
||||||
&fullnode_info.keypair,
|
&fullnode_info.keypair,
|
||||||
&fullnode_info.ledger_path,
|
&fullnode_info.ledger_path,
|
||||||
&new_voting_keypair.pubkey(),
|
&fullnode_info.voting_keypair.pubkey(),
|
||||||
new_voting_keypair,
|
&fullnode_info.voting_keypair,
|
||||||
|
&fullnode_info.storage_keypair,
|
||||||
None,
|
None,
|
||||||
&self.fullnode_config,
|
&self.fullnode_config,
|
||||||
);
|
);
|
||||||
|
|
|
@ -74,7 +74,7 @@ impl ReplayStage {
|
||||||
pub fn new<T>(
|
pub fn new<T>(
|
||||||
my_id: &Pubkey,
|
my_id: &Pubkey,
|
||||||
vote_account: &Pubkey,
|
vote_account: &Pubkey,
|
||||||
voting_keypair: Option<Arc<T>>,
|
voting_keypair: Option<&Arc<T>>,
|
||||||
blocktree: Arc<Blocktree>,
|
blocktree: Arc<Blocktree>,
|
||||||
bank_forks: &Arc<RwLock<BankForks>>,
|
bank_forks: &Arc<RwLock<BankForks>>,
|
||||||
cluster_info: Arc<RwLock<ClusterInfo>>,
|
cluster_info: Arc<RwLock<ClusterInfo>>,
|
||||||
|
@ -105,6 +105,7 @@ impl ReplayStage {
|
||||||
}
|
}
|
||||||
// Start the replay stage loop
|
// Start the replay stage loop
|
||||||
let leader_schedule_cache = leader_schedule_cache.clone();
|
let leader_schedule_cache = leader_schedule_cache.clone();
|
||||||
|
let voting_keypair = voting_keypair.cloned();
|
||||||
let t_replay = Builder::new()
|
let t_replay = Builder::new()
|
||||||
.name("solana-replay-stage".to_string())
|
.name("solana-replay-stage".to_string())
|
||||||
.spawn(move || {
|
.spawn(move || {
|
||||||
|
|
|
@ -57,7 +57,8 @@ impl Tvu {
|
||||||
#[allow(clippy::new_ret_no_self, clippy::too_many_arguments)]
|
#[allow(clippy::new_ret_no_self, clippy::too_many_arguments)]
|
||||||
pub fn new<T>(
|
pub fn new<T>(
|
||||||
vote_account: &Pubkey,
|
vote_account: &Pubkey,
|
||||||
voting_keypair: Option<Arc<T>>,
|
voting_keypair: Option<&Arc<T>>,
|
||||||
|
storage_keypair: &Arc<Keypair>,
|
||||||
bank_forks: &Arc<RwLock<BankForks>>,
|
bank_forks: &Arc<RwLock<BankForks>>,
|
||||||
cluster_info: &Arc<RwLock<ClusterInfo>>,
|
cluster_info: &Arc<RwLock<ClusterInfo>>,
|
||||||
sockets: Sockets,
|
sockets: Sockets,
|
||||||
|
@ -139,13 +140,12 @@ impl Tvu {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
let storage_keypair = Arc::new(Keypair::new());
|
|
||||||
let storage_stage = StorageStage::new(
|
let storage_stage = StorageStage::new(
|
||||||
storage_state,
|
storage_state,
|
||||||
root_slot_receiver,
|
root_slot_receiver,
|
||||||
Some(blocktree),
|
Some(blocktree),
|
||||||
&keypair,
|
&keypair,
|
||||||
&storage_keypair,
|
storage_keypair,
|
||||||
&exit,
|
&exit,
|
||||||
&bank_forks,
|
&bank_forks,
|
||||||
storage_rotate_count,
|
storage_rotate_count,
|
||||||
|
@ -214,10 +214,12 @@ pub mod tests {
|
||||||
let (exit, poh_recorder, poh_service, _entry_receiver) =
|
let (exit, poh_recorder, poh_service, _entry_receiver) =
|
||||||
create_test_recorder(&bank, &blocktree);
|
create_test_recorder(&bank, &blocktree);
|
||||||
let voting_keypair = Keypair::new();
|
let voting_keypair = Keypair::new();
|
||||||
|
let storage_keypair = Arc::new(Keypair::new());
|
||||||
let leader_schedule_cache = Arc::new(LeaderScheduleCache::new_from_bank(&bank));
|
let leader_schedule_cache = Arc::new(LeaderScheduleCache::new_from_bank(&bank));
|
||||||
let tvu = Tvu::new(
|
let tvu = Tvu::new(
|
||||||
&voting_keypair.pubkey(),
|
&voting_keypair.pubkey(),
|
||||||
Some(Arc::new(voting_keypair)),
|
Some(&Arc::new(voting_keypair)),
|
||||||
|
&storage_keypair,
|
||||||
&Arc::new(RwLock::new(bank_forks)),
|
&Arc::new(RwLock::new(bank_forks)),
|
||||||
&cref1,
|
&cref1,
|
||||||
{
|
{
|
||||||
|
|
|
@ -106,13 +106,15 @@ fn test_replay() {
|
||||||
let dr_1 = new_gossip(cref1.clone(), target1.sockets.gossip, &exit);
|
let dr_1 = new_gossip(cref1.clone(), target1.sockets.gossip, &exit);
|
||||||
|
|
||||||
let voting_keypair = Keypair::new();
|
let voting_keypair = Keypair::new();
|
||||||
|
let storage_keypair = Arc::new(Keypair::new());
|
||||||
let blocktree = Arc::new(blocktree);
|
let blocktree = Arc::new(blocktree);
|
||||||
{
|
{
|
||||||
let (poh_service_exit, poh_recorder, poh_service, _entry_receiver) =
|
let (poh_service_exit, poh_recorder, poh_service, _entry_receiver) =
|
||||||
create_test_recorder(&working_bank, &blocktree);
|
create_test_recorder(&working_bank, &blocktree);
|
||||||
let tvu = Tvu::new(
|
let tvu = Tvu::new(
|
||||||
&voting_keypair.pubkey(),
|
&voting_keypair.pubkey(),
|
||||||
Some(Arc::new(voting_keypair)),
|
Some(&Arc::new(voting_keypair)),
|
||||||
|
&storage_keypair,
|
||||||
&bank_forks,
|
&bank_forks,
|
||||||
&cref1,
|
&cref1,
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,6 +59,14 @@ fn main() {
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.help("File containing the authorized voting keypair"),
|
.help("File containing the authorized voting keypair"),
|
||||||
)
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("storage_keypair")
|
||||||
|
.long("storage-keypair")
|
||||||
|
.value_name("PATH")
|
||||||
|
.takes_value(true)
|
||||||
|
.required(true)
|
||||||
|
.help("File containing the storage account keypair"),
|
||||||
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("init_complete_file")
|
Arg::with_name("init_complete_file")
|
||||||
.long("init-complete-file")
|
.long("init-complete-file")
|
||||||
|
@ -167,6 +175,14 @@ fn main() {
|
||||||
} else {
|
} else {
|
||||||
Keypair::new()
|
Keypair::new()
|
||||||
};
|
};
|
||||||
|
let storage_keypair = if let Some(storage_keypair) = matches.value_of("storage_keypair") {
|
||||||
|
read_keypair(storage_keypair).unwrap_or_else(|err| {
|
||||||
|
eprintln!("{}: Unable to open keypair file: {}", err, storage_keypair);
|
||||||
|
exit(1);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
Keypair::new()
|
||||||
|
};
|
||||||
|
|
||||||
let staking_account = matches
|
let staking_account = matches
|
||||||
.value_of("staking_account")
|
.value_of("staking_account")
|
||||||
|
@ -241,7 +257,8 @@ fn main() {
|
||||||
&keypair,
|
&keypair,
|
||||||
ledger_path,
|
ledger_path,
|
||||||
&staking_account,
|
&staking_account,
|
||||||
voting_keypair,
|
&Arc::new(voting_keypair),
|
||||||
|
&Arc::new(storage_keypair),
|
||||||
cluster_entrypoint.as_ref(),
|
cluster_entrypoint.as_ref(),
|
||||||
&fullnode_config,
|
&fullnode_config,
|
||||||
);
|
);
|
||||||
|
|
|
@ -225,6 +225,8 @@ if [[ $node_type = bootstrap_leader ]]; then
|
||||||
fullnode_vote_keypair_path="$SOLANA_CONFIG_DIR"/bootstrap-leader-vote-keypair.json
|
fullnode_vote_keypair_path="$SOLANA_CONFIG_DIR"/bootstrap-leader-vote-keypair.json
|
||||||
ledger_config_dir="$SOLANA_CONFIG_DIR"/bootstrap-leader-ledger
|
ledger_config_dir="$SOLANA_CONFIG_DIR"/bootstrap-leader-ledger
|
||||||
accounts_config_dir="$SOLANA_CONFIG_DIR"/bootstrap-leader-accounts
|
accounts_config_dir="$SOLANA_CONFIG_DIR"/bootstrap-leader-accounts
|
||||||
|
fullnode_storage_keypair_path=$SOLANA_CONFIG_DIR/bootstrap-leader-storage-keypair.json
|
||||||
|
|
||||||
|
|
||||||
default_arg --rpc-port 8899
|
default_arg --rpc-port 8899
|
||||||
default_arg --rpc-drone-address 127.0.0.1:9900
|
default_arg --rpc-drone-address 127.0.0.1:9900
|
||||||
|
@ -240,7 +242,7 @@ elif [[ $node_type = replicator ]]; then
|
||||||
shift "$shift"
|
shift "$shift"
|
||||||
|
|
||||||
replicator_keypair_path=$SOLANA_CONFIG_DIR/replicator-id.json
|
replicator_keypair_path=$SOLANA_CONFIG_DIR/replicator-id.json
|
||||||
replicator_storage_keypair_path="$SOLANA_CONFIG_DIR"/replicator-vote-id.json
|
replicator_storage_keypair_path="$SOLANA_CONFIG_DIR"/replicator-storage-id.json
|
||||||
ledger_config_dir=$SOLANA_CONFIG_DIR/replicator-ledger
|
ledger_config_dir=$SOLANA_CONFIG_DIR/replicator-ledger
|
||||||
|
|
||||||
mkdir -p "$SOLANA_CONFIG_DIR"
|
mkdir -p "$SOLANA_CONFIG_DIR"
|
||||||
|
@ -252,7 +254,7 @@ elif [[ $node_type = replicator ]]; then
|
||||||
|
|
||||||
default_arg --entrypoint "$entrypoint_address"
|
default_arg --entrypoint "$entrypoint_address"
|
||||||
default_arg --identity "$replicator_keypair_path"
|
default_arg --identity "$replicator_keypair_path"
|
||||||
default_arg --storage_id "$replicator_storage_keypair_path"
|
default_arg --storage-keypair "$replicator_storage_keypair_path"
|
||||||
default_arg --ledger "$ledger_config_dir"
|
default_arg --ledger "$ledger_config_dir"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -266,6 +268,7 @@ else
|
||||||
: "${fullnode_keypair_path:=$SOLANA_CONFIG_DIR/fullnode-keypair$label.json}"
|
: "${fullnode_keypair_path:=$SOLANA_CONFIG_DIR/fullnode-keypair$label.json}"
|
||||||
fullnode_vote_keypair_path=$SOLANA_CONFIG_DIR/fullnode-vote-keypair$label.json
|
fullnode_vote_keypair_path=$SOLANA_CONFIG_DIR/fullnode-vote-keypair$label.json
|
||||||
fullnode_stake_keypair_path=$SOLANA_CONFIG_DIR/fullnode-stake-keypair$label.json
|
fullnode_stake_keypair_path=$SOLANA_CONFIG_DIR/fullnode-stake-keypair$label.json
|
||||||
|
fullnode_storage_keypair_path=$SOLANA_CONFIG_DIR/fullnode-storage-keypair$label.json
|
||||||
ledger_config_dir=$SOLANA_CONFIG_DIR/fullnode-ledger$label
|
ledger_config_dir=$SOLANA_CONFIG_DIR/fullnode-ledger$label
|
||||||
accounts_config_dir=$SOLANA_CONFIG_DIR/fullnode-accounts$label
|
accounts_config_dir=$SOLANA_CONFIG_DIR/fullnode-accounts$label
|
||||||
|
|
||||||
|
@ -273,6 +276,7 @@ else
|
||||||
[[ -r "$fullnode_keypair_path" ]] || $solana_keygen -o "$fullnode_keypair_path"
|
[[ -r "$fullnode_keypair_path" ]] || $solana_keygen -o "$fullnode_keypair_path"
|
||||||
[[ -r "$fullnode_vote_keypair_path" ]] || $solana_keygen -o "$fullnode_vote_keypair_path"
|
[[ -r "$fullnode_vote_keypair_path" ]] || $solana_keygen -o "$fullnode_vote_keypair_path"
|
||||||
[[ -r "$fullnode_stake_keypair_path" ]] || $solana_keygen -o "$fullnode_stake_keypair_path"
|
[[ -r "$fullnode_stake_keypair_path" ]] || $solana_keygen -o "$fullnode_stake_keypair_path"
|
||||||
|
[[ -r "$fullnode_storage_keypair_path" ]] || $solana_keygen -o "$fullnode_storage_keypair_path"
|
||||||
|
|
||||||
default_arg --entrypoint "$entrypoint_address"
|
default_arg --entrypoint "$entrypoint_address"
|
||||||
default_arg --rpc-drone-address "${entrypoint_address%:*}:9900"
|
default_arg --rpc-drone-address "${entrypoint_address%:*}:9900"
|
||||||
|
@ -308,6 +312,7 @@ EOF
|
||||||
default_arg --identity "$fullnode_keypair_path"
|
default_arg --identity "$fullnode_keypair_path"
|
||||||
default_arg --voting-keypair "$fullnode_vote_keypair_path"
|
default_arg --voting-keypair "$fullnode_vote_keypair_path"
|
||||||
default_arg --vote-account "$fullnode_vote_pubkey"
|
default_arg --vote-account "$fullnode_vote_pubkey"
|
||||||
|
default_arg --storage-keypair "$fullnode_storage_keypair_path"
|
||||||
default_arg --ledger "$ledger_config_dir"
|
default_arg --ledger "$ledger_config_dir"
|
||||||
default_arg --accounts "$accounts_config_dir"
|
default_arg --accounts "$accounts_config_dir"
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ $solana_keygen -o "$SOLANA_CONFIG_DIR"/mint-keypair.json
|
||||||
$solana_keygen -o "$SOLANA_CONFIG_DIR"/bootstrap-leader-keypair.json
|
$solana_keygen -o "$SOLANA_CONFIG_DIR"/bootstrap-leader-keypair.json
|
||||||
$solana_keygen -o "$SOLANA_CONFIG_DIR"/bootstrap-leader-vote-keypair.json
|
$solana_keygen -o "$SOLANA_CONFIG_DIR"/bootstrap-leader-vote-keypair.json
|
||||||
$solana_keygen -o "$SOLANA_CONFIG_DIR"/bootstrap-leader-stake-keypair.json
|
$solana_keygen -o "$SOLANA_CONFIG_DIR"/bootstrap-leader-stake-keypair.json
|
||||||
|
$solana_keygen -o "$SOLANA_CONFIG_DIR"/bootstrap-leader-storage-keypair.json
|
||||||
|
|
||||||
args=("$@")
|
args=("$@")
|
||||||
default_arg --bootstrap-leader-keypair "$SOLANA_CONFIG_DIR"/bootstrap-leader-keypair.json
|
default_arg --bootstrap-leader-keypair "$SOLANA_CONFIG_DIR"/bootstrap-leader-keypair.json
|
||||||
|
|
|
@ -42,8 +42,8 @@ fn main() {
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("storage_keypair")
|
Arg::with_name("storage_keypair")
|
||||||
.short("s")
|
.short("s")
|
||||||
.long("storage_id")
|
.long("storage-keypair")
|
||||||
.value_name("DIR")
|
.value_name("PATH")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.required(true)
|
.required(true)
|
||||||
.help("File containing the storage account keypair"),
|
.help("File containing the storage account keypair"),
|
||||||
|
|
Loading…
Reference in New Issue