Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Configs] Add seed peers for testnet and mainnet. #9801

Merged
merged 1 commit into from
Aug 29, 2023
Merged

Conversation

JoshLind
Copy link
Contributor

Description

This PR adds dedicated seed peer support for testnet and mainnet. This is useful for nodes that wish to sync to the network with only the genesis blob.

Test Plan

Existing test infrastructure.

const MAINNET_SEED_PEER_PUBLIC_KEYS: [&str; 0] = [];

// Testnet seed peer addresses and keys
const TESTNET_SEED_PEER_ADDRESSES: [&str; 4] = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish there was either a loud comment "these three are one thing and must be the same length and correspond by index", or (really this) I wish it was one list of something with three elements. maybe [[&str; 3]; 4] or vec![] of (str, str, str) tuples?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM! I've gone for an array of tuples of (str, str, str) 😄

// Mainnet seed peer addresses and keys
const MAINNET_SEED_PEER_ADDRESSES: [&str; 0] = [];
const MAINNET_SEED_PEER_NETWORK_ADDRESSES: [&str; 0] = [];
const MAINNET_SEED_PEER_PUBLIC_KEYS: [&str; 0] = [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use a more specific type that

  1. Ties together these 3 properties
  2. Parses the strings into something more appropriate, like a bignum

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Ties together these 3 properties

See above. We now have an array of tuples, which makes it more obvious 😄

  1. Parses the strings into something more appropriate, like a bignum

Can you elaborate? I'm not sure what you mean here 😸

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The address is not a string, it's a large integer, so it should be parsed as such. The string is only its printed representation.

Copy link
Contributor Author

@JoshLind JoshLind Aug 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aah, gotcha 😄

  1. The peer address here is a hex formatted string. When we build the seed from it, we use PeerId::from_hex(...), which appears to be the standardized way of handling addresses across our code. Likewise, it's the format expected by the serde implementation for the object (e.g., if you were to define these in the node config manually).
  2. I also think it's much more readable than storing a large number in the code. For example, I can directly look it up in our explorer 😄

So, I'm inclined to leave this as it is. I think it's superior to a large number 🤔

@JoshLind JoshLind force-pushed the seed_peers branch 6 times, most recently from f295924 to c4f3c05 Compare August 29, 2023 16:48
@JoshLind JoshLind enabled auto-merge (rebase) August 29, 2023 18:02
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

✅ Forge suite compat success on aptos-node-v1.6.2 ==> 74ffe7137cb079ef96bc7cafc7198d4d11981f0c

Compatibility test results for aptos-node-v1.6.2 ==> 74ffe7137cb079ef96bc7cafc7198d4d11981f0c (PR)
1. Check liveness of validators at old version: aptos-node-v1.6.2
compatibility::simple-validator-upgrade::liveness-check : committed: 4655 txn/s, latency: 6649 ms, (p50: 6900 ms, p90: 9200 ms, p99: 9900 ms), latency samples: 181580
2. Upgrading first Validator to new version: 74ffe7137cb079ef96bc7cafc7198d4d11981f0c
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 1851 txn/s, latency: 15558 ms, (p50: 19100 ms, p90: 21700 ms, p99: 22200 ms), latency samples: 92580
3. Upgrading rest of first batch to new version: 74ffe7137cb079ef96bc7cafc7198d4d11981f0c
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 1783 txn/s, latency: 15800 ms, (p50: 19300 ms, p90: 21900 ms, p99: 22600 ms), latency samples: 92760
4. upgrading second batch to new version: 74ffe7137cb079ef96bc7cafc7198d4d11981f0c
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 3370 txn/s, latency: 9341 ms, (p50: 10200 ms, p90: 13000 ms, p99: 13500 ms), latency samples: 134800
5. check swarm health
Compatibility test for aptos-node-v1.6.2 ==> 74ffe7137cb079ef96bc7cafc7198d4d11981f0c passed
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 74ffe7137cb079ef96bc7cafc7198d4d11981f0c

two traffics test: inner traffic : committed: 6041 txn/s, latency: 6469 ms, (p50: 6200 ms, p90: 8100 ms, p99: 12600 ms), latency samples: 2622140
two traffics test : committed: 100 txn/s, latency: 3195 ms, (p50: 3100 ms, p90: 3700 ms, p99: 6200 ms), latency samples: 1840
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.239, avg: 0.213", "QsPosToProposal: max: 0.209, avg: 0.174", "ConsensusProposalToOrdered: max: 0.651, avg: 0.623", "ConsensusOrderedToCommit: max: 0.553, avg: 0.528", "ConsensusProposalToCommit: max: 1.193, avg: 1.151"]
Max round gap was 1 [limit 4] at version 1150305. Max no progress secs was 4.329911 [limit 10] at version 1150305.
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite framework_upgrade success on aptos-node-v1.5.1 ==> 74ffe7137cb079ef96bc7cafc7198d4d11981f0c

Compatibility test results for aptos-node-v1.5.1 ==> 74ffe7137cb079ef96bc7cafc7198d4d11981f0c (PR)
Upgrade the nodes to version: 74ffe7137cb079ef96bc7cafc7198d4d11981f0c
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 4417 txn/s, latency: 7343 ms, (p50: 7300 ms, p90: 10100 ms, p99: 16600 ms), latency samples: 163460
5. check swarm health
Compatibility test for aptos-node-v1.5.1 ==> 74ffe7137cb079ef96bc7cafc7198d4d11981f0c passed
Test Ok

@JoshLind JoshLind merged commit b6557f5 into main Aug 29, 2023
71 of 74 checks passed
@JoshLind JoshLind deleted the seed_peers branch August 29, 2023 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants