Skip to content

Commit

Permalink
increase mainnet timeout (#2453)
Browse files Browse the repository at this point in the history
* increase mainnet timeout

* create run dir when cli first starts
  • Loading branch information
felipemadero authored Dec 16, 2024
1 parent 9a4bd12 commit 176d26f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ func setupEnv() (string, error) {
return "", err
}

// Create run dir if it doesn't exist
runDir := filepath.Join(baseDir, constants.RunDir)
if err = os.MkdirAll(runDir, os.ModePerm); err != nil {
fmt.Printf("failed creating the run dir %s: %s\n", runDir, err)
return "", err
}

// Create custom vm dir if it doesn't exist
vmDir := filepath.Join(baseDir, constants.CustomVMDir)
if err = os.MkdirAll(vmDir, os.ModePerm); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const (
FastGRPCDialTimeout = 100 * time.Millisecond

FujiBootstrapTimeout = 15 * time.Minute
MainnetBootstrapTimeout = 4 * time.Hour
MainnetBootstrapTimeout = 24 * time.Hour

SSHServerStartTimeout = 1 * time.Minute
SSHScriptTimeout = 2 * time.Minute
Expand Down
3 changes: 2 additions & 1 deletion pkg/node/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ func StartLocalNode(
nodeConfig = map[string]interface{}{}
}
nodeConfig[config.NetworkAllowPrivateIPsKey] = true
nodeConfig[config.IndexEnabledKey] = false

nodeConfigBytes, err := json.Marshal(nodeConfig)
if err != nil {
Expand Down Expand Up @@ -333,7 +334,7 @@ func StartLocalNode(
case network.Kind == models.Fuji:
ux.Logger.PrintToUser(logging.Yellow.Wrap("Warning: Fuji Bootstrapping can take several minutes"))
case network.Kind == models.Mainnet:
ux.Logger.PrintToUser(logging.Yellow.Wrap("Warning: Mainnet Bootstrapping can take 1-2 hours"))
ux.Logger.PrintToUser(logging.Yellow.Wrap("Warning: Mainnet Bootstrapping can take 6-24 hours"))
case network.Kind == models.Local:
clusterInfo, err := localnet.GetClusterInfo()
if err != nil {
Expand Down

0 comments on commit 176d26f

Please sign in to comment.