Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions docs/learn/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,8 @@ signer:
```

**Command-line Flag:**
`--rollkit.signer.type <string>`
_Example:_ `--rollkit.signer.type grpc`
`--rollkit.signer.signer_type <string>`
_Example:_ `--rollkit.signer.signer_type grpc`
_Default:_ (Depends on application, often "file" or none if not an aggregator)
_Constant:_ `FlagSignerType`

Expand All @@ -836,8 +836,8 @@ signer:
```

**Command-line Flag:**
`--rollkit.signer.path <string>`
_Example:_ `--rollkit.signer.path ./keys/mykey.pem`
`--rollkit.signer.signer_path <string>`
_Example:_ `--rollkit.signer.signer_path ./keys/mykey.pem`
_Default:_ (Depends on application)
_Constant:_ `FlagSignerPath`

Expand Down
4 changes: 2 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
}
Expand Down
Loading