Skip to content

fix!: sync node configs to the treasury settlement chain - #1

Merged
MehranMazhar merged 3 commits into
mainfrom
treasury-break
Jul 30, 2026
Merged

fix!: sync node configs to the treasury settlement chain#1
MehranMazhar merged 3 commits into
mainfrom
treasury-break

Conversation

@MehranMazhar

Copy link
Copy Markdown
Member

Config-only companion to clutchprotocol/clutch-node#9. Merge after that PR, or the stage nodes will load keys their binary does not know.

What changes

All three node TOMLs (node1/node2/node3):

  • block_reward_amount removed — block rewards no longer exist. Unbacked minting breaks the 1:1 reserve invariant a fully-reserved token depends on, so the node replaced them with a flat transaction fee paid to the block author.
  • ride_*_referrer_fee_percent = 2ride_*_referrer_fee_bps = 200 — fee rates are basis points now, so fractional percentages need no config migration later.
  • Six new consensus params: chain_id = 2077, is_testnet = true, tx_fee = 1000, mint_authority, faucet_address, faucet_allocation = 1000000000000000.

config/explorer/default.toml gets the same _bps rename, paired with the matching Rust change in clutch-explorer.

Why the values must be byte-identical across the three nodes

These params now ride in the genesis block's ChainInit transaction, so they are committed to by the genesis hash — and peers compare genesis hashes at the p2p handshake. A node configured differently is refused at handshake rather than silently computing divergent state. That is the point of the change (it closes a real latent fork: block_reward_amount used to be per-node local config), but it means a typo here stops a node peering instead of producing a subtle bug.

Verified: all eight new/renamed keys are byte-identical across node1/node2/node3 (sort -u returns one line each), and the file satisfies every field the node's AppConfig requires — the six new fields are non-optional, so a missing one is a boot-time deserialization failure.

tx_fee = 1000 is $0.001 at the peg of 1 USD = 1,000,000 CLT.

🤖 Generated with Claude Code

MehranMazhar and others added 3 commits July 28, 2026 23:08
Drops block_reward_amount (block rewards are gone; the author is paid from
tx_fee now), renames the referrer fee rates to basis points, and adds the
six consensus params the genesis ChainInit transaction commits to state.

All three node files carry byte-identical values on purpose: the genesis
hash covers these params and peers compare it at handshake, so a divergent
value makes a node unable to peer rather than silently divergent.

Requires clutch-node treasury-break (PR #9). The explorer TOML's matching
percent->bps rename lands with the explorer code change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Matches clutch-explorer's treasury-break rename of
ride_*_referrer_fee_percent -> ride_*_referrer_fee_bps (2 -> 200).
Without this the mounted config keeps the old keys and the explorer
fails to deserialize its config at startup.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MehranMazhar
MehranMazhar merged commit c0707e5 into main Jul 30, 2026
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