Skip to content

Roa: carve sysio's account-creation RAM out of tier 1 at activation - #640

Merged
heifner merged 2 commits into
masterfrom
fix/roa-sysio-bootstrap-carveout
Sep 25, 2026
Merged

heifner merged 2 commits into
masterfrom
fix/roa-sysio-bootstrap-carveout

Conversation

@heifner

@heifner heifner commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every node-owner registration wrote a permanently locked policy granting sysio 10% of the owner's tier allocation — for all three tiers. It shows up in node-owner UIs as a policy to sysio locked until block 4,294,967,295. The agreed design is a single carve-out from tier 1 (the tier that creates accounts), made at bootstrap.

  • activateroa now funds sysio's pool with 10% of every tier-1 slot's allocation up front, registered or not.
  • regnodeowner no longer writes a sysio policy or touches sysio's reslimit/quota.
  • Tiers 2 and 3 contribute nothing and keep their whole allocation.
  • nodeowners.total_sys records the owner's budget net of the carve-out, so allocated_sys is exactly the sum of the policies an owner has issued.

Why the policy row can go

It was inert. reducepolicy requires current_block >= time_block and it was written at UINT32_MAX; extendpolicy requires a strictly larger time_block. The owner's budget debit lives in nodeowners.allocated_sys and the credit was applied straight to sysio's reslimit, so nothing read the row. sysio's bootstrap pool never had a backing policy either.

Numbers at the launch config

75,496 SYS, 104 bytes/unit, 1,144 bytes/account:

T1 T2 T3
Tier allocation 3,019.8400 SYS 113.2440 SYS 2.2649 SYS
Owner budget (total_sys) 2,717.8560 SYS 113.2440 SYS 2.2649 SYS
Pool Before After
sysio at activation ~157 MB, growing to ~7.98 GB as all owners register 6.75 GB (~5.90M accounts)
sysio.roa ~157 MB ~157 MB (unchanged)

Supply is conserved exactly: sysio.roa + sysio + sysio.acct seed + every owner budget = total_sys × bytes_per_unit.

Deployment

The T3 resource share (0.003% in code vs. 0.00045% in the whitepaper) is a separate open question; it changes the leftover that also feeds sysio's pool.

activateroa now funds sysio's pool with 1/10 of every tier-1 slot's
allocation up front, instead of regnodeowner granting 1/10 of every
tier's allocation one registration at a time through a permanently
locked policy row. Tier 1 is the tier that creates accounts; tiers 2
and 3 no longer contribute and keep their whole allocation.

The removed row did nothing: it could never be reduced or extended, and
the budget debit and quota credit it described were applied directly.
nodeowners.total_sys now records the owner's budget net of sysio's
share, so an owner's allocated_sys is exactly the sum of the policies
it has issued.

Dropping the registration grant also removes its absolute re-sync of
sysio's quota from the reslimit row, which refunded the gift taken by
each plain newaccount since the previous registration.
@heifner
heifner requested review from a team and huangminghuang September 24, 2026 17:34
huangminghuang
huangminghuang previously approved these changes Sep 25, 2026

@huangminghuang huangminghuang 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.

Reviewed the diff and relevant resource-accounting paths. No actionable findings for the documented pre-launch, fresh-bootstrap deployment. Required CI checks passed. Existing activated chains would need a separate migration for stored allocations and locked policies.

…trap-carveout

The only conflict is sysio.roa.wasm; every source file merges clean. Rebuilt from the merged tree with wire-cdt master (a00bd7187, which includes #119). That CDT reproduces master's committed sysio.roa.wasm byte-for-byte, as it does every other contract except sysio.bios (untouched on both sides, left as committed), so the new binary differs from master's only by this branch's source change. sysio.roa.abi is unchanged.
@heifner
heifner merged commit beb084a into master Sep 25, 2026
12 checks passed
@heifner
heifner deleted the fix/roa-sysio-bootstrap-carveout branch September 25, 2026 20:04
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