Skip to content

chore: Accumulated backports to v5-next#24670

Merged
AztecBot merged 1 commit into
v5-nextfrom
backport-to-v5-next-staging
Jul 14, 2026
Merged

chore: Accumulated backports to v5-next#24670
AztecBot merged 1 commit into
v5-nextfrom
backport-to-v5-next-staging

Conversation

@AztecBot

@AztecBot AztecBot commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

BEGIN_COMMIT_OVERRIDE
feat(cli): support funding accounts in validator-keys new/set-funding-account (#24476)
END_COMMIT_OVERRIDE

…-account (#24476)

## Summary

Wires a real `--funding-account` option into `aztec validator-keys new`
(previously commented out with a TODO, so operators had to hand-edit the
keystore JSON), and adds a dedicated `set-funding-account` subcommand
for existing keystores.

Per review feedback, `add` does **not** take `--funding-account`: the
funding account is a keystore-level field (the only one
`KeystoreManager.createFundingSigner` reads), so setting it from `add`
would be a global mutation disguised as a per-validator flag. Use
`set-funding-account` instead:

```
aztec validator-keys set-funding-account <keystore.json> <privateKey|address> [--remote-signer <url>] [--password <str>]
```

## Behavior

- The funding account value accepts either a 32-byte private key or a
20-byte address.
- An address requires `--remote-signer` (a local funder needs its
private key to sign funding txs); it is stored as `{ address,
remoteSignerUrl }`.
- With `--password`, a plaintext funder key is encrypted to a JSON V3
file and replaced with a `{ path, password }` reference, mirroring how
attester/publisher keys are handled.
- The value is written at the keystore top level
(`keystore.fundingAccount`). Validator-level funding exists in the
schema but is never consumed at runtime, so it is intentionally not
emitted.
- `set-funding-account` replaces an existing funding account with a
warning.

## Changes

- `index.ts` — real `--funding-account` option on `new`; new
`set-funding-account` subcommand.
- `set_funding_account.ts` — new command: validate, resolve, optionally
encrypt, write `keystore.fundingAccount`.
- `utils.ts` — `validateFundingAccountOptions` (normalize + validate
key/address, require remote-signer for address form).
- `shared.ts` — `resolveFundingAccount` and
`encryptFundingAccountToFile`; extracted the ETH JSON V3 encryption
helper for reuse.
- `new.ts` — validate, resolve, optionally encrypt, set
`keystore.fundingAccount`.
- `valkeys.test.ts` — 17 new tests covering validation,
private-key/address/password paths on `new`, and set/replace on
`set-funding-account`.

## Testing

- `yarn workspace @aztec/cli test
src/cmds/validator_keys/valkeys.test.ts` — 60 passed.
- `yarn build`, `yarn format cli`, `yarn lint cli` — all clean.

@ludamad ludamad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-approved

@AztecBot AztecBot added this pull request to the merge queue Jul 14, 2026
@AztecBot

Copy link
Copy Markdown
Collaborator Author

🤖 Auto-merge enabled after 8 hours of inactivity. This PR will be merged automatically once all checks pass.

@AztecBot

Copy link
Copy Markdown
Collaborator Author

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/85c897427102aa89�85c897427102aa898;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/multi-node/block-production/proof_boundary.parallel.test.ts "proof lands without a proposed parent and boundary checkpoint succeeds" (242s) (code: 0) group:e2e-p2p-epoch-flakes

@AztecBot

Copy link
Copy Markdown
Collaborator Author

🤖 Auto-merge enabled after 8 hours of inactivity. This PR will be merged automatically once all checks pass.

Merged via the queue into v5-next with commit 22f88da Jul 14, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants