Skip to content

Commit

Permalink
Merge pull request #2951 from oasislabs/kostko/fix/signer-cfg
Browse files Browse the repository at this point in the history
go/oasis-node: Signer configuration fixes
  • Loading branch information
kostko authored May 28, 2020
2 parents ff6b57c + 0fc46a8 commit 548ab95
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changelog/2949.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
go/oasis-node: Fix signer configuration via YAML

The `--signer` argument has been renamed to `--signer.backend` to allow
signer configuration to be passed via a YAML config. Previously, this would
be impossible as `signer` would need to be both a string and a map at the
same time when set via a YAML config.
1 change: 1 addition & 0 deletions .changelog/2950.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go/oasis-node: Fix parsing of signer configuration
2 changes: 1 addition & 1 deletion go/oasis-node/cmd/common/signer/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

const (
// CfgSigner is the flag used to specify the backend of the signer.
CfgSigner = "signer"
CfgSigner = "signer.backend"

// CfgCLISignerDir is the flag used to specify the directory with the
// entity files, for the purpose of some of the node sub-command's
Expand Down
1 change: 1 addition & 0 deletions go/oasis-node/cmd/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ func init() {
metrics.Flags,
tracing.Flags,
cmdGrpc.ServerLocalFlags,
cmdSigner.Flags,
pprof.Flags,
storage.Flags,
supplementarysanity.Flags,
Expand Down
4 changes: 2 additions & 2 deletions go/oasis-test-runner/oasis/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (ent *Entity) Signer() signature.Signer {

func (ent *Entity) toGenesisArgs() []string {
if ent.dir != nil {
return []string{"--signer", fileSigner.SignerName, "--signer.dir", ent.dir.String()}
return []string{"--" + cmdSigner.CfgSigner, fileSigner.SignerName, "--" + cmdSigner.CfgCLISignerDir, ent.dir.String()}
} else if ent.isDebugTestEntity {
return entityArgsDebugTest
}
Expand Down Expand Up @@ -99,7 +99,7 @@ func (ent *Entity) update() error {
"--" + cmdSigner.CfgCLISignerDir, ent.dir.String(),
}
for _, n := range ent.nodes {
args = append(args, "--entity.node.id", n.String())
args = append(args, "--"+cmdEntity.CfgNodeID, n.String())
}

w, err := ent.dir.NewLogWriter("update.log")
Expand Down

0 comments on commit 548ab95

Please sign in to comment.