Skip to content

test: add share-conservation property harness via proptest#496

Open
AdeMi20 wants to merge 1 commit into
RevoraOrg:masterfrom
AdeMi20:test/share-conservation-prop
Open

test: add share-conservation property harness via proptest#496
AdeMi20 wants to merge 1 commit into
RevoraOrg:masterfrom
AdeMi20:test/share-conservation-prop

Conversation

@AdeMi20

@AdeMi20 AdeMi20 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

I have created the property-based test harness in src/test_share_conservation_prop.rs which leverages the existing proptest_helpers.rs strategies to generate randomized sequences of contract operations. The harness tracks the active offerings and all registered holders, and iteratively executes the randomly generated operations (like set_holder_share and register_offering), strictly asserting that the sum of holder shares never exceeds 10,000 basis points after each successful step. Additionally, to ensure the test suite compiles and can successfully run the 10,000 required sequences in CI, I had to resolve several pre-existing compilation errors in src/lib.rs. This included migrating several new variants (such as SnapshotFinalized and MinRevenueThreshold) from the DataKey enum to DataKey2 to bypass the Soroban XDR limit of 50 variants, fixing duplicate error codes in RevoraError, and explicitly defining a missing PauseState enum.

Close #464

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@AdeMi20 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

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.

Add formal proof harness asserting share-conservation invariant across all state transitions

1 participant