fix!: sync node configs to the treasury settlement chain - #1
Merged
Conversation
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>
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.
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_amountremoved — 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 = 2→ride_*_referrer_fee_bps = 200— fee rates are basis points now, so fractional percentages need no config migration later.chain_id = 2077,is_testnet = true,tx_fee = 1000,mint_authority,faucet_address,faucet_allocation = 1000000000000000.config/explorer/default.tomlgets the same_bpsrename, 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
ChainInittransaction, 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_amountused 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 -ureturns one line each), and the file satisfies every field the node'sAppConfigrequires — the six new fields are non-optional, so a missing one is a boot-time deserialization failure.tx_fee = 1000is $0.001 at the peg of 1 USD = 1,000,000 CLT.🤖 Generated with Claude Code