From eff2e28b8e0614ab28552e722b6177ddfaacb86d Mon Sep 17 00:00:00 2001 From: Mehran Mazhar Date: Mon, 14 Sep 2026 13:37:09 +0400 Subject: [PATCH] feat(rpc): expose the ride-cancel auto-release window in get_chain_info ride_auto_release_secs is genesis-committed and decides who receives money -- past the window a RideCancel pays the driver rather than refunding the passenger -- and it was not observable from outside the node. An operator could not confirm which value a chain runs without reading the node's config file on the host, which is the config rather than the committed state; and a client could not tell a rider how long a cancel still refunds them. Not adding mint_cosigners or mint_threshold in the same change: those are security-relevant and worth deciding on their own merits. Co-Authored-By: Claude Opus 5 --- src/node/wss/websocket.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/node/wss/websocket.rs b/src/node/wss/websocket.rs index ccc45f3..9895fa7 100644 --- a/src/node/wss/websocket.rs +++ b/src/node/wss/websocket.rs @@ -681,6 +681,14 @@ pub fn build_chain_info_response( "ride_request_referrer_fee_bps": params.ride_request_referrer_fee_bps, "ride_offer_referrer_fee_bps": params.ride_offer_referrer_fee_bps, "mint_authority": params.mint_authority, + // How long after acceptance a cancel pays the DRIVER rather than refunding the passenger, + // and 0 when the chain does not do that at all. + // + // Exposed because it is the one genesis parameter here that changes who receives money and + // was invisible from outside the node: an operator could not confirm which value a chain + // actually runs, and a client could not tell a rider how long a cancel still refunds them. + // Both had to read the node's config file, which is not something a client has. + "ride_auto_release_secs": params.ride_auto_release_secs, // Decimal string, not a bare number: total_supply is the one field here // that can realistically exceed 2^53 (~9.007e15, ~$9B at this peg's 1 // USD = 1,000,000 CLT), where a JSON number rounds silently and the