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

node local PoC #2216

Merged
merged 46 commits into from
Oct 16, 2024
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
bc89a4d
node local init
arturrez Oct 2, 2024
37da482
hardcode etna devnet config
arturrez Oct 2, 2024
9459b43
wip
arturrez Oct 3, 2024
3ddc12c
rm not needed utils
arturrez Oct 3, 2024
34f9382
Merge branch 'acp-77' into node-create-local
arturrez Oct 3, 2024
035cb92
ready for draft PR
arturrez Oct 3, 2024
3b1e676
nits
arturrez Oct 3, 2024
495d59c
refactor - wip
arturrez Oct 4, 2024
1d52dd5
make sure we can resume without prompts
arturrez Oct 5, 2024
1c1d061
add custom network and local cluster
arturrez Oct 5, 2024
ac37dce
devnet instead of custom network, rm custom
arturrez Oct 5, 2024
9acca2e
Merge branch 'acp-77' into node-create-local
arturrez Oct 8, 2024
64ba256
go mod tidy
arturrez Oct 8, 2024
71e313b
upgrade.json for etna devnet
arturrez Oct 8, 2024
884043e
more local cluster
arturrez Oct 9, 2024
74b9a7c
separate between local network and local cluster
felipemadero Oct 10, 2024
dce0e98
Merge branch 'acp-77' into node-create-local
felipemadero Oct 10, 2024
23b4e86
working
felipemadero Oct 10, 2024
b8f20ca
nit
felipemadero Oct 10, 2024
e225ed5
fix plugin
felipemadero Oct 10, 2024
7a12d78
nit
felipemadero Oct 10, 2024
93a3cfe
improve snapshot management
felipemadero Oct 10, 2024
c617154
fix bug
felipemadero Oct 10, 2024
c6ed553
nit
felipemadero Oct 10, 2024
afb44a1
proper etna devnet boostrappers
arturrez Oct 10, 2024
f2653d8
fix bug with local rootdir
arturrez Oct 11, 2024
3b3d699
remove global node config stuff
felipemadero Oct 11, 2024
3b4cdfe
destroy node data and processes if bad start
felipemadero Oct 11, 2024
61eb94d
nit
felipemadero Oct 11, 2024
46fa068
always use fresh staking keys
felipemadero Oct 11, 2024
ac2bdc3
nit
felipemadero Oct 11, 2024
ea9d1b9
so less flags
felipemadero Oct 11, 2024
02f02ab
add back fast boot time
felipemadero Oct 11, 2024
c788f4a
Merge branch 'node-create-local-fix' into node-create-local
felipemadero Oct 11, 2024
27ecc41
add checks for local cluster. minor refactor (#2239)
arturrez Oct 12, 2024
046ccb6
bump anr
felipemadero Oct 12, 2024
f134935
fixes for convert flow
felipemadero Oct 12, 2024
719aea1
add check for already initialized error on PoA init
felipemadero Oct 13, 2024
2aa05d1
nit
felipemadero Oct 13, 2024
72c1464
use anr main
felipemadero Oct 14, 2024
f22c1fd
Merge branch 'acp-77' into node-create-local
sukantoraymond Oct 15, 2024
c44c41b
fix merge
sukantoraymond Oct 15, 2024
de1a9f5
Local mkdir rootdir (#2245)
arturrez Oct 15, 2024
05c5218
update anr
sukantoraymond Oct 15, 2024
7d483ba
Merge branch 'acp-77' into node-create-local
sukantoraymond Oct 16, 2024
6ff16d8
Integrate local devnet (#2254)
sukantoraymond Oct 16, 2024
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
Prev Previous commit
Next Next commit
nit
  • Loading branch information
felipemadero committed Oct 10, 2024
commit b8f20cafce03ee3e5fda6d5fb2dc25076997d5b1
45 changes: 24 additions & 21 deletions cmd/nodecmd/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,30 @@ func localStartNode(_ *cobra.Command, args []string) error {
pluginDir := app.GetPluginsDir()
ctx, cancel := utils.GetANRContext()
defer cancel()

// starts server
avalancheGoVersion := "latest"
if avalanchegoBinaryPath == "" {
avalancheGoVersion, err = getAvalancheGoVersion()
if err != nil {
return err
} else {
ux.Logger.PrintToUser("Using AvalancheGo version: %s", avalancheGoVersion)
}
}
sd := subnet.NewLocalDeployer(app, avalancheGoVersion, avalanchegoBinaryPath, "")
if err := sd.StartServer(
constants.ServerRunFileLocalClusterPrefix,
binutils.LocalClusterGRPCServerPort,
binutils.LocalClusterGRPCGatewayPort,
); err != nil {
return err
}
_, avalancheGoBinPath, err := sd.SetupLocalEnv()
if err != nil {
return err
}

if localClusterDataExists(clusterName) {
ux.Logger.GreenCheckmarkToUser("Local cluster %s found. Booting up...", clusterName)
} else {
Expand All @@ -206,15 +230,6 @@ func localStartNode(_ *cobra.Command, args []string) error {
return err
}
}
avalancheGoVersion := "latest"
if avalanchegoBinaryPath == "" {
avalancheGoVersion, err = getAvalancheGoVersion()
if err != nil {
return err
} else {
ux.Logger.PrintToUser("Using AvalancheGo version: %s", avalancheGoVersion)
}
}
if err := preLocalChecks(clusterName); err != nil {
return err
}
Expand Down Expand Up @@ -249,18 +264,6 @@ func localStartNode(_ *cobra.Command, args []string) error {
defer os.Remove(upgradePath)
}

sd := subnet.NewLocalDeployer(app, avalancheGoVersion, avalanchegoBinaryPath, "")
if err := sd.StartServer(
constants.ServerRunFileLocalClusterPrefix,
binutils.LocalClusterGRPCServerPort,
binutils.LocalClusterGRPCGatewayPort,
); err != nil {
return err
}
_, avalancheGoBinPath, err := sd.SetupLocalEnv()
if err != nil {
return err
}
// make sure rootDir exists
if err := os.MkdirAll(rootDir, 0o700); err != nil {
return fmt.Errorf("could not create root directory %s: %w", rootDir, err)
Expand Down