Skip to content

Warnet lab image: the documented image tag fails to render, node logs never reach stdout, fork-observer is refused #820

Description

@bkeroack

We ran the Warnet lab image (built at 2c1699ce from scripts/core-functional/warnet/) in a kind network alongside Bitcoin Core tanks. The rbitcoin tanks followed every block, reorg and compact block the scenario produced. We had to work around two things: the image tag below, and the connection_type of addnode peers (#819). Reading the code turned up two more gaps that stock Warnet runs into. All three below are checked against 432fe8a9.

  • The documented image tag does not render. The recipe tags the image rbitcoin-warnet:local (docs/core-functional.md:294, :340-343). When Warnet's bitcoincore chart writes bitcoin.conf, it passes the image tag to Helm's semverCompare, and local is not a version. Here is helm template with image.tag=local against the chart in warnet 1.1.20 from PyPI:

    Error: template: bitcoincore/templates/_helpers.tpl:66:14: executing "bitcoincore.check_semver" at <semverCompare ">=0.17.0" .Values.image.tag>: error calling semverCompare: invalid semantic version
    

    Warnet main (c89fa2e) fails the same way, at _helpers.tpl:195. A tag such as 0.7.99-warnet0 renders on both. The compose example never goes through the chart, so the warnet CI job cannot catch this.

  • Node output never reaches the container's stdout. The shim writes everything the node prints to {datadir}/debug.log and nowhere else (bitcoind:752-785). As a result, kubectl logs and warnet logs show none of an rbitcoin tank's log. The image sets RBITCOIN_LOG_STDOUT=1 (Dockerfile:35, entrypoint.sh:6), but nothing in the tree reads it, which suggests it was meant to cover this.

  • Warnet's fork-observer is refused. When fork-observer is enabled:

    • warnet new writes rpcauth=forkobserver:<salt>$<hash> into the network's node-defaults.yaml (graph.py:100-103).
    • fork-observer logs in as forkobserver with its own password (constants.py:53-54).
    • The shim ignores rpcauth (bitcoind:161). The RPC proxy accepts only the cookie or a password equal to the tank's rpcpassword (rpc_proxy.py:61-75).

    So fork-observer's calls get a 401, and rbitcoin tanks never appear in its view.

The tag failure was reproduced by rendering the chart. The other two come from reading the code: our network read tank state over RPC and ran with fork-observer off, so it did not exercise them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions