Skip to content

Commit b4948c5

Browse files
authored
feat(cli): rename validator address output to nodeAddress (#202)
## Summary - Renames the validator node `address` output label to `nodeAddress` across all output types (screen, file, kubernetes) - Validator ConfigMap artifact name changes from `*-address` to `*-node-address` and key from `"address"` to `"nodeAddress"` - Faucet account output remains unchanged — still uses `address` label and `*-address` ConfigMap name ## Test plan - [x] `bun test` — all 19 tests in `bootstrap.output.test.ts` pass - [x] `bun run typecheck` — no type errors - [x] `bun run check` — lint and format clean <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Renamed the validator node "address" label to "nodeAddress" across CLI, file, and Kubernetes outputs to avoid confusion with faucet account addresses. - **Migration** - Update Kubernetes consumers: - ConfigMap name: <base>-address -> <base>-node-address (e.g., besu-node-validator-0-node-address) - ConfigMap key: address -> nodeAddress - If parsing CLI or file outputs, read nodeAddress instead of address for validator nodes. <sup>Written for commit c4dd169. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
1 parent 01dff33 commit b4948c5

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/cli/commands/bootstrap/bootstrap.output.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ describe("outputResult", () => {
332332
"besu-faucet-enode",
333333
"besu-faucet-private-key",
334334
"besu-faucet-pubkey",
335-
"besu-node-validator-0-address",
335+
"besu-node-validator-0-node-address",
336336
"besu-node-validator-0-enode",
337337
"besu-node-validator-0-private-key",
338338
"besu-node-validator-0-pubkey",
@@ -452,7 +452,7 @@ describe("outputResult", () => {
452452
expect(createdConfigMaps).toHaveLength(EXPECTED_CONFIGMAP_COUNT);
453453
expect(createdSecrets).toHaveLength(EXPECTED_SECRET_COUNT);
454454
const mapNames = createdConfigMaps.map((entry) => entry.name).sort();
455-
expect(mapNames).toContain("besu-node-validator-0-address");
455+
expect(mapNames).toContain("besu-node-validator-0-node-address");
456456
expect(mapNames).toContain("besu-genesis");
457457
expect(mapNames).toContain("besu-faucet-address");
458458
expect(mapNames).toContain("besu-faucet-pubkey");
@@ -576,7 +576,7 @@ describe("outputResult", () => {
576576
const expectedConfigMaps = [
577577
"custom-genesis",
578578
"custom-static",
579-
"custom-validator-0-address",
579+
"custom-validator-0-node-address",
580580
"custom-validator-0-enode",
581581
"custom-validator-0-pubkey",
582582
"custom-faucet-address",
@@ -636,7 +636,7 @@ describe("outputResult", () => {
636636
}) as unknown as ReturnType<typeof Bun.file>;
637637

638638
await expect(outputResult("kubernetes", samplePayload)).rejects.toThrow(
639-
"ConfigMap besu-node-validator-0-address already exists. Delete it or choose a different output target."
639+
"ConfigMap besu-node-validator-0-node-address already exists. Delete it or choose a different output target."
640640
);
641641
} finally {
642642
(KubeConfig.prototype as any).loadFromCluster = originalLoad;
@@ -825,7 +825,7 @@ describe("outputResult", () => {
825825
}) as unknown as ReturnType<typeof Bun.file>;
826826

827827
await expect(outputResult("kubernetes", samplePayload)).rejects.toThrow(
828-
"Failed to create ConfigMap besu-node-validator-0-address: boom"
828+
"Failed to create ConfigMap besu-node-validator-0-node-address: boom"
829829
);
830830
} finally {
831831
(KubeConfig.prototype as any).loadFromCluster = originalLoad;
@@ -864,7 +864,7 @@ describe("outputResult", () => {
864864
}) as unknown as ReturnType<typeof Bun.file>;
865865

866866
await expect(outputResult("kubernetes", samplePayload)).rejects.toThrow(
867-
"Failed to create ConfigMap besu-node-validator-0-address: failed"
867+
"Failed to create ConfigMap besu-node-validator-0-node-address: failed"
868868
);
869869
} finally {
870870
(KubeConfig.prototype as any).loadFromCluster = originalLoad;
@@ -905,7 +905,7 @@ describe("outputResult", () => {
905905
}) as unknown as ReturnType<typeof Bun.file>;
906906

907907
await expect(outputResult("kubernetes", samplePayload)).rejects.toThrow(
908-
"Failed to create ConfigMap besu-node-validator-0-address: unknown error"
908+
"Failed to create ConfigMap besu-node-validator-0-node-address: unknown error"
909909
);
910910
} finally {
911911
(KubeConfig.prototype as any).loadFromCluster = originalLoad;
@@ -946,7 +946,7 @@ describe("outputResult", () => {
946946
}) as unknown as ReturnType<typeof Bun.file>;
947947

948948
await expect(outputResult("kubernetes", samplePayload)).rejects.toThrow(
949-
"Failed to create ConfigMap besu-node-validator-0-address: denied"
949+
"Failed to create ConfigMap besu-node-validator-0-node-address: denied"
950950
);
951951
} finally {
952952
(KubeConfig.prototype as any).loadFromCluster = originalLoad;

src/cli/commands/bootstrap/bootstrap.output.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const printGroup = (title: string, nodes: readonly IndexedNode[]): void => {
125125
process.stdout.write(`${accent(title)}\n`);
126126
for (const node of nodes) {
127127
process.stdout.write(` ${label(`#${node.index}`)}\n`);
128-
process.stdout.write(` address: ${node.address}\n`);
128+
process.stdout.write(` nodeAddress: ${node.address}\n`);
129129
process.stdout.write(` publicKey: ${node.publicKey}\n`);
130130
process.stdout.write(` privateKey: ${node.privateKey}\n`);
131131
process.stdout.write(` enode: ${node.enode}\n`);
@@ -381,7 +381,7 @@ const createValidatorSpecs = (
381381
const ordinal = node.index - 1;
382382
const base = `${validatorPrefix}-${ordinal}`;
383383
return [
384-
{ name: `${base}-address`, key: "address", value: node.address },
384+
{ name: `${base}-node-address`, key: "nodeAddress", value: node.address },
385385
{
386386
name: `${base}-private-key`,
387387
key: "privateKey",

0 commit comments

Comments
 (0)