Repository navigation
feat(docker): restore cli_wallet to build and runtime image - #99
Merged
Merged
Conversation
PR #98 stopped shipping cli_wallet by replacing `make install` with a direct `cp` of the vizd binary. Two side-effects: 1. Image content regression. `vizblockchain/vizd:latest` and `:testnet` no longer contained /usr/local/bin/cli_wallet, breaking any `docker exec <container> cli_wallet ...` workflow that operators relied on. 2. CI coverage gap. With `make -j$(nproc) vizd` as the only compile invocation, syntax errors or compile failures inside programs/cli_wallet/ were silently ignored — CI went green even when cli_wallet was broken. Restore both by building cli_wallet alongside vizd (`make -j$(nproc) vizd cli_wallet`) and copying the second binary in the final-stage COPY. ccache keeps the incremental cost low: cli_wallet shares most translation units with vizd through libraries/wallet, libraries/protocol, and fc. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #98 inadvertently dropped
cli_walletfrom the Docker images. This PR restores it.What broke in #98
PR #98 replaced
make installwithcp build/programs/vizd/vizd /usr/local/bin/vizdto skip a hidden recompile of all targets that CMake'sinstalltarget re-triggers via its implicit dependency onall. That worked — but the previous flow had a useful side-effect: cli_wallet's install rule (programs/cli_wallet/CMakeLists.txt:47) placed it at/usr/local/bin/cli_walletin the builder, and the multi-stageCOPY /usr/local /usr/localshipped it into the runtime image.Two consequences of removing that flow:
vizblockchain/vizd:latestand:testnetno longer contain/usr/local/bin/cli_wallet. Anydocker exec <container> cli_wallet ...workflow operators relied on is broken onlatestpost-perf(docker): skip make install, copy vizd binary directly #98.make -j$(nproc) vizdinvocation doesn't compile cli_wallet at all, so a compile error insideprograms/cli_wallet/would not fail the Docker build. CI signal on cli_wallet correctness is currently zero.Fix
Build both targets explicitly and copy both binaries in the final stage:
Applied identically to
Dockerfile-productionandDockerfile-testnet. Util programs, tests, and examples remain skipped (they don't ship and aren't operator-facing).Validation
makestep on warm rerunlatest99.59 MB, +9.55 MB compressed)/usr/local/bin/cli_walletconfirmed in layer L4libc.so.6,libm.so.6,libgcc_s.so.1,libstdc++.so.6(all in phusion noble base)On the warm rerun timing (3m37s vs PR #98's 1m27s)
In PR #98 the rerun fully hit the GHA layer cache for the
RUN makestep (CACHED). Here, that step re-executed at 83s. The difference comes from BuildKit's content-hash on the build context: the same source produced a slightly different layer key on the rerun, so the layer cache missed and the RUN executed.That's fine for our purposes — ccache then did the heavy lifting: the from-scratch make would be ~12 minutes, but with ccache hits on every translation unit the compile was reduced to a link pass at 83s. That's the realistic speedup PRs see anyway, since each PR's SHA produces unique layer keys and only ccache (not the layer cache) carries between PRs.
Validation method
Image audit and ELF inspection were done against the registry (Docker Hub manifest API + targeted layer-blob extraction) rather than
docker pull/docker run. Same approach as #98's validation.Test plan (post-merge)
vizblockchain/vizd:latest, rundocker run --rm vizblockchain/vizd:latest cli_wallet --helpand confirm wallet startsvizblockchain/vizd:testnet, same checkRelated
🤖 Generated with Claude Code