Skip to content

Halborn audit#457

Merged
carrion256 merged 193 commits into
devfrom
halborn-audit
Jun 4, 2026
Merged

Halborn audit#457
carrion256 merged 193 commits into
devfrom
halborn-audit

Conversation

@carrion256

@carrion256 carrion256 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Will be pushed onto spr/refactor/vault-ergonomics/4f330057 #417 when audit is complete

This change is Reviewable

Add PendingActions::from_entries constructor and IntoIterator implementations
for both owned and borrowed iteration. Add Restrictions helper methods:
- blacklist/whitelist constructors for cleaner instantiation
- normalized() for canonical form
- members() for accessing member list

Also add normalize_members helper to deduplicate member lists.
Replace duplicated bucket push logic with private helper method
push_validated_entry. Used by both insert() and filter_without_leases()
to reduce code duplication and centralize length tracking.
Replace linear search through assignments with RoleSet bit operations:
- Add role_set_for helper returning RoleSet for an address
- Optimize has_role to use RoleSet::contains
- Optimize get_roles to use RoleSet filtering
- Optimize is_allowed to compare RoleSet directly

This reduces O(n) scans to O(1) bit operations.
@carrion256
carrion256 merged commit 9ed2a92 into dev Jun 4, 2026
27 checks passed
@carrion256
carrion256 deleted the halborn-audit branch June 4, 2026 16:06
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.

1 participant