Governance claim gate has no production writer, lock_balance helper has zero callers

Hi team

Finding, framed as a defect and not an exploit: calling claim with no MemberShares insert fails with the exact gate error AuthorityNotGovernor, and MemberShares stays at zero. Genesis and the presets seed only NetworkShares and GlobalShares; no MemberShares field exists at all. A repo-wide writer search shows lock_balance is written only in tests, in benchmarking, and inside claim after the gate, so the helper has zero production callers.

Suggested fix: add a production writer for member shares, or remove the gate.

Shahmeer

Adding the full reproduction detail. Framed as a defect, not an exploit.

Location: pallets governance src lib dot rs, claim at lines 344 to 363 reads MemberShares locked_balance and requires at least MinimumDonation, else the exact gate error AuthorityNotGovernor, before any other work.

Repo-wide writer search for locked_balance and MemberShares finds writers only in governance tests dot rs lines 113 and 234, governance benchmarking dot rs lines 75 and 77, and the claim body itself at line 410, which rewrites the member share after the gate. The lock_balance helper at lines 139 to 142 has zero callers in the entire repo. No extrinsic in the pallet sets locked_balance.

Genesis build at lines 312 to 342 seeds only NetworkShares and GlobalShares from network claims. The shipped casper presets at genesis_config_presets dot rs line 306 pass only network claims into ghostGovernance. The MemberShares storage type has no genesis field at all, so genesis cannot seed it. MinimumDonation in the shipped runtime is 6900 times STRH.

Executed: a new pallet test calling claim with no MemberShares insert fails with the exact gate error AuthorityNotGovernor, and the MemberShares count is zero before and after. The existing tests claim_happy_path and partial_claims_happy_path pass only with the direct insert, confirming the tests insert the state production never writes. Full governance suite 6 of 6 passing.

One stated caveat: a sudo-dispatched storage write is theoretically possible since the runtime ships a sudo pallet, so this is 95 percent, not 100.

Suggested fix: add a production writer for member shares, or remove the gate.

Shahmeer

Thank you for your report!

You are right here. The governance pallet is a draft that only needs to hold the genesis hashes for now. There’s no actual logic yet besides claiming - all other functionality will be added in the future and applied via a forkless upgrade, in order to avoid multiple redeployments of the testnet.

But thank you for your carefulness.