-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix(ctb): N-03 Assert for impossible condition #3449
Conversation
🦋 Changeset detectedLatest commit: f873a73 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
03f22b3
to
bdb754a
Compare
100% on getting the SMT checker going. Do you know of anything better than the solidity docs for an intro on getting going with it? |
This looks interesting, though not directly useful without installing dapp: https://fv.ethereum.org/2021/12/01/smtchecker-dapptools/ For what little I've used it in the past I've just referred to the official docs. |
bdb754a
to
b0eb1d6
Compare
Hey @maurelian! This PR has merge conflicts. Please fix them before continuing review. |
This looks like it needs a rebase before merge, but the code looks good to me |
This PR has been added to the merge queue, and will be merged soon. |
This PR is next in line to be merged, and will be merged as soon as checks pass. |
Description
Uses assert rather than a require statements to check for conditions we believe are unreachable.
This is more semantically explicit, and should enable us to more effectively use some advanced analysis methods in our testing.
IMO it's also more readable.
Tests
We don't have a good harness in place for verifying that code is unreachable. Making use of Solidity's SMTChecker would be good to do eventually.