Skip to content

z3-stack: z_importaddress smoke guard + watch-only import docs#2

Merged
aphelionz merged 3 commits into
mainfrom
z3-importaddress-guard-docs
Jul 6, 2026
Merged

z3-stack: z_importaddress smoke guard + watch-only import docs#2
aphelionz merged 3 commits into
mainfrom
z3-importaddress-guard-docs

Conversation

@aphelionz

Copy link
Copy Markdown
Member

Why

Binance (migrating from zcashd to Zallet on the z3-stack bundle) asked whether our images need a rebuild to get z_importaddress (upstream zallet PR #406, gated behind the transparent-key-import cargo feature), and whether help z_importaddress returning docs proves the image has it.

Findings, verified against the published zero-zallet:latest (revision ae2d96b, pushed 2026-07-02):

  • No rebuild needed. zallet/Dockerfile builds with --features rpc-cli,zcashd-import, and zcashd-import transitively enables transparent-key-import. Binary inspection confirms: the feature-off stub string is absent, feature-gated implementation strings are present.
  • help output is generated at build time with no cfg-gate awareness, so it lists the method regardless of features. It is not evidence either way.

What

  • z3-smoke.yml: new assertion that z_importaddress is genuinely compiled in. Invalid hex with a parseable account UUID deterministically reaches the feature-gated parser, which must answer Invalid hex encoding (a feature-off build answers with the stub error instead). Positive proof, no wallet-account state involved.
  • deploy/z3-stack/README.md: new "Watch-only transparent import" section covering the two migration gotchas (hex pubkey/redeem script, not a t1... address; rescan starts from the account birthday, runs in background) and the static-help caveat.

Verification

  • The z3-smoke workflow runs on this PR (it triggers on bundle + workflow changes) and exercises the new assertion end to end.

🤖 Generated with Claude Code

aphelionz and others added 2 commits July 6, 2026 10:48
The method is gated behind the transparent-key-import cargo feature
(enabled via zcashd-import in zallet/Dockerfile). Guard against a build
change silently dropping it: invalid hex with a parseable account UUID
must reach the feature-gated parser and answer "Invalid hex encoding",
not the feature-off stub error. Params are JSON-quoted because the
`zallet rpc` CLI parses each param with serde_json.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Answers the recurring migration question from zcashd importaddress /
importmulti: the feature is already compiled into zero-zallet images,
the method takes a hex pubkey or redeem script (not a t-address), and
rescan starts from the account birthday. Also notes that help output is
build-time static and proves nothing about compiled-in features.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aphelionz
aphelionz force-pushed the z3-importaddress-guard-docs branch from 1572fa5 to c854685 Compare July 6, 2026 14:48
z_getnewaccount pins the birthday at the current chain tip, so importing
an address with existing history into a fresh account finds nothing.
Point readers at z_recoveraccounts and its explicit birthday_height, and
JSON-quote the CLI example params.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aphelionz
aphelionz merged commit 9c3e7c9 into main Jul 6, 2026
4 checks passed
@aphelionz
aphelionz deleted the z3-importaddress-guard-docs branch July 9, 2026 07:13
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.

1 participant