Connects to peers over p2p, rather than via the info API. Post Etna, info API nodes are not expected to track peers for all subnets, so we instead need to fetch peers directly from primary network validators, which do track all peers across all L1s. We do this by bootstrapping the network with connections to primary network validators (which are still fetched from the info API), and discovering peers via peer gossip. Peer gossip only tracks peers that correspond to known validators, so we also need to maintain an up-to-date view of the validators of the L1s we wish to connect to (including the primary network). This change leverages https://github.com/ava-labs/teleporter/pull/641 to confirm that we can connect to L1s with disjoint validator sets from the primary network.
Note: This PR uses a modified version of Avalanchego v1.12.0-fuji that relaxes the outbound peer request handling. Once this change is formalized and included in an Avalanchego release, we will circle back and update the dependency. This workaround is safe because it only impacts outbound messages from the signature aggregator peer.
How this works
Create a validator manager and initialize it with the current validators of the primary network and any tracked L1s
Periodically update the validator manager with the latest validator sets from the P-Chain API
For the signature aggregator service, add new tracked subnets on demand
Bootstrap the network with primary network validator peers (fetched from the Info API), which will gossip any known validators across all tracked L1s
There's no need to manually connect to peers anymore, as this is handled automatically via peer gossip
Why this should be merged
Connects to peers over p2p, rather than via the info API. Post Etna, info API nodes are not expected to track peers for all subnets, so we instead need to fetch peers directly from primary network validators, which do track all peers across all L1s. We do this by bootstrapping the network with connections to primary network validators (which are still fetched from the info API), and discovering peers via peer gossip. Peer gossip only tracks peers that correspond to known validators, so we also need to maintain an up-to-date view of the validators of the L1s we wish to connect to (including the primary network). This change leverages https://github.com/ava-labs/teleporter/pull/641 to confirm that we can connect to L1s with disjoint validator sets from the primary network.
Note: This PR uses a modified version of Avalanchego v1.12.0-fuji that relaxes the outbound peer request handling. Once this change is formalized and included in an Avalanchego release, we will circle back and update the dependency. This workaround is safe because it only impacts outbound messages from the signature aggregator peer.
How this works
How this was tested
CI
How is this documented
N/A