summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary <982483+gmalouf@users.noreply.github.com>2024-01-08 17:13:29 -0500
committerGitHub <noreply@github.com>2024-01-08 17:13:29 -0500
commit71fff6dd6a2de0a1b5efeae39dd09ef8f76c8663 (patch)
treefcfb1bec0cd380a9aeb657196d0e21963657394d
parent21eec2d39b4ac93d66f9e930e7b07d45f8248c24 (diff)
Algocfg: Introduce new archival node algocfg profile. (#5893)
-rw-r--r--cmd/algocfg/profileCommand.go13
-rw-r--r--cmd/algocfg/profileCommand_test.go11
2 files changed, 24 insertions, 0 deletions
diff --git a/cmd/algocfg/profileCommand.go b/cmd/algocfg/profileCommand.go
index 1a28587ee..06ae4ff61 100644
--- a/cmd/algocfg/profileCommand.go
+++ b/cmd/algocfg/profileCommand.go
@@ -77,11 +77,24 @@ var (
},
}
+ archival = configUpdater{
+ description: "Store the full chain history and support catchup.",
+ updateFunc: func(cfg config.Local) config.Local {
+ cfg.Archival = true
+ cfg.EnableLedgerService = true
+ cfg.EnableBlockService = true
+ cfg.NetAddress = ":4160"
+ cfg.EnableGossipService = false
+ return cfg
+ },
+ }
+
// profileNames are the supported pre-configurations of config values
profileNames = map[string]configUpdater{
"participation": participation,
"conduit": conduit,
"relay": relay,
+ "archival": archival,
"development": development,
}
diff --git a/cmd/algocfg/profileCommand_test.go b/cmd/algocfg/profileCommand_test.go
index afe9fd4f8..d8bf71553 100644
--- a/cmd/algocfg/profileCommand_test.go
+++ b/cmd/algocfg/profileCommand_test.go
@@ -51,4 +51,15 @@ func Test_getConfigForArg(t *testing.T) {
require.NoError(t, err)
require.True(t, cfg.DisableAPIAuth)
})
+
+ t.Run("valid config test archival node", func(t *testing.T) {
+ t.Parallel()
+ cfg, err := getConfigForArg("archival")
+ require.NoError(t, err)
+ require.True(t, cfg.Archival)
+ require.True(t, cfg.EnableLedgerService)
+ require.True(t, cfg.EnableBlockService)
+ require.Equal(t, ":4160", cfg.NetAddress)
+ require.False(t, cfg.EnableGossipService)
+ })
}