diff --git a/crates/iota-core/src/test_utils.rs b/crates/iota-core/src/test_utils.rs index 4a215adf02a..b88068d38b1 100644 --- a/crates/iota-core/src/test_utils.rs +++ b/crates/iota-core/src/test_utils.rs @@ -235,7 +235,7 @@ async fn init_genesis( commission_rate: 0, network_address: local_ip_utils::new_local_tcp_address_for_testing(), p2p_address: local_ip_utils::new_local_udp_address_for_testing(), - primary_address: local_ip_utils::new_local_udp_address_for_testing(), + primary_address: local_ip_utils::new_local_tcp_address_for_testing(), description: String::new(), image_url: String::new(), project_url: String::new(), diff --git a/crates/iota-framework/packages/iota-system/tests/iota_system_tests.move b/crates/iota-framework/packages/iota-system/tests/iota_system_tests.move index 18d51aaff4b..2173259c6e6 100644 --- a/crates/iota-framework/packages/iota-system/tests/iota_system_tests.move +++ b/crates/iota-framework/packages/iota-system/tests/iota_system_tests.move @@ -365,7 +365,7 @@ module iota_system::iota_system_tests { system_state.update_validator_project_url(b"new_project_url", ctx); system_state.update_candidate_validator_network_address(network_address, ctx); system_state.update_candidate_validator_p2p_address(p2p_address, ctx); - system_state.update_candidate_validator_primary_address(b"/ip4/127.0.0.1/udp/80", ctx); + system_state.update_candidate_validator_primary_address(b"/ip4/127.0.0.1/tcp/80", ctx); system_state.update_candidate_validator_authority_pubkey( authority_pub_key, pop, @@ -428,7 +428,7 @@ module iota_system::iota_system_tests { system_state.update_validator_project_url(b"new_project_url", ctx); system_state.update_validator_next_epoch_network_address(network_address, ctx); system_state.update_validator_next_epoch_p2p_address(p2p_address, ctx); - system_state.update_validator_next_epoch_primary_address(b"/ip4/168.168.168.168/udp/80", ctx); + system_state.update_validator_next_epoch_primary_address(b"/ip4/168.168.168.168/tcp/80", ctx); system_state.update_validator_next_epoch_authority_pubkey( authority_pub_key, pop, @@ -470,7 +470,7 @@ module iota_system::iota_system_tests { // Next epoch assert!(validator.next_epoch_network_address() == &option::some(new_network_address.to_string())); assert!(validator.next_epoch_p2p_address() == &option::some(new_p2p_address.to_string())); - assert!(validator.next_epoch_primary_address() == &option::some(b"/ip4/168.168.168.168/udp/80".to_string())); + assert!(validator.next_epoch_primary_address() == &option::some(b"/ip4/168.168.168.168/tcp/80".to_string())); assert!( validator.next_epoch_authority_pubkey_bytes() == &option::some(new_authority_pub_key), 0 diff --git a/crates/iota-framework/packages/iota-system/tests/validator_tests.move b/crates/iota-framework/packages/iota-system/tests/validator_tests.move index 99e992fd21c..10014877010 100644 --- a/crates/iota-framework/packages/iota-system/tests/validator_tests.move +++ b/crates/iota-framework/packages/iota-system/tests/validator_tests.move @@ -338,7 +338,7 @@ module iota_system::validator_tests { { validator.update_next_epoch_network_address(b"/ip4/192.168.1.1/tcp/80"); validator.update_next_epoch_p2p_address(b"/ip4/192.168.1.1/udp/80"); - validator.update_next_epoch_primary_address(b"/ip4/192.168.1.1/udp/80"); + validator.update_next_epoch_primary_address(b"/ip4/192.168.1.1/tcp/80"); validator.update_next_epoch_authority_pubkey(new_authority_pub_key, new_pop); validator.update_next_epoch_protocol_pubkey(new_protocol_pub_key); validator.update_next_epoch_network_pubkey(new_network_pub_key); @@ -367,7 +367,7 @@ module iota_system::validator_tests { // Next epoch assert!(validator.next_epoch_network_address() == &option::some(b"/ip4/192.168.1.1/tcp/80".to_string())); assert!(validator.next_epoch_p2p_address() == &option::some(b"/ip4/192.168.1.1/udp/80".to_string())); - assert!(validator.next_epoch_primary_address() == &option::some(b"/ip4/192.168.1.1/udp/80".to_string())); + assert!(validator.next_epoch_primary_address() == &option::some(b"/ip4/192.168.1.1/tcp/80".to_string())); assert!( validator.next_epoch_authority_pubkey_bytes() == &option::some(new_authority_pub_key), 0 diff --git a/crates/iota-genesis-builder/src/lib.rs b/crates/iota-genesis-builder/src/lib.rs index ac464c309ce..e72e1d3fd9d 100644 --- a/crates/iota-genesis-builder/src/lib.rs +++ b/crates/iota-genesis-builder/src/lib.rs @@ -1783,7 +1783,7 @@ mod test { commission_rate: DEFAULT_COMMISSION_RATE, network_address: local_ip_utils::new_local_tcp_address_for_testing(), p2p_address: local_ip_utils::new_local_udp_address_for_testing(), - primary_address: local_ip_utils::new_local_udp_address_for_testing(), + primary_address: local_ip_utils::new_local_tcp_address_for_testing(), description: String::new(), image_url: String::new(), project_url: String::new(), diff --git a/crates/iota-graphql-e2e-tests/tests/transactions/system.exp b/crates/iota-graphql-e2e-tests/tests/transactions/system.exp index bdad7857c2f..6ce2c77e8ea 100644 --- a/crates/iota-graphql-e2e-tests/tests/transactions/system.exp +++ b/crates/iota-graphql-e2e-tests/tests/transactions/system.exp @@ -881,7 +881,7 @@ Response: { }, "net_address": "/ip4/127.0.0.1/tcp/8000/http", "p2p_address": "/ip4/127.0.0.1/udp/8001/http", - "primary_address": "/ip4/127.0.0.1/udp/8003/http", + "primary_address": "/ip4/127.0.0.1/tcp/8003/http", "next_epoch_authority_pubkey_bytes": null, "next_epoch_proof_of_possession": null, "next_epoch_network_pubkey_bytes": null, diff --git a/crates/iota-swarm-config/tests/snapshot_tests.rs b/crates/iota-swarm-config/tests/snapshot_tests.rs index 2994f8d0ad1..b9e85083172 100644 --- a/crates/iota-swarm-config/tests/snapshot_tests.rs +++ b/crates/iota-swarm-config/tests/snapshot_tests.rs @@ -75,7 +75,7 @@ fn populated_genesis_snapshot_matches() { commission_rate: DEFAULT_COMMISSION_RATE, network_address: "/ip4/127.0.0.1/tcp/80".parse().unwrap(), p2p_address: "/ip4/127.0.0.1/udp/80".parse().unwrap(), - primary_address: "/ip4/127.0.0.1/udp/80".parse().unwrap(), + primary_address: "/ip4/127.0.0.1/tcp/80".parse().unwrap(), description: String::new(), image_url: String::new(), project_url: String::new(), diff --git a/crates/iota-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap b/crates/iota-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap index c4a877d419f..740ea824c75 100644 --- a/crates/iota-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap +++ b/crates/iota-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap @@ -234,7 +234,7 @@ validators: project_url: "" net_address: /ip4/127.0.0.1/tcp/80 p2p_address: /ip4/127.0.0.1/udp/80 - primary_address: /ip4/127.0.0.1/udp/80 + primary_address: /ip4/127.0.0.1/tcp/80 next_epoch_authority_pubkey_bytes: ~ next_epoch_proof_of_possession: ~ next_epoch_network_pubkey_bytes: ~ diff --git a/crates/iota/src/fire_drill.rs b/crates/iota/src/fire_drill.rs index 371ccc33407..8ca23f6bafb 100644 --- a/crates/iota/src/fire_drill.rs +++ b/crates/iota/src/fire_drill.rs @@ -203,10 +203,10 @@ async fn update_next_epoch_metadata( let mut new_primary_addresses = Multiaddr::try_from(self_validator.primary_address.clone()).unwrap(); info!("Current primary address: {:?}", new_primary_addresses); - // pop out udp + // pop out tcp new_primary_addresses.pop().unwrap(); let new_port = local_ip_utils::get_available_port(&localhost); - new_primary_addresses.push(Protocol::Udp(new_port)); + new_primary_addresses.push(Protocol::Tcp(new_port)); info!("New primary address: {:?}", new_primary_addresses); // Save new config diff --git a/crates/iota/src/generate_genesis_checkpoint.rs b/crates/iota/src/generate_genesis_checkpoint.rs index 3f73081f419..d5ca0009a86 100644 --- a/crates/iota/src/generate_genesis_checkpoint.rs +++ b/crates/iota/src/generate_genesis_checkpoint.rs @@ -35,7 +35,7 @@ async fn main() { commission_rate: iota_config::node::DEFAULT_COMMISSION_RATE, network_address: local_ip_utils::new_local_tcp_address_for_testing(), p2p_address: local_ip_utils::new_local_udp_address_for_testing(), - primary_address: local_ip_utils::new_local_udp_address_for_testing(), + primary_address: local_ip_utils::new_local_tcp_address_for_testing(), description: String::new(), image_url: String::new(), project_url: String::new(), diff --git a/crates/iota/src/genesis_ceremony.rs b/crates/iota/src/genesis_ceremony.rs index 162acf416ce..105c23cab51 100644 --- a/crates/iota/src/genesis_ceremony.rs +++ b/crates/iota/src/genesis_ceremony.rs @@ -390,7 +390,7 @@ mod test { commission_rate: iota_config::node::DEFAULT_COMMISSION_RATE, network_address: local_ip_utils::new_local_tcp_address_for_testing(), p2p_address: local_ip_utils::new_local_udp_address_for_testing(), - primary_address: local_ip_utils::new_local_udp_address_for_testing(), + primary_address: local_ip_utils::new_local_tcp_address_for_testing(), description: String::new(), image_url: String::new(), project_url: String::new(), diff --git a/docker/iota-network/genesis/compose-validators.yaml b/docker/iota-network/genesis/compose-validators.yaml index 0c6fab83fc7..55c36dcc207 100644 --- a/docker/iota-network/genesis/compose-validators.yaml +++ b/docker/iota-network/genesis/compose-validators.yaml @@ -17,7 +17,7 @@ validator_config_info: - commission_rate: 0 gas_price: 1000 name: validator1 - primary_address: /dns/validator1/udp/8081 + primary_address: /dns/validator1/tcp/8081 network_address: /dns/validator1/tcp/8080/http p2p_address: /dns/validator1/udp/8084 stake: 20000000000000000 @@ -26,21 +26,21 @@ validator_config_info: - commission_rate: 0 gas_price: 1000 name: validator2 - primary_address: /dns/validator2/udp/8081 + primary_address: /dns/validator2/tcp/8081 network_address: /dns/validator2/tcp/8080/http p2p_address: /dns/validator2/udp/8084 stake: 20000000000000000 - commission_rate: 0 gas_price: 1000 name: validator3 - primary_address: /dns/validator3/udp/8081 + primary_address: /dns/validator3/tcp/8081 network_address: /dns/validator3/tcp/8080/http p2p_address: /dns/validator3/udp/8084 stake: 20000000000000000 - commission_rate: 0 gas_price: 1000 name: validator4 - primary_address: /dns/validator4/udp/8081 + primary_address: /dns/validator4/tcp/8081 network_address: /dns/validator4/tcp/8080/http p2p_address: /dns/validator4/udp/8084 stake: 20000000000000000 diff --git a/docker/iota-private-network/configs/genesis-template.yaml b/docker/iota-private-network/configs/genesis-template.yaml index 1650e388275..c0cefce1ad9 100644 --- a/docker/iota-private-network/configs/genesis-template.yaml +++ b/docker/iota-private-network/configs/genesis-template.yaml @@ -20,28 +20,28 @@ validator_config_info: - commission_rate: 0 gas_price: 1000 name: validator-1 - primary_address: /dns/validator-1/udp/8081 + primary_address: /dns/validator-1/tcp/8081 network_address: /dns/validator-1/tcp/8080/http p2p_address: /dns/validator-1/udp/8084 stake: 20000000000000000 - commission_rate: 0 gas_price: 1000 name: validator-2 - primary_address: /dns/validator-2/udp/8081 + primary_address: /dns/validator-2/tcp/8081 network_address: /dns/validator-2/tcp/8080/http p2p_address: /dns/validator-2/udp/8084 stake: 20000000000000000 - commission_rate: 0 gas_price: 1000 name: validator-3 - primary_address: /dns/validator-3/udp/8081 + primary_address: /dns/validator-3/tcp/8081 network_address: /dns/validator-3/tcp/8080/http p2p_address: /dns/validator-3/udp/8084 stake: 20000000000000000 - commission_rate: 0 gas_price: 1000 name: validator-4 - primary_address: /dns/validator-4/udp/8081 + primary_address: /dns/validator-4/tcp/8081 network_address: /dns/validator-4/tcp/8080/http p2p_address: /dns/validator-4/udp/8084 stake: 20000000000000000 diff --git a/docs/content/references/cli/validator.mdx b/docs/content/references/cli/validator.mdx index e2764f8e699..f6953d33abe 100644 --- a/docs/content/references/cli/validator.mdx +++ b/docs/content/references/cli/validator.mdx @@ -179,7 +179,7 @@ $ iota validator display-metadata 0x8359fff1dc629bad933cf1781564a6d98a7277ac391e "projectUrl": "", "netAddress": "/dns/validator-2.r.iota-rebased-testnet.iota.cafe/tcp/8080/http", "p2pAddress": "/dns/validator-2.r.iota-rebased-testnet.iota.cafe/udp/8084", - "primaryAddress": "/dns/validator-2.r.iota-rebased-testnet.iota.cafe/udp/8081", + "primaryAddress": "/dns/validator-2.r.iota-rebased-testnet.iota.cafe/tcp/8081", "nextEpochAuthorityPubkeyBytes": null, "nextEpochProofOfPossession": null, "nextEpochNetworkPubkeyBytes": null,