From 8d6ad891c2805598b159b612ec1afad6dd03c726 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Tue, 9 Sep 2025 16:02:00 +0200 Subject: [PATCH 1/4] chore: correct config name --- apps/evm/single/cmd/init.go | 4 ++-- apps/grpc/single/cmd/init.go | 2 +- apps/testapp/cmd/init.go | 4 ++-- apps/testapp/cmd/init_test.go | 2 +- docs/guides/da/visualizer.md | 4 ++-- docs/guides/reset-state.md | 10 +++++----- docs/learn/config.md | 2 +- pkg/config/yaml.go | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/evm/single/cmd/init.go b/apps/evm/single/cmd/init.go index 11b7e5750d..de37171c16 100644 --- a/apps/evm/single/cmd/init.go +++ b/apps/evm/single/cmd/init.go @@ -11,7 +11,7 @@ import ( rollgenesis "github.com/evstack/ev-node/pkg/genesis" ) -// InitCmd initializes a new evolve.yaml file in the current directory +// InitCmd initializes a new evnode.yml file in the current directory func InitCmd() *cobra.Command { initCmd := &cobra.Command{ Use: "init", @@ -47,7 +47,7 @@ func InitCmd() *cobra.Command { } if err := cfg.SaveAsYaml(); err != nil { - return fmt.Errorf("error writing evolve.yaml file: %w", err) + return fmt.Errorf("error writing evnode.yml file: %w", err) } if err := rollcmd.LoadOrGenNodeKey(homePath); err != nil { diff --git a/apps/grpc/single/cmd/init.go b/apps/grpc/single/cmd/init.go index c2e4d11ab5..ab32fd2684 100644 --- a/apps/grpc/single/cmd/init.go +++ b/apps/grpc/single/cmd/init.go @@ -49,7 +49,7 @@ This will create the necessary configuration structure in the specified root dir } if err := cfg.SaveAsYaml(); err != nil { - return fmt.Errorf("error writing evolve.yaml file: %w", err) + return fmt.Errorf("error writing evnode.yml file: %w", err) } if err := rollcmd.LoadOrGenNodeKey(homePath); err != nil { diff --git a/apps/testapp/cmd/init.go b/apps/testapp/cmd/init.go index ad24f53fb8..f442598479 100644 --- a/apps/testapp/cmd/init.go +++ b/apps/testapp/cmd/init.go @@ -11,7 +11,7 @@ import ( rollgenesis "github.com/evstack/ev-node/pkg/genesis" ) -// InitCmd initializes a new evolve.yaml file in the current directory +// InitCmd initializes a new evnode.yml file in the current directory func InitCmd() *cobra.Command { initCmd := &cobra.Command{ Use: "init", @@ -47,7 +47,7 @@ func InitCmd() *cobra.Command { } if err := cfg.SaveAsYaml(); err != nil { - return fmt.Errorf("error writing evolve.yaml file: %w", err) + return fmt.Errorf("error writing evnode.yml file: %w", err) } if err := rollcmd.LoadOrGenNodeKey(homePath); err != nil { diff --git a/apps/testapp/cmd/init_test.go b/apps/testapp/cmd/init_test.go index 1a5e31aac2..63d222240b 100644 --- a/apps/testapp/cmd/init_test.go +++ b/apps/testapp/cmd/init_test.go @@ -26,7 +26,7 @@ func TestInitCommand(t *testing.T) { // Change to the temporary directory require.NoError(t, os.Chdir(dir)) - // Remove any existing evolve.yaml files in the test directory + // Remove any existing evnode.yml files in the test directory configPath := filepath.Join(dir, "config", rollconf.ConfigName) _ = os.Remove(configPath) // Ignore error if file doesn't exist diff --git a/docs/guides/da/visualizer.md b/docs/guides/da/visualizer.md index 063e9735e0..99d8db4bc0 100644 --- a/docs/guides/da/visualizer.md +++ b/docs/guides/da/visualizer.md @@ -27,7 +27,7 @@ testapp start --rollkit.rpc.enable_da_visualization ### Via Configuration File -Add the following to your `evolve.yaml` configuration file: +Add the following to your `evnode.yml` configuration file: ```yaml rpc: @@ -164,7 +164,7 @@ When enabling the DA Visualizer, you may want to adjust related RPC settings: ```yaml rpc: - address: "0.0.0.0:7331" # Bind to all interfaces for remote access + address: "0.0.0.0:7331" # Bind to all interfaces for remote access enable_da_visualization: true ``` diff --git a/docs/guides/reset-state.md b/docs/guides/reset-state.md index 1d980f5a5c..238ab58c2c 100644 --- a/docs/guides/reset-state.md +++ b/docs/guides/reset-state.md @@ -8,9 +8,9 @@ By definition, resetting the state is deleting your chain's data. Make sure you Some reason you might need to reset the state of your chain are: -* During testing and development -* During upgrades with breaking changes -* Hardforks +- During testing and development +- During upgrades with breaking changes +- Hardforks ## Prerequisites @@ -28,7 +28,7 @@ tree $HOME/.testapp ├── config │   ├── genesis.json │   ├── node_key.json -│   ├── evolve.yaml +│   ├── evnode.yml │   └── signer.json └── data ├── cache @@ -90,7 +90,7 @@ tree $HOME/.gm │   │   └── gentx-418077c64f0cf5824c24487c9cce38241de677cd.json │   ├── node_key.json │   ├── priv_validator_key.json -│   └── evolve.yaml +│   └── evnode.yml ├── data │   ├── application.db │   │   ├── 000001.log diff --git a/docs/learn/config.md b/docs/learn/config.md index 9c58ee6e56..18dd0df48e 100644 --- a/docs/learn/config.md +++ b/docs/learn/config.md @@ -93,7 +93,7 @@ When running in DA-only mode, the node will: ## Configs -Evolve configurations can be managed through a YAML file (typically `evolve.yaml` located in `~/.evolve/config/` or `/config/`) and command-line flags. The system prioritizes configurations in the following order (highest priority first): +Evolve configurations can be managed through a YAML file (typically `evnode.yml` located in `~/.evolve/config/` or `/config/`) and command-line flags. The system prioritizes configurations in the following order (highest priority first): 1. **Command-line flags:** Override all other settings. 2. **YAML configuration file:** Values specified in the `config.yaml` file. diff --git a/pkg/config/yaml.go b/pkg/config/yaml.go index e2d55e6b47..e1367b8f83 100644 --- a/pkg/config/yaml.go +++ b/pkg/config/yaml.go @@ -28,7 +28,7 @@ func (d *DurationWrapper) UnmarshalText(text []byte) error { return err } -// ErrReadYaml is the error returned when reading the evolve.yaml file fails. +// ErrReadYaml is the error returned when reading the evnode.yml file fails. var ErrReadYaml = fmt.Errorf("reading %s", ConfigName) // SaveAsYaml saves the current configuration to a YAML file. From 404b44070de78d81009ca73c9c26c775b75d471f Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Tue, 9 Sep 2025 16:41:10 +0200 Subject: [PATCH 2/4] fix(config): correct signer flag --- pkg/config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 35451e9a1e..6721f12174 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -105,9 +105,9 @@ const ( // Signer configuration flags // FlagSignerType is a flag for specifying the signer type - FlagSignerType = FlagPrefixEvnode + "signer.type" + FlagSignerType = FlagPrefixEvnode + "signer.signer_type" // FlagSignerPath is a flag for specifying the signer path - FlagSignerPath = FlagPrefixEvnode + "signer.path" + FlagSignerPath = FlagPrefixEvnode + "signer.signer_path" // FlagSignerPassphrase is a flag for specifying the signer passphrase //nolint:gosec From 592ac0754c6bcd89b8e9cac536394ea172b22c7c Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Tue, 9 Sep 2025 16:44:23 +0200 Subject: [PATCH 3/4] add test --- pkg/config/config_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index f1f13f5894..3fc90cb9c6 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -174,6 +174,7 @@ signer: "--rollkit.da.address", "http://flag-da:26657", "--rollkit.node.light", "true", // This is not in YAML, should be set from flag "--rollkit.rpc.address", "127.0.0.1:7332", + "--evnode.signer.signer_path", "/path/to/signer", } cmd.SetArgs(flagArgs) err = cmd.ParseFlags(flagArgs) @@ -199,8 +200,8 @@ signer: assert.Equal(t, DefaultConfig.DA.BlockTime.Duration, config.DA.BlockTime.Duration, "DABlockTime should remain as default") // 5. Signer values should be set from flags - assert.Equal(t, "file", config.Signer.SignerType, "SignerType should be set from flag") - assert.Equal(t, "something/config", config.Signer.SignerPath, "SignerPath should be set from flag") + assert.Equal(t, "file", config.Signer.SignerType, "SignerType should be gotten from config") + assert.Equal(t, "/path/to/signer", config.Signer.SignerPath, "SignerPath should be set from flag") assert.Equal(t, "127.0.0.1:7332", config.RPC.Address, "RPCAddress should be set from flag") } From a950832fdfd9a3f812ebd5ee3258a8636a8378e4 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Tue, 9 Sep 2025 18:27:55 +0200 Subject: [PATCH 4/4] update config --- docs/learn/config.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/learn/config.md b/docs/learn/config.md index 18dd0df48e..3f735e5dfe 100644 --- a/docs/learn/config.md +++ b/docs/learn/config.md @@ -817,8 +817,8 @@ signer: ``` **Command-line Flag:** -`--rollkit.signer.type ` -_Example:_ `--rollkit.signer.type grpc` +`--rollkit.signer.signer_type ` +_Example:_ `--rollkit.signer.signer_type grpc` _Default:_ (Depends on application, often "file" or none if not an aggregator) _Constant:_ `FlagSignerType` @@ -836,8 +836,8 @@ signer: ``` **Command-line Flag:** -`--rollkit.signer.path ` -_Example:_ `--rollkit.signer.path ./keys/mykey.pem` +`--rollkit.signer.signer_path ` +_Example:_ `--rollkit.signer.signer_path ./keys/mykey.pem` _Default:_ (Depends on application) _Constant:_ `FlagSignerPath`