Skip to content

Bill sysio.bond Bonds Rows to the Sysio RAM Pool - #762

Open
heifner wants to merge 3 commits into
masterfrom
fix/bond-rows-bill-sysio
Open

heifner wants to merge 3 commits into
masterfrom
fix/bond-rows-bill-sysio

Conversation

@heifner

@heifner heifner commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

sysio.bond::accept billed the bonds row to the underwriter, the only row in the depot a batch operator needed RAM for. It now bills sysio, as the other depot contracts' rows do. The row exists only against locked bond tokens and there is at most one per underwriter per request, so it is not a free write.

An issuer's requests and escrows rows are unchanged: any account may open a request, with a statement of its own size, so those stay issuer-paid.

The ABI is unchanged and sysio.bond.wasm is rebuilt.

Merge before wire-tools-ts feature/bootstrap-without-t1-node-owner, which stops granting underwriting operators RAM.

An underwriter's `bonds` row was the one depot row a batch operator paid RAM for. It exists only against locked bond tokens, at most one per underwriter per request, so the `sysio` pool carries it. An issuer's `requests` and `escrows` rows stay issuer-paid.

Change-Id: I4ec67c7cc24ee2f1c73a4be52ffa0d7273b174c8
Change-Id: Icf3edf15882444d519d2e4da940c876217370417
Change-Id: I83a058348c11b9dfbb155eaa6835d40c5f78c69d
@heifner
heifner requested a review from valthon November 11, 2026 01:57

@valthon valthon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description is misleading. Sounds like we're changing the payer for all bond use, but once i got into the code it's clear we're only doing it for privileged accounts (despite removing a critical test). Please fix description and restore the missing test.

Comment on lines -858 to +860
// A bond row bills its underwriter; the request row the accept updates stays the issuer's.
BOOST_FIXTURE_TEST_CASE(accept_bills_the_underwriter, sysio_bond_tester) try {
// A bond row bills the sysio RAM pool, never its underwriter; the request row the accept updates
// stays the issuer's.
BOOST_FIXTURE_TEST_CASE(accept_bills_sysio, sysio_bond_tester) try {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love removing the general test, since it should still be applicable. Could you instead create a new test for the privileged account case and keep the old test passing as it was (with the non-privileged user paying)?

This branch has not been deployed

No deployments
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.

2 participants