Skip to content

Commit

Permalink
[genesis] Remove name and operator name
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnazario authored and aptos-bot committed May 5, 2022
1 parent 39852b1 commit 198ca9e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
7 changes: 0 additions & 7 deletions aptos-move/vm-genesis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,17 +352,13 @@ pub fn test_genesis_change_set_and_validators(
pub struct Validator {
/// The Aptos account address of the validator
pub address: AccountAddress,
/// UTF8-encoded name for the validator
pub name: Vec<u8>,
/// Authentication key for the validator
pub auth_key: AuthenticationKey,
/// Ed25519 public key used to sign consensus messages
pub consensus_pubkey: Vec<u8>,
/// The Aptos account address of the validator's operator (same as `address` if the validator is
/// its own operator)
pub operator_address: AccountAddress,
/// UTF8-encoded name of the operator
pub operator_name: Vec<u8>,
/// Authentication key for the operator
pub operator_auth_key: AuthenticationKey,
/// `NetworkAddress` for the validator
Expand Down Expand Up @@ -392,17 +388,14 @@ impl TestValidator {
let consensus_pubkey = key.public_key().to_bytes().to_vec();
let operator_auth_key = auth_key;
let operator_address = operator_auth_key.derived_address();
let operator_name = name.clone();
let network_address = [0u8; 0].to_vec();
let full_node_network_address = [0u8; 0].to_vec();

let data = Validator {
address,
name,
auth_key,
consensus_pubkey,
operator_address,
operator_name,
operator_auth_key,
network_address,
full_node_network_address,
Expand Down
3 changes: 0 additions & 3 deletions config/management/genesis/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ impl<S: KVStorage> GenesisBuilder<S> {
AuthenticationKey::ed25519(&k)
});
let operator = self.operator(owner)?;
let operator_name = operator.as_bytes().to_vec();
let operator_auth_key = AuthenticationKey::ed25519(&self.operator_key(&operator)?);
let operator_address = operator_auth_key.derived_address();
let validator_config = self.validator_config(&operator)?;
Expand All @@ -130,11 +129,9 @@ impl<S: KVStorage> GenesisBuilder<S> {
let full_node_network_address = bcs::from_bytes(&validator_config.args()[3])?;
validators.push(Validator {
address,
name,
auth_key,
consensus_pubkey,
operator_address,
operator_name,
operator_auth_key,
network_address,
full_node_network_address,
Expand Down
2 changes: 0 additions & 2 deletions crates/aptos/src/genesis/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ impl From<ValidatorConfiguration> for Validator {

Validator {
address: auth_key.derived_address(),
name: vec![], // TODO: To remove
consensus_pubkey: bcs::to_bytes(&config.consensus_key).unwrap(),
operator_address: auth_key.derived_address(),
operator_name: vec![], // TODO: To remove
network_address: bcs::to_bytes(&validator_addresses).unwrap(),
full_node_network_address: bcs::to_bytes(&full_node_addresses).unwrap(),
operator_auth_key: auth_key,
Expand Down

0 comments on commit 198ca9e

Please sign in to comment.