Skip to content

fix consumer CLI queries, localnet tooling, and consumer export - #74

Open
giunatale wants to merge 2 commits into
giunatale/feat/offline-detectionfrom
giunatale/fix/cli-and-localnet
Open

fix consumer CLI queries, localnet tooling, and consumer export#74
giunatale wants to merge 2 commits into
giunatale/feat/offline-detectionfrom
giunatale/fix/cli-and-localnet

Conversation

@giunatale

@giunatale giunatale commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Unbreaks the local development loop and a handful of CLI paper cuts.

What

  • consumer-fee-pool-claims pagination: the --page-key flag was read without
    decoding, so paging past page 1 failed; it now uses the page-key-decoded
    flag-set like the sibling paginated commands.
  • New consumer-liveness CLI query command — the gRPC query existed but was
    unreachable from the CLI; every provider query is now exposed. The liveness
    operator guide documents the command and its REST form.
  • create-consumer/update-consumer help and the localnet payload used a
    nonexistent field name (ccv_timeout_period), a timeout above the 24h
    protocol cap, and lacked the required safe_mode_threshold — so
    make localnet-start could not create a consumer at all. Both fixed.
  • ts-relayer localnet networking on macOS: --network host is Linux-only, so
    the relayer container could not reach the host chains. It now dials
    host.docker.internal (with --add-host=...:host-gateway so Linux keeps
    working), both chains bind RPC to 0.0.0.0, and the relayer account is
    funded on the provider from genesis (previously it could not pay for
    provider-side client creation — a second bug the networking failure masked).
  • consumer export no longer fails on a consumer that has not yet received a
    validator set: it exports an empty set (with a unit test), instead of
    erroring.
  • The e2e harness hid the reason a container command failed. dockerExec's
    StartExec reports whether the exec succeeded, not how the command inside
    it
    exited, so a command that failed came back with a nil error and empty
    stdout. Callers unmarshal that stdout, so the test failed on the empty
    document -- failed to decode <x> response: with nothing after the colon --
    while the actual message sat on a discarded stderr. It now inspects the exit
    code and logs the code, the command, stdout and stderr when it is non-zero.
    The returned error stays nil deliberately: several callers run commands they
    expect to fail and assert on stderr themselves.

Testing

make localnet-start verified end to end on macOS (relayer up, IBC clients on
both sides, client-established + validator-set sync). Build, lint, unit, and
the new app-level export test are green. Both Docker e2e suites pass; the
dockerExec change is diagnostics only and alters no assertion.

@giunatale

Copy link
Copy Markdown
Contributor Author

Branched from giunatale/feat/offline-detection (#63).
Opened against that branch so only this PR's commit shows; will retarget to main after #63 lands and this rebases.

@giunatale
giunatale force-pushed the giunatale/fix/cli-and-localnet branch from 1d4a97b to 53ed4f1 Compare July 31, 2026 20:47

@julienrbrt julienrbrt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm!

giunatale added a commit that referenced this pull request Aug 26, 2026
…k at the first wall-clock block

Review round for PR #66.

Photon-only fees deadlocked the chain the moment the policy activated:
every transaction needed a photon-voucher fee, including the relayer's
packet deliveries, which are the only way vouchers can ever arrive. The
ante now exempts transactions made up exclusively of infrastructure
messages (/ibc.core.* and /cosmos.gov.*, with the user-originating
MsgSendPacket carved out); what they pay is left to node-local
min-gas-prices, so a tokenless core shard launches with zero prices and
genesis-declared relayer and owner accounts.

The VSC staleness clock armed at NewChain InitGenesis with the genesis
block time, which is the genesis file's creation time and may predate
launch, burning safe-mode budget before the first block. It now arms in
BeginBlock at the first block after genesis, the first one carrying
wall-clock time; a restart genesis without the field arms the same way
instead of staying unarmed forever.

Docs are aligned with two facts the review surfaced: only vouchers from
the pinned client are accepted (deliberate: any other path is either
unverifiable or needs denom whitelisting), and the reference consumer
app wires no governance module, so consumer params are genesis-frozen
there and the photon flag cannot be flipped after launch. The liveness
query doc now shows the REST path that exists on this branch instead of
CLI syntax that lands with #74/#76.

The main e2e suite now runs its consumer with photon fees enabled from
genesis, and a new test proves the policy end to end: a native-fee tx
is rejected, an ICS-20 v2 transfer bridges uphoton in while enforcement
is on (the exemption at work), and a voucher-fee tx commits.
- fix consumer-fee-pool-claims pagination (decode --page-key via
  FlagSetWithPageKeyDecoded) so paging works past page 1, and wire a
  consumer-liveness CLI command to the QueryConsumerLiveness query so every
  provider query is reachable from the CLI.
- correct the create-consumer / update-consumer help and the localnet
  create-consumer payload: use vaas_timeout_period (not the nonexistent
  ccv_timeout_period), a timeout under the 24h MaxTimeoutDelta cap, and a
  positive safe_mode_threshold, and drop the stale connection_id key, so
  make localnet-start works again.
- make ts-relayer reach the chains on macOS: --network host is Linux-only, so
  dial host.docker.internal (with --add-host=...:host-gateway for Linux) and
  bind both chains' RPC to 0.0.0.0; also fund the relayer account on the
  provider from genesis so it can pay to create the provider-side IBC client.
- tolerate an empty validator set on consumer export, with a unit test that an
  unsynced consumer exports an empty set instead of failing.
The CLI command this branch adds and the REST route it already exposes;
stated in this PR so the doc lands with the feature it describes.
@giunatale
giunatale force-pushed the giunatale/fix/cli-and-localnet branch from 53ed4f1 to 0901b3c Compare August 26, 2026 12:24
giunatale added a commit that referenced this pull request Aug 27, 2026
…k at the first wall-clock block

Review round for PR #66.

Photon-only fees deadlocked the chain the moment the policy activated:
every transaction needed a photon-voucher fee, including the relayer's
packet deliveries, which are the only way vouchers can ever arrive. The
ante now exempts transactions made up exclusively of infrastructure
messages (/ibc.core.* and /cosmos.gov.*, with the user-originating
MsgSendPacket carved out); what they pay is left to node-local
min-gas-prices, so a tokenless core shard launches with zero prices and
genesis-declared relayer and owner accounts.

The VSC staleness clock armed at NewChain InitGenesis with the genesis
block time, which is the genesis file's creation time and may predate
launch, burning safe-mode budget before the first block. It now arms in
BeginBlock at the first block after genesis, the first one carrying
wall-clock time; a restart genesis without the field arms the same way
instead of staying unarmed forever.

Docs are aligned with two facts the review surfaced: only vouchers from
the pinned client are accepted (deliberate: any other path is either
unverifiable or needs denom whitelisting), and the reference consumer
app wires no governance module, so consumer params are genesis-frozen
there and the photon flag cannot be flipped after launch. The liveness
query doc now shows the REST path that exists on this branch instead of
CLI syntax that lands with #74/#76.

The main e2e suite now runs its consumer with photon fees enabled from
genesis, and a new test proves the policy end to end: a native-fee tx
is rejected, an ICS-20 v2 transfer bridges uphoton in while enforcement
is on (the exemption at work), and a voucher-fee tx commits.
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.

2 participants