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

Testing features for custom loopback isonets #3397

Open
wants to merge 1 commit into
base: mainnet-staging
Choose a base branch
from

Conversation

Meshiest
Copy link
Contributor

Motivation

In order to test against mainnet entirely locally, outside of dev-mode this PR does the following:

  1. changes some assumptions for peers with loopback addresses to allow a peer bound on 127.0.0.1 to connect to a peer bound on 127.0.0.2 without sharing loopback address peers with non-local peers
  2. allows for specifying bootstrap peers with the BOOTSTRAP_PEERS=127.0.0.2,127.0.0.3 environment
  3. allows for specifying custom generated genesis blocks via snarkos start --genesis ./path/to/block.genesis

This collection of features also empowers end users to create more dynamic isonets for their own internal testing of snarkOS.

To use these changes, simply specify BOOTSTRAP_PEERS=127.0.1.2 before your start command, and specify the loopback address in --node 127.0.1.2:3030 or --bft 127.0.1.2:5000.

Testing plan

Related PRs

@Meshiest
Copy link
Contributor Author

Meshiest commented Sep 11, 2024

committee.json
genesis.block.zip
genesis.json
client.json

Here is a genesis block generated by the aot command from the snarkops project that can be used for a simple 4 validator mainnet
(--network 0) along with the committee's keys and some generated keys for running client nodes.

My topology is as follows (ports omitted in the table)

BOOTSTRAP_PEERS=127.0.2.1:4130,127.0.2.2:4130,127.0.2.3:4130,127.0.2.4:4130

Validators are peered with bootstrap peers, fringe clients rely on bootstrap peers for peering.

type ip validators peers
validator 127.0.1.1 127.0.1.2,127.0.1.3,127.0.1.4 127.0.2.1,127.0.2.2,127.0.2.3,127.0.2.4
validator 127.0.1.2 127.0.1.1,127.0.1.3,127.0.1.4 127.0.2.1,127.0.2.2,127.0.2.3,127.0.2.4
validator 127.0.1.3 127.0.1.2,127.0.1.1,127.0.1.4 127.0.2.1,127.0.2.2,127.0.2.3,127.0.2.4
validator 127.0.1.4 127.0.1.2,127.0.1.3,127.0.1.1 127.0.2.1,127.0.2.2,127.0.2.3,127.0.2.4
core/bootstrap client 127.0.2.1 127.0.1.1,127.0.1.2,127.0.1.3,127.0.1.4
core/bootstrap client 127.0.2.2 127.0.1.1,127.0.1.2,127.0.1.3,127.0.1.4
core/bootstrap client 127.0.2.3 127.0.1.1,127.0.1.2,127.0.1.3,127.0.1.4
core/bootstrap client 127.0.2.4 127.0.1.1,127.0.1.2,127.0.1.3,127.0.1.4
fringe client 127.0.2.5
fringe client 127.0.2.6
fringe client 127.0.2.7
fringe client 127.0.2.8

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.

1 participant