Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
5a9b5ba
renamed narwhal_primary_address and narwhal_worker_address
hmoog Oct 9, 2024
5aa96d4
fixed rustfmt remarks
hmoog Oct 9, 2024
a486a02
fixed more rustfmt remarks
hmoog Oct 9, 2024
468950a
renamed additional files
hmoog Oct 9, 2024
97e7556
cleaned up comments in move
hmoog Oct 9, 2024
6a65954
started removing worker_address
hmoog Oct 9, 2024
e4a4d7e
Make PubKey naming more sane.
piotrm50 Oct 15, 2024
bfcc1fa
More renames
piotrm50 Oct 15, 2024
25141a8
Continue renaming, including missed renames.
piotrm50 Oct 16, 2024
9b556ee
Continue renaming in Move files
piotrm50 Oct 16, 2024
b1f3a04
Revert incorrect format
piotrm50 Oct 16, 2024
222381e
Merge branch 'develop' of github.com:iotaledger/iota into core-node/r…
hmoog Oct 16, 2024
cf5dbbb
Cleanup some yaml files
piotrm50 Oct 16, 2024
d7d54c4
Fix cargo fmt issues
piotrm50 Oct 16, 2024
72d8849
Merge branch 'develop' into core-node/remove-narwhal-fields
piotrm50 Oct 16, 2024
4aab255
addressed fmt issues
hmoog Oct 16, 2024
9e69ab0
Fix rustfmt
piotrm50 Oct 16, 2024
7c6aa51
Cleanup naming
piotrm50 Oct 16, 2024
969d1ac
Merge branch 'develop' of github.com:iotaledger/iota into core-node/r…
hmoog Oct 16, 2024
ca8be9e
addressed fmt issues
hmoog Oct 16, 2024
b00ff14
addressed clippy errors
hmoog Oct 16, 2024
9059087
Merge branch 'develop' into core-node/remove-narwhal-fields
hmoog Oct 16, 2024
ec661a2
Update crates/iota-config/src/node.rs
piotrm50 Oct 17, 2024
c3a3d2b
Remove unused consensus parameter.
piotrm50 Oct 17, 2024
ecae9ee
Address review comments.
piotrm50 Oct 17, 2024
a692fd1
Merge remote-tracking branch 'origin/develop' into core-node/remove-n…
piotrm50 Oct 17, 2024
d3b74c1
Address review comments and rename missed occurrences.
piotrm50 Oct 18, 2024
55511c5
Remove worker address from iptables.yaml
piotrm50 Oct 18, 2024
754e35b
Add a comment explaining `primary_address` field.
piotrm50 Oct 18, 2024
861085a
Address review comments and missed renames
piotrm50 Oct 21, 2024
9a66123
Merge remote-tracking branch 'origin/develop' into core-node/remove-n…
piotrm50 Oct 21, 2024
b0d5d4f
Fix dprint
piotrm50 Oct 21, 2024
556ad88
Merge remote-tracking branch 'origin/develop' into core-node/remove-n…
piotrm50 Oct 21, 2024
6d62e4c
Merge branch 'develop' into core-node/remove-narwhal-fields
alexsporn Oct 21, 2024
da43101
Another round of missed renames
piotrm50 Oct 22, 2024
d68d186
Yet another round of missed renames
piotrm50 Oct 22, 2024
a92f4df
Merge remote-tracking branch 'origin/develop' into core-node/remove-n…
piotrm50 Oct 22, 2024
f495655
Update manifest.json
piotrm50 Oct 22, 2024
2386454
Fix docs
piotrm50 Oct 22, 2024
006c775
Merge branch 'develop' into core-node/remove-narwhal-fields
piotrm50 Oct 22, 2024
929a385
Regenerate all snapshots
piotrm50 Oct 22, 2024
2dce884
generated auto-generated files
hmoog Oct 22, 2024
5c2bf03
Merge branch 'develop' into core-node/remove-narwhal-fields
hmoog Oct 22, 2024
801de10
Merge remote-tracking branch 'origin/develop' into core-node/remove-n…
piotrm50 Oct 22, 2024
100f352
Merge branch 'develop' into core-node/remove-narwhal-fields
hmoog Oct 22, 2024
fded3c4
Revert graphql auto-generated changes and generate files script
piotrm50 Oct 22, 2024
8a33367
Update crates/iota-framework/packages/iota-system/sources/validator.move
piotrm50 Oct 22, 2024
057b1b8
Merge branch 'develop' into core-node/remove-narwhal-fields
piotrm50 Oct 23, 2024
d518dc1
fix(iota-graphql-{rpc,e2e-tests}): restore tests (#3572)
kodemartin Oct 23, 2024
a709928
Merge branch 'develop' into core-node/remove-narwhal-fields
kodemartin Oct 23, 2024
9a201dd
chore(iota-framework-snapshot): update manifest
kodemartin Oct 23, 2024
14de82a
fix(iota-graphql-e2e-tests): update baselines and source files
kodemartin Oct 23, 2024
4657e0b
chore(iota-graphql-e2e-tests): comment digest resolution in event_con…
kodemartin Oct 23, 2024
c2a61b4
Merge branch 'develop' into core-node/remove-narwhal-fields
alexsporn Oct 23, 2024
be143d6
chore(swarm-config): re-generated snapshots
alexsporn Oct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions consensus/config/src/committee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,14 @@ pub struct Authority {
pub address: Multiaddr,
/// The authority's hostname, for metrics and logging.
pub hostname: String,
/// The authority's public key as Iota identity.
/// The public key bytes corresponding to the private key that the validator
/// holds to sign transactions.
pub authority_key: AuthorityPublicKey,
/// The authority's public key for verifying blocks.
/// The public key bytes corresponding to the private key that the validator
/// holds to sign consensus blocks.
pub protocol_key: ProtocolPublicKey,
/// The authority's public key for TLS and as network identity.
/// The public key bytes corresponding to the private key that the validator
/// uses to establish TLS connections.
pub network_key: NetworkPublicKey,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/iota-benchmark/src/benchmark_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl Env {
for v in cluster.swarm.config().validator_configs() {
eprintln!(
"Metric address for validator {}: {}",
v.protocol_public_key().concise(),
v.authority_public_key().concise(),
v.metrics_address
);
}
Expand Down
10 changes: 5 additions & 5 deletions crates/iota-bridge-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,10 @@ async fn main() -> anyhow::Result<()> {
.active_validators
.into_iter()
.map(|summary| {
let protocol_key =
AuthorityPublicKeyBytes::from_bytes(&summary.protocol_pubkey_bytes)
let authority_key =
AuthorityPublicKeyBytes::from_bytes(&summary.authority_pubkey_bytes)
.unwrap();
(summary.iota_address, (protocol_key, summary.name))
(summary.iota_address, (authority_key, summary.name))
})
.collect::<HashMap<_, _>>();
let mut authorities = vec![];
Expand Down Expand Up @@ -326,8 +326,8 @@ async fn main() -> anyhow::Result<()> {
};
let url = url.to_string();

let (protocol_key, name) = names.get(&iota_address).unwrap();
let stake = stakes.get(protocol_key).unwrap();
let (authority_key, name) = names.get(&iota_address).unwrap();
let stake = stakes.get(authority_key).unwrap();
authorities.push((name, iota_address, pubkey, eth_address, url, stake));
}
let total_stake = authorities
Expand Down
8 changes: 4 additions & 4 deletions crates/iota-config/data/fullnode-template-with-path.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ authority-store-pruning-config:
max-transactions-in-batch: 1000
pruning-run-delay-seconds: 60

protocol-key-pair:
path: "protocol.key"
authority-key-pair:
path: "authority.key"
network-key-pair:
path: "network.key"
account-key-pair:
path: "account.key"
worker-key-pair:
path: "worker.key"
protocol-key-pair:
path: "protocol.key"
49 changes: 25 additions & 24 deletions crates/iota-config/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,18 @@ pub const DEFAULT_COMMISSION_RATE: u64 = 200;
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
pub struct NodeConfig {
/// The public key bytes corresponding to the private key that the validator
/// holds to sign transactions.
#[serde(default = "default_authority_key_pair")]
pub protocol_key_pair: AuthorityKeyPairWithPath,
pub authority_key_pair: AuthorityKeyPairWithPath,
/// The public key bytes corresponding to the private key that the validator
/// holds to sign consensus blocks.
#[serde(default = "default_key_pair")]
pub worker_key_pair: KeyPairWithPath,
pub protocol_key_pair: KeyPairWithPath,
#[serde(default = "default_key_pair")]
pub account_key_pair: KeyPairWithPath,
/// The public key bytes corresponding to the private key that the validator
/// uses to establish TLS connections.
#[serde(default = "default_key_pair")]
pub network_key_pair: KeyPairWithPath,
pub db_path: PathBuf,
Expand Down Expand Up @@ -367,15 +373,15 @@ fn is_true(value: &bool) -> bool {
impl Config for NodeConfig {}

impl NodeConfig {
pub fn protocol_key_pair(&self) -> &AuthorityKeyPair {
self.protocol_key_pair.authority_keypair()
pub fn authority_key_pair(&self) -> &AuthorityKeyPair {
self.authority_key_pair.authority_keypair()
}

pub fn worker_key_pair(&self) -> &NetworkKeyPair {
match self.worker_key_pair.keypair() {
pub fn protocol_key_pair(&self) -> &NetworkKeyPair {
match self.protocol_key_pair.keypair() {
IotaKeyPair::Ed25519(kp) => kp,
other => panic!(
"invalid keypair type: {:?}, only Ed25519 is allowed for worker key",
"invalid keypair type: {:?}, only Ed25519 is allowed for protocol key",
other
),
}
Expand All @@ -391,8 +397,8 @@ impl NodeConfig {
}
}

pub fn protocol_public_key(&self) -> AuthorityPublicKeyBytes {
self.protocol_key_pair().public().into()
pub fn authority_public_key(&self) -> AuthorityPublicKeyBytes {
self.authority_key_pair().public().into()
}

pub fn db_path(&self) -> PathBuf {
Expand Down Expand Up @@ -503,16 +509,10 @@ pub struct ConsensusConfig {
/// estimates.
pub submit_delay_step_override_millis: Option<u64>,

pub address: Multiaddr,

pub parameters: Option<ConsensusParameters>,
}

impl ConsensusConfig {
pub fn address(&self) -> &Multiaddr {
&self.address
}

pub fn db_path(&self) -> &Path {
&self.db_path
}
Expand Down Expand Up @@ -1169,17 +1169,18 @@ mod tests {

#[test]
fn load_key_pairs_to_node_config() {
let protocol_key_pair: AuthorityKeyPair =
let authority_key_pair: AuthorityKeyPair =
get_key_pair_from_rng(&mut StdRng::from_seed([0; 32])).1;
let worker_key_pair: NetworkKeyPair =
let protocol_key_pair: NetworkKeyPair =
get_key_pair_from_rng(&mut StdRng::from_seed([0; 32])).1;
let network_key_pair: NetworkKeyPair =
get_key_pair_from_rng(&mut StdRng::from_seed([0; 32])).1;

write_authority_keypair_to_file(&protocol_key_pair, PathBuf::from("protocol.key")).unwrap();
write_authority_keypair_to_file(&authority_key_pair, PathBuf::from("authority.key"))
.unwrap();
write_keypair_to_file(
&IotaKeyPair::Ed25519(worker_key_pair.copy()),
PathBuf::from("worker.key"),
&IotaKeyPair::Ed25519(protocol_key_pair.copy()),
PathBuf::from("protocol.key"),
)
.unwrap();
write_keypair_to_file(
Expand All @@ -1191,16 +1192,16 @@ mod tests {
const TEMPLATE: &str = include_str!("../data/fullnode-template-with-path.yaml");
let template: NodeConfig = serde_yaml::from_str(TEMPLATE).unwrap();
assert_eq!(
template.protocol_key_pair().public(),
protocol_key_pair.public()
template.authority_key_pair().public(),
authority_key_pair.public()
);
assert_eq!(
template.network_key_pair().public(),
network_key_pair.public()
);
assert_eq!(
template.worker_key_pair().public(),
worker_key_pair.public()
template.protocol_key_pair().public(),
protocol_key_pair.public()
);
}
}
Expand Down
Loading
Loading