-
Notifications
You must be signed in to change notification settings - Fork 67
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
Acp 77 local network #2357
base: main
Are you sure you want to change the base?
Acp 77 local network #2357
Conversation
* prompt addresses * fix lint * fix lint * fix lint * fix lint * add flags * address comments * fix test * address comments * fix lint --------- Signed-off-by: sukantoraymond <[email protected]>
* prompt addresses * fix lint * fix lint * fix lint * fix lint * add flags * validator prompt * bootstrap validators * add mock * fix lint * update prompt validator * update prompt validator * implement prompts * fix prompt mock * update sidecar * update prompts * update prompts * refactor * update prompts * update prompts * use default balance and weight * generate new node ids and bls * fix lint * add flags * add flags * address comments * address comments * address comments * move validator prompt to deploy * address comments * address comments * fix lint * address comments * address comments * fix test * address comments * fix lint * address coments * address coments * fix test * fix test * fix test * fix lint --------- Signed-off-by: sukantoraymond <[email protected]>
* adding teleporter contract to genesis * fixes for icm on genesis * add icm from a given embedded file * add function to deploy ICM registry * creating mapping values * add consts * make local deploy to work * do not print info for icm support addrs * nit * nit * fix wiz stuff * address PR comments * filter based on balance * add unit tests * Update cmd/blockchaincmd/describe.go Co-authored-by: Michael Kaplan <[email protected]> Signed-off-by: felipemadero <[email protected]> * lint --------- Signed-off-by: felipemadero <[email protected]> Co-authored-by: Michael Kaplan <[email protected]>
* prompt addresses * fix lint * fix lint * fix lint * fix lint * add flags * adding teleporter contract to genesis * validator prompt * bootstrap validators * add mock * fix lint * update prompt validator * update prompt validator * fixes for icm on genesis * add icm from a given embedded file * add function to deploy ICM registry * creating mapping values * add consts * make local deploy to work * do not print info for icm support addrs * nit * implement prompts * fix prompt mock * update sidecar * update prompts * update prompts * refactor * nit * update prompts * fix wiz stuff * update prompts * use default balance and weight * generate new node ids and bls * fix lint * add flags * add flags * add a function to initialize PoA manager * add lib folder * address comments * address comments * address comments * move validator prompt to deploy * address comments * address comments * fix lint * address comments * address comments * fix test * address PR comments * basic PoA manager setting * lint * address comments * fix lint * fix e2e * fix merge * fix merge * filter based on balance * add unit tests * nit * address PR comments * Update cmd/blockchaincmd/describe.go Co-authored-by: Michael Kaplan <[email protected]> Signed-off-by: felipemadero <[email protected]> * nit * address PR comments * lint --------- Signed-off-by: sukantoraymond <[email protected]> Signed-off-by: felipemadero <[email protected]> Co-authored-by: Raymond Sukanto <[email protected]> Co-authored-by: Michael Kaplan <[email protected]>
* wip * go mod tidy * use awm-relayer@main * fixes * use latest awm-relayer pkg which caused upgrade on coreth and avago - has to be resolved * use latest anr and rm prometheus metrics * check for errors * lint * mv to sdk/interchain * some refactoring and added unittests * fix license * fix unittest for now * fix lint * allow empty subnetID add usage working example * rm error msg from example * refactor to address felipe feedback * we should remove this from the test in favour of https://github.com/ava-labs/awm-relayer/blob/main/signature-aggregator/aggregator/aggregator_test.go - we just use exposed API * update readme example * rm goconst fix CI * put `- goconst` back * resolve conficts --------- Co-authored-by: Raymond Sukanto <[email protected]>
* use latest anr main * tidy * bump e2e avago version to be dynamic fee compatible * fix e2e for dynamic fees * lint
* prompt addresses * fix lint * fix lint * fix lint * fix lint * add flags * adding teleporter contract to genesis * validator prompt * bootstrap validators * add mock * fix lint * update prompt validator * update prompt validator * fixes for icm on genesis * add icm from a given embedded file * add function to deploy ICM registry * creating mapping values * add consts * make local deploy to work * do not print info for icm support addrs * nit * implement prompts * fix prompt mock * update sidecar * update prompts * update prompts * refactor * nit * update prompts * fix wiz stuff * update prompts * use default balance and weight * generate new node ids and bls * fix lint * add flags * add flags * add a function to initialize PoA manager * add lib folder * address comments * address comments * address comments * move validator prompt to deploy * address comments * address comments * fix lint * address comments * address comments * fix test * address PR comments * basic PoA manager setting * lint * address comments * fix lint * fix e2e * fix merge * fix merge * convert Subnet Tx * convert subnet * register validator * add validator * mock * remove validator * update weight * update weight * add flags add validator * remove validator update * refactor addvalidator * use node id as arg in addvalidator * fix change weight arg * resolve merge conflict * fix lint * address comments * fix lint * Enable non sov subnets (#2203) * subnet create non sov * support non sov blockchain * update test * update tests * update tests * update test * update tests * update tests * fix test * update tests * Rename Subnet to L1 for new commands ACP77 (#2209) * rename convert subnet * rename to l1 * fix lint * fix lint * fix lint * fix lint * Integrate ConvertSubnetTx AvalancheGo (#2213) * complete implementation of avalanche go convertsubnet * update relayer * update convertsubnettx * update avalanchego * update avalanche go * update avalanche go * dont prompt control key for sov * add tx cases for convert subnet tx (#2218) * Poa integration (#2212) * use latest contract * point to latest convert subnet avago PR * nit * use fixed anr * nit * add subnet conversion id calculation * created unsigned warp message * fixed local network deploy * added signing * now this is working * using latest avago master + awm relayer * working pretty well * ready * lint * address PR comments * nit --------- Signed-off-by: sukantoraymond <[email protected]> Co-authored-by: sukantoraymond <[email protected]> * fix lint * reverse sidecar sov logic * fix merge * add poa setup to blockchain deploy (#2219) * add setup poa to blockchain deploy * add command * add proposervm update * proposervm flag for nodes * nit * nit * fixed dynamic fees params calculation * only adding tracked apis to apis in sidecar * improve prompts * fixing various stuff * add upgrade file * use anr etna enabled * keep upgrade on sync * workin * almost working * working1 * Update cmd/keycmd/transfer.go Co-authored-by: Meaghan FitzGerald <[email protected]> Signed-off-by: felipemadero <[email protected]> * fix some lint * address PR comments * missing file * nit --------- Signed-off-by: felipemadero <[email protected]> Signed-off-by: sukantoraymond <[email protected]> Co-authored-by: Meaghan FitzGerald <[email protected]> Co-authored-by: sukantoraymond <[email protected]> --------- Signed-off-by: sukantoraymond <[email protected]> Signed-off-by: felipemadero <[email protected]> Co-authored-by: felipemadero <[email protected]> Co-authored-by: Meaghan FitzGerald <[email protected]> * fix lint --------- Signed-off-by: sukantoraymond <[email protected]> Signed-off-by: felipemadero <[email protected]> Co-authored-by: felipemadero <[email protected]> Co-authored-by: Meaghan FitzGerald <[email protected]> --------- Signed-off-by: sukantoraymond <[email protected]> Signed-off-by: felipemadero <[email protected]> Co-authored-by: Felipe Madero <[email protected]> Co-authored-by: Meaghan FitzGerald <[email protected]>
Signed-off-by: sukantoraymond <[email protected]>
* refactor subnet sync * fix lint * Remove redundancies (#2229) * remove redundant code * fix lint * fix lint * Convert Subnet in 1 command (#2230) * one command deploy * use default private key to deploy validator manager contract * fix lint * remove redundant code * address comments --------- Signed-off-by: sukantoraymond <[email protected]> --------- Signed-off-by: sukantoraymond <[email protected]>
* generate new node id * fix lint
Signed-off-by: sukantoraymond <[email protected]>
* node local init * hardcode etna devnet config * wip * rm not needed utils * ready for draft PR * nits rm unused struct * refactor - wip * make sure we can resume without prompts * add custom network and local cluster * devnet instead of custom network, rm custom * go mod tidy * upgrade.json for etna devnet * more local cluster * separate between local network and local cluster * working * nit * fix plugin * nit * improve snapshot management * fix bug * nit * proper etna devnet boostrappers * fix bug with local rootdir * remove global node config stuff * destroy node data and processes if bad start * nit * always use fresh staking keys * nit * so less flags * add back fast boot time * add checks for local cluster. minor refactor (#2239) * add checks for local cluster minor refactoring * fix test * addressed Felipe feedback --------- Signed-off-by: arturrez <[email protected]> * bump anr * fixes for convert flow * add check for already initialized error on PoA init * nit * use anr main * fix merge * Local mkdir rootdir (#2245) * make sure rootDir exists * mv it to proper location * it's done before the start * update anr * Integrate local devnet (#2254) * integrate deploy * integrate deploy * Fix lint * address comments * address comments * Integrate start (#2262) * integrate start * integrate start * update etna network * integrate start * integrate start * finish integrate start * fix lint * stop existing local avalanchego * more robust --------- Signed-off-by: arturrez <[email protected]> Signed-off-by: sukantoraymond <[email protected]> Co-authored-by: Felipe Madero <[email protected]> Co-authored-by: sukantoraymond <[email protected]>
if network.Kind != models.Local { | ||
if flag := cmd.Flags().Lookup(skipRelayerFlagName); flag != nil && !flag.Changed { | ||
ux.Logger.PrintToUser("") | ||
yes, err := app.Prompt.CaptureYesNo("Do you want to use set up a local interchain relayer?") | ||
if err != nil { | ||
return err | ||
} | ||
icmSpec.SkipRelayerDeploy = !yes | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the interchain relayer for? Is this meant for local network only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, if this is meant for non local network, lets just default to yes to setting up interchian and have the rewards sent to the same key that is paying for transaction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
users can use flags to set these values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the relayer is meant to be deployed automatically for local networks, and optionally for other networks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the case of local machines the relayer needs more work, as it is currently not working due to
the extra peers issue (relayer not supporting extra peers yet, there are branchs on relayer for how to fix
this but not merged/released yet)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so relayer is probably only going to work for non sovereign settings. maybe it is best for the moment
on to just default to no (for local machines)
no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets default to no for local machines until those relayer prs are merged
Need to change to using latest avalanche go pre release version for local network. Seems that its trying to use avalanchego-v1.12.0 instead of avalanchego-v1.12.0-fuji |
Lets add message to use network clean to clean up this error |
I got this error, avalanche go path is the 1.12-fuji tag
|
also seems that we are only spinning up 2 nodes on local network? Why 2 nodes? |
@@ -50,7 +57,16 @@ func start(_ *cobra.Command, _ []string) error { | |||
return err | |||
} | |||
switch { | |||
case network.Kind == models.Local || network.Kind == models.Fuji: | |||
case network.ClusterName != "": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this check is enough to decide if cluster is remote and ssh needed?
Do we need to also load ClusterConfig and check clusterConf.Local
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls ignore this comment. This is code that was tested already and just moved within code
cmd.Flags().StringVar(&startFlags.AvagoBinaryPath, "avalanchego-path", "", "use this avalanchego binary path") | ||
cmd.Flags().StringVar(&startFlags.RelayerBinaryPath, "relayer-path", "", "use this relayer binary path") | ||
cmd.Flags().StringVar(&startFlags.SnapshotName, "snapshot-name", constants.DefaultSnapshotName, "name of snapshot to use to start the network from") | ||
cmd.Flags().Uint32Var(&startFlags.NumNodes, "num-nodes", constants.NumDefaultLocalNetworkNodes, "number of nodes to be created on local network") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: NumDefaultLocalNetworkNodes
should be LocalNetworkNumNodes
if err != nil { | ||
return err | ||
} | ||
if configStr != "" { | ||
loadSnapshotOpts = append(loadSnapshotOpts, client.WithGlobalNodeConfig(configStr)) | ||
if nodeConfig == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should app.Conf.LoadNodeConfig() return "{}" right away ?
ux.Logger.PrintToUser("") | ||
ux.Logger.PrintToUser("Network ready to use.") | ||
ux.Logger.PrintToUser("") | ||
snapshotPath := filepath.Join(app.GetSnapshotsDir(), "anr-snapshot-"+flags.SnapshotName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we use "anr-snapshot-" prefix in multiple places. Should we have a single func that returns snapshotPath for the name?
snapshotPath := filepath.Join(app.GetSnapshotsDir(), "anr-snapshot-"+flags.SnapshotName) | ||
if utils.DirectoryExists(snapshotPath) { | ||
var startMsg string | ||
if flags.SnapshotName == constants.DefaultSnapshotName { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: not worth displaying snapshot name for the user if it was provided by the user anyway.
so we don't need this if else statement
@@ -0,0 +1,16 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the same file as pkg/constants/etnaDevnet/upgrade.json
no need to create another file here
Why this should be merged
How this works
https://asciinema.org/a/gypjn0s5vFL3crm3afHQICqab
How this was tested
How is this documented