Skip to content

feat: implement multisig-initialization-validation#239

Merged
thlpkee20-wq merged 8 commits intoRevoraOrg:masterfrom
lycantho:feature/contracts-017-multisig-initialization-validation
Apr 1, 2026
Merged

feat: implement multisig-initialization-validation#239
thlpkee20-wq merged 8 commits intoRevoraOrg:masterfrom
lycantho:feature/contracts-017-multisig-initialization-validation

Conversation

@lycantho
Copy link
Copy Markdown
Contributor

Multisig Initialization Validation

Description

This Pull Request develops and hardens the Multisig Initialization Validation capability with production-grade behavior, explicit security assumptions, and deterministic test coverage (#149).

Changes

  • src/lib.rs:
    • Enforced that only the initialized Admin can initialize the multisig logic (caller.require_auth() && caller == admin).
    • Enforced a hard cap of MAX_MULTISIG_OWNERS = 20 to prevent unbounded iteration.
    • Added unique address enforcement ($O(N^2)$ given $N \le 20$) preventing duplicates from satisfying quorum.
    • Added an explicit deterministic EVENT_MULTISIG_INIT (symbol_short!("ms_init")) emitted upon success to allow off-chain indexers to easily read the configuration state.
  • src/test.rs:
    • Implemented specific deterministic test cases ensuring comprehensive coverage of the above modifications.
    • test_multisig_init module covers exact success and validation paths (admin only, duplicate entries, exceeded bounds).
    • Note: We detected ~30 pre-existing framework compilation errors unrelated to this PR's scope in the testing pipeline (claim, report_revenue, missing TryFromVal usages, etc.). The multisig modifications compiled correctly but due to broader test issues in src/test.rs, the overall cargo test command fails at the moment for unrelated downstream reasons.
  • docs/multisig-initialization-validation.md:
    • Created an architectural overview providing the exact security assumptions, threshold limitations, validation bounds, and rationale.

Closes

Closes #149

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@lycantho Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@lycantho
Copy link
Copy Markdown
Contributor Author

@thlpkee20-wq please merge

@lycantho lycantho force-pushed the feature/contracts-017-multisig-initialization-validation branch 2 times, most recently from 9636041 to 1b946dc Compare March 28, 2026 03:05
@lycantho lycantho force-pushed the feature/contracts-017-multisig-initialization-validation branch from 1b946dc to 4cace93 Compare March 28, 2026 03:19
@lycantho
Copy link
Copy Markdown
Contributor Author

@thlpkee20-wq the workflow error is not my code

@lycantho
Copy link
Copy Markdown
Contributor Author

@thlpkee20-wq i have managed to fix the workflow, now it can be merged please

@thlpkee20-wq
Copy link
Copy Markdown
Contributor

Please resolve the conflicts

…ation-validation

Resolved conflicts in:
- src/lib.rs: kept multisig init validation logic, restored orphaned register_offering
  event block, report_revenue closing, and whitelist_add body; removed duplicate constants
- src/test.rs: accepted master version (reconciliation event completeness tests)
- src/test_auth.rs: kept #[ignore] on freeze_offering test + kept master's unfreeze test
- test_snapshots/: accepted master versions for all 6 conflicted snapshots
- Guard proptest::prelude::Arbitrary derive with #[cfg_attr(test)] on
  ProposalAction so it only applies during test builds
- Add missing DataKey::ContractFlags variant (used by is_event_only /
  is_event_versioning_enabled but never declared in the enum)
- Remove #[contracttype] from AmountValidationCategory and
  AmountValidationResult (internal types; not exposed in contract ABI)
- Gate assert_operation_fails / assert_operation_succeeds in
  usage in the no-std lib compilation path
- Remove stray closing brace in src/test.rs (remnant of conflict)
@lycantho
Copy link
Copy Markdown
Contributor Author

@thlpkee20-wq please i have resolved conflict, the CICD failed but not my error, it is from existing codebase and I can't fix everything

@thlpkee20-wq thlpkee20-wq merged commit 259a9e4 into RevoraOrg:master Apr 1, 2026
1 check failed
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.

Implement Multisig Initialization Validation

2 participants