|
6 | 6 | "fmt" |
7 | 7 | "net" |
8 | 8 | "net/http" |
| 9 | + "path/filepath" |
9 | 10 | "sync" |
10 | 11 | "time" |
11 | 12 |
|
@@ -60,6 +61,11 @@ func (n *Node) Name() string { |
60 | 61 | // HostName returns a condensed hostname |
61 | 62 | func (n *Node) HostName() string { return internal.CondenseHostName(n.Name()) } |
62 | 63 |
|
| 64 | +// passphraseFilePath returns the path to the passphrase file |
| 65 | +func (n *Node) passphraseFilePath() string { |
| 66 | + return filepath.Join(n.HomeDir(), "config", "passphrase.txt") |
| 67 | +} |
| 68 | + |
63 | 69 | // GetNetworkInfo returns internal/external addressing |
64 | 70 | func (n *Node) GetNetworkInfo(ctx context.Context) (types.NetworkInfo, error) { |
65 | 71 | internalIP, err := internal.GetContainerInternalIP(ctx, n.DockerClient, n.ContainerLifecycle.ContainerID()) |
@@ -115,9 +121,13 @@ func (n *Node) initContainer(ctx context.Context) error { |
115 | 121 | // Always run init to ensure config exists and is up to date |
116 | 122 | initCmd := []string{n.cfg.Bin, "init", "--home", n.HomeDir()} |
117 | 123 | if n.nodeCfg.EVMSignerPassphrase != "" { |
| 124 | + if err := n.WriteFile(ctx, filepath.Join("config", "passphrase.txt"), []byte(n.nodeCfg.EVMSignerPassphrase)); err != nil { |
| 125 | + return fmt.Errorf("failed to write passphrase file: %w", err) |
| 126 | + } |
| 127 | + |
118 | 128 | initCmd = append(initCmd, |
119 | 129 | "--rollkit.node.aggregator=true", |
120 | | - "--rollkit.signer.passphrase", n.nodeCfg.EVMSignerPassphrase, |
| 130 | + "--rollkit.signer.passphrase_file", n.passphraseFilePath(), |
121 | 131 | ) |
122 | 132 | } |
123 | 133 |
|
@@ -156,7 +166,7 @@ func (n *Node) createNodeContainer(ctx context.Context) error { |
156 | 166 | cmd = append(cmd, "--evnode.node.block_time", n.nodeCfg.EVMBlockTime) |
157 | 167 | } |
158 | 168 | if n.nodeCfg.EVMSignerPassphrase != "" { |
159 | | - cmd = append(cmd, "--evnode.node.aggregator=true", "--evnode.signer.passphrase", n.nodeCfg.EVMSignerPassphrase) |
| 169 | + cmd = append(cmd, "--evnode.node.aggregator=true", "--evnode.signer.passphrase_file", n.passphraseFilePath()) |
160 | 170 | } |
161 | 171 |
|
162 | 172 | if n.nodeCfg.DAAddress != "" { |
|
0 commit comments