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

DevOps: Define recipe for FastNet. #4066

Merged
merged 4 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
12 changes: 12 additions & 0 deletions test/testdata/deployednettemplates/recipes/fastnet/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PARAMS=-w 12 -R 6 -N 12 -n 12 -H 6 --node-template node.json --relay-template relay.json --non-participating-node-template nonPartNode.json

all: net.json genesis.json

net.json: node.json relay.json nonPartNode.json ${GOPATH}/bin/netgoal Makefile
netgoal generate -t net -r /tmp/wat -o net.json ${PARAMS}

genesis.json: node.json relay.json nonPartNode.json ${GOPATH}/bin/netgoal Makefile
netgoal generate -t genesis -r /tmp/wat -o genesis.json ${PARAMS}

clean:
rm -f net.json genesis.json
32 changes: 32 additions & 0 deletions test/testdata/deployednettemplates/recipes/fastnet/gen_topology.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
node_types = {"R":6, "N":12, "NPN":6}
Copy link
Contributor

Choose a reason for hiding this comment

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

For this round I'm kind of okay with mimicking betanet in terms of composition and distribution. Is this 24 non-co-located nodes? This seems like a lot until we can iron out some details.

@cce Any thoughts on this? I'm kind of okay with the 5 instance (1 relay + 4 partnode) setup to launch at this round while we evaluate our changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, however you think is best to roll it out, I assume it is relatively easy to update and grow the network as needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, reduced to 1 relay, 4 nodes, and 2 NPNs.

node_size = {"R":"-m5d.4xl", "N":"-m5d.4xl", "NPN":"-m5d.4xl"}
regions = [
"AWS-US-EAST-2",
"AWS-US-WEST-2",
"AWS-EU-CENTRAL-1",
"AWS-EU-WEST-2",
"AWS-AP-SOUTHEAST-1",
"AWS-AP-SOUTHEAST-2"
]

f = open("topology.json", "w")
f.write("{ \"Hosts\":\n [")

region_count = len(regions)
first = True
for x in node_types:
node_type = x
node_count = node_types[x]
region_size = node_size[x]
for i in range(node_count):
node_name = node_type + str(i+1)
region = regions[i%region_count]
if (first ):
first = False
else:
f.write(",")
f.write ("\n {\n \"Name\": \"" + node_name + "\",\n \"Template\": \"" + region + region_size + "\"\n }" )

f.write("\n ]\n}\n")
f.close()

104 changes: 104 additions & 0 deletions test/testdata/deployednettemplates/recipes/fastnet/genesis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"NetworkName": "",
Copy link
Contributor

Choose a reason for hiding this comment

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

Might as well name this alphanet right from the start!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to alphanet.

"VersionModifier": "",
"ConsensusProtocol": "future",
"FirstPartKeyRound": 0,
"LastPartKeyRound": 30000,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this too short? This would have been about 36 hours for a perf network, but for a long-lived network we want this to be much, much longer unless we're going to go through and renew partkeys ourselves. At 3m rounds it's only about 87 days if our rounds are 2.5s

Copy link
Contributor

Choose a reason for hiding this comment

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

agreed, we should choose a bigger value for this longer-running network. It will take several hours to make all the keys though (depending on how many cores you have when running netgoal)

Copy link
Contributor Author

@egieseke egieseke Jun 6, 2022

Choose a reason for hiding this comment

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

Reverted back to 3 million rounds.

"PartKeyDilution": 0,
"Wallets": [
{
"Name": "Wallet1",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet2",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet3",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet4",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet5",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet6",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet7",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet8",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet9",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet10",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet11",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet12",
"Stake": 4.166666666666667,
"Online": true
},
{
"Name": "Wallet13",
"Stake": 8.333333333333334,
"Online": false
},
{
"Name": "Wallet14",
"Stake": 8.333333333333334,
"Online": false
},
{
"Name": "Wallet15",
"Stake": 8.333333333333334,
"Online": false
},
{
"Name": "Wallet16",
"Stake": 8.333333333333334,
"Online": false
},
{
"Name": "Wallet17",
"Stake": 8.333333333333334,
"Online": false
},
{
"Name": "Wallet18",
"Stake": 8.333333333333334,
"Online": false
}
],
"FeeSink": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ",
"RewardsPool": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ",
"DevMode": false,
"Comment": ""
}
Loading