fix(roa): increase account name retries - #627
Conversation
Change-Id: I920a29ab8cb377bb1571c29c4b414d04f9205ce1
heifner
left a comment
There was a problem hiding this comment.
Rebuilt every contract at this head: all 40 compiled artifacts reproduce byte-for-byte, and sysio.roa.wasm differs from master only in the loop bound and the message string. The other refreshes fix real staleness on master without changing chain behavior: sysio.msgch.wasm never picked up #579's chain_row change, the msgch/uwrit ABIs missed #609's three attestation types, and sendinline.wasm is function-order drift only. No snapshot, deep-mind or consensus reference data needs regenerating; those fixtures replay recorded blocks or never load roa. The new test fails against master's wasm and against a MAX_ACCOUNT_NAME_ATTEMPTS = 3 build, so it does exercise the retry path.
Inline comments cover the seed (the main source of retries), the constant's type and message, and test gaps. Also:
- The
newuserricardian text insysio.roa.hppstill says the action fails "if the account already exists". It retries instead, and fails when no free name turns up withinMAX_ACCOUNT_NAME_ATTEMPTScandidates, on a reused nonce, for a creator name over 10 characters, or while ROA is inactive. - This doesn't change the WNS-30 exposure (each
newuserstill drawsnewaccount_ramfrom the sharedsysiopool with no per-sponsor allowance), so it shouldn't count toward WIRE-373 despite the branch name. - Binary conflicts with #614 (roa), #594 (msgch, roa), #603 and #592 (msgch): whichever lands second needs to rebuild from the merged source rather than pick a side.
…t-name-retries Change-Id: I0d4839652cd77e2027a04e8ba1f93ab97c8b503b
…t-name-retries Change-Id: If7a7a6667b226ba5c350e8d38becade720c68cbd
Change-Id: I05208d94d0ffa8aff28d7a84190b60e34cbf3707
…t-name-retries Change-Id: I5574ace1ae317d26b3b64dacc942eac50881c585
|
Addressed the remaining review notes in follow-up commit 3205781 and pushed the current head b3e3e99. The newuser documentation now lists its actual failure conditions, and the generated contract artifacts were rebuilt after merging the latest master. On the branch name: GitHub closes an open PR when its head branch is renamed and does not support retargeting an existing PR head, so I retained the current branch to preserve PR #627 and its review history. The PR title and refreshed description present this as the standalone ROA account-name fix and do not claim it as a WIRE-373 mitigation. GitHub behavior: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch |
Summary
sysio.roa::newusergenerated-account search from 3 to exactly 100 attempts while retaining deterministic bounded execution.Why
newuserpreviously rejected account creation after only three occupied generated names. Its seed also combined name-valued nonces and block numbers linearly, allowing related nonces in different blocks to walk the same candidate sequence and making retries substantially more likely than namespace occupancy alone would imply.The revised generator decorrelates the block input and searches exactly 100 candidates. This preserves deterministic, bounded WASM execution while preventing avoidable sequence aliasing and making collision-induced rejection negligible until the creator's generated namespace is genuinely exhausted.
Validation
sysio_roa_tests: 70/70 cases and 1,428/1,428 assertions passed independently undersys-vm,sys-vm-jit, andsys-vm-oc..wasmand.abioutputs match the ON/ON build outputs.