-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the Arbitrary fuzzing trait for contract value-types #715
Conversation
Rebased. |
Just a heads up: we are in the middle of a significant env/sdk rewrite that is definitely going to affect this and SDK PRs to some degree. Due to that I would be inclined to wait until the rewrite is landed (should happen in a few days). Thanks for the work and sorry for slow review. |
05704f4
to
71f73d7
Compare
Rebased. |
Is the |
I removed the implementation of Arbitrary for SymbolSmall. The only Arbitrary implementation left now in this crate is for Status. I'm not clear on whether contract authors can still access this type or not. It may be that none of the non-object contract types need to implement Arbitrary. |
Yeah, it's still exposed, so probably we still need this.
|
Let's wait a bit with merging this to get it into the next release (the current release happens right now and there is also the SDK change which we won't have time to merge into it) |
What
Implement the Arbitrary trait for Symbol, BitSet, Static, and Status.
Why
This is a prerequisite for more complete fuzzing support in soroban-sdk: stellar/rs-soroban-sdk#878
This patch is only needed if that patch is to be accepted.
This patch also tweaks and reexports the
call_with_suppressed_panic_hook
function,which is used by the sdk patch to provide users a helper function for catching panics in fuzz tests.
A more complete description is in the above link.
Known limitations
See sdk PR.