Repository navigation
abi: complete the Hipo schema for the loan and round lifecycle - #506
Conversation
Add the round lifecycle externals (participate_in_election, vset_changed, finish_participation), the loan ops (decide_loan_requests, process_loan_requests, recover_stakes, proxy_new_stake, proxy_recover_stake, request_rejected, take_borrower_fee, take_profit), the unstake-all chain (send_unstake_all, proxy_unstake_all, unstake_all) and withdraw_surplus. hipo_finance_request_loan keeps its released layout (share uint8); later layouts are versioned: _v2 (share uint16), _v3 (no share) and _v4 (max_stake). Requests sent from 2026-09-05 on, which decoded as hipo_finance_request_loan with the share misread, now decode as _v2/_v3/_v4. Message decoders now honor fixed_length, which was documented but only applied to jetton and nft payloads: a fixed_length message whose body is longer than declared stays an unknown op. This also tightens the existing fixed_length ops (tonstake, whales nominators, delete_dns_record, top_up, credit, approve, disapprove, stonfi_payment_request). The request_loan layouts, the round externals and the short Hipo ops are fixed_length, so an undeclared request_loan layout, a wallet external whose signature starts with a round op code, or another protocol's longer message with a Hipo op code are not mislabeled. Co-Authored-By: Mikhail Alpinskiy <ama1185@ya.ru> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lite server and tycho node tests fail in CI whenever the remote node is out of sync or unreachable. Skip them when CI is set, as the other network tests already do. TestParseAddress now resolves DNS through lazyResolver, so it only connects for the DNS cases (already skipped in CI) and the offline cases keep running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for picking this up, and for fixing the CI failures along the way. I've read #506 against #504. The Hipo schema is the same: the same ops, and hipo_finance_request_loan keeps its released layout with the later ones as _v2, _v3 and _v4. Enforcing fixed_length is fine for Hipo. Every real mainnet message I tested in #504 is consumed exactly by its layout, so nothing that decodes today stops decoding. It also gives the behaviour I wanted for request_loan: if a future treasury release appends a field, the message stays an unknown op until a new layout is declared, instead of being decoded with the wrong fields. I'll send a follow-up PR whenever a release changes one of these bodies. I'm closing #504 in favour of this one. Once it is merged and tagged, I'll bump tongo in opentonapi #971, which I rebased onto master today after API-236. |
Add the round lifecycle externals (participate_in_election, vset_changed, finish_participation), the loan ops (decide_loan_requests, process_loan_requests, recover_stakes, proxy_new_stake, proxy_recover_stake, request_rejected, take_borrower_fee, take_profit), the unstake-all chain (send_unstake_all, proxy_unstake_all, unstake_all) and withdraw_surplus.
hipo_finance_request_loan keeps its released layout (share uint8); later layouts are versioned: _v2 (share uint16), _v3 (no share) and _v4 (max_stake). Requests sent from 2026-09-05 on, which decoded as hipo_finance_request_loan with the share misread, now decode as _v2/_v3/_v4.
Message decoders now honor fixed_length, which was documented but only applied to jetton and nft payloads: a fixed_length message whose body is longer than declared stays an unknown op. This also tightens the existing fixed_length ops (tonstake, whales nominators, delete_dns_record, top_up, credit, approve, disapprove, stonfi_payment_request). The request_loan layouts, the round externals and the short Hipo ops are fixed_length, so an undeclared request_loan layout, a wallet external whose signature starts with a round op code, or another protocol's longer message with a Hipo op code are not mislabeled.