Skip to content

Node: fetch on-chain rate bounds (getRateBounds) + subscribe to RateBoundsUpdated #1172

Closed

Description

@alpergundogdu

Disposition: IMPLEMENT (ADR 019 §3.1 / ADR 003).

PaymentChannel.getRateBounds() is never called; bounds come only from local config as a documented stand-in (crates/common/src/config/mod.rs:2007). Governance rate-bound changes are invisible to running nodes.

Action: fetch at startup (refuse to start on u64 overflow), subscribe to RateBoundsUpdated, poll fallback (rate_bounds_poll_interval, default 1h).


Filed from the ADR→implementation gap analysis. ADR edits must be made in place with no historical/tombstone text (no "planned but cut" sentences) per repo ADR convention.

Activity

  1. added
    design:economics
    prio:high
    rust
    on Jul 15, 2026
  2. yigitdot commented on Jul 18, 2026

    @yigitdot
    Contributor

    Triage note for a later run: automated dispatch skipped this because the interaction between the on-chain bounds and the existing local config is not pinned.

    The mechanism itself is well specified (ADR 003 §Rate Bounds Refresh / ADR 019 §3.1). What is undecided: delivery_floor/delivery_ceiling are today plain u64 in ResolvedPayment (crates/common/src/config/resolved.rs:404) with a deliberate 0 free-serving default (#864, see the comment at crates/node/src/handlers/client.rs:2688). Does the chain value replace the local config, intersect with it, or apply only when a PaymentChannel address is configured? All three are defensible and they produce different daemons.

    Worth noting getRateBounds is currently read by no Rust code at all (grep -rn 'getRateBounds|rateBounds' crates/ is empty), so this is greenfield rather than a modification.

    Scope is also borderline: converting two static fields into live-updating shared state plumbed through handlers/client.rs + handlers/probe.rs, plus a new watcher task, a new rate_bounds_poll_interval config field (schema + resolver + validation + example) and startup ordering lands around 300-500 lines across ~8 files. Pinning the precedence question is the one blocker; the scope may then warrant a split.

  3. self-assigned this
    on Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

design:economicsprio:highrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions