Skip to content

Hardening merge - #96

Open
michaelvic123 wants to merge 2 commits into
AnonVote:mainfrom
michaelvic123:hardening-merge
Open

Hardening merge#96
michaelvic123 wants to merge 2 commits into
AnonVote:mainfrom
michaelvic123:hardening-merge

Conversation

@michaelvic123

Copy link
Copy Markdown
Contributor

Change
STABILITY.md — 24 error discriminants, 16 storage keys, 18 event topics documented as immutable
validation.rs — validate_hex_hash returning Result for ?-based error propagation
lib.rs DataKey::Initialized — explicit init flag instead of implicit Admin presence
lib.rs zero-address guard — initialize rejects null address with InvalidAdminAddress = 25
lib.rs hash validation — record_token/record_vote validate ballot_id_hash via validate_hex_hash
lib.rs overflow events — record_token/record_vote emit ("counter", "ovrflw") on u32::MAX
All existing upstream features (multi-sig, Merkle proofs, pause/unpause, upgrades, limits, batch, expiration) are preserved. The only non-additive change is removing .github/workflows/ci.yml (it exists on AnonVote/contracts:main so the merge is a no-op for that file).
Visit the link above to create the PR.

closes #90

Tobi Olusanya added 2 commits July 30, 2026 00:25
… zero-address guard, overflow events

- STABILITY.md documents 24 ContractError discriminants, storage keys,
  and event topics as immutable after deployment
- validation.rs adds validate_hex_hash returning Result for ergonomic
  ?-based error propagation in write functions
- lib.rs: DataKey::Initialized flag (explicit initialization tracking),
  zero-address rejection in initialize (InvalidAdminAddress = 25),
  hash validation and overflow events in record_token/record_vote
- Build blocked by Windows AppLocker policy (os error 4551) on
  stellar-xdr build script; code compiles past parsing
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.

Contract validation and error handling

1 participant