-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
π Upgrade to Vyper Version 0.4.0
and Make All π snekmate
Contracts Module-Friendly
#207
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
pcaversaccio
added
feature π₯
New feature or request
dependencies π
Pull requests that update a dependency file
optimisation β‘οΈ
Code optimisations (e.g. gas improvements)
ci/cd π·ββοΈ
CI/CD configurations
labels
Feb 19, 2024
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: sudo rm -rf --no-preserve-root / <pcaversaccio@users.noreply.github.com>
### π Changelog All π snekmate contracts now target the new Vyper default EVM version `cancun` (see vyperlang/vyper#4029). I also bump the Vyper version to the latest release candidate [`v0.4.0rc5`](https://github.com/vyperlang/vyper/releases/tag/v0.4.0rc5). --------- Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
### π Changelog This PR adds [`halmos`](https://github.com/a16z/halmos)-based symbolic tests for the `erc20`, `erc721`, `erc1155`, and `math` contracts (closes #180). The `erc721` and `erc1155` tests each take substantial amount of time as part of the CI. Hence, we run the new `halmos` CI pipeline each day at 03:30 a.m. (= "nightly" tests) as scheduled `cron` job instead of integrating it into the normal `push` and `pull_request` pipeline. Furthermore, the `halmos`-based `math` tests `testHalmosAssertMulDiv`, `testHalmosAssertWadLn`, `testHalmosAssertWadExp`, `testHalmosAssertCbrt`, and `testHalmosAssertWadCbrt` face out of memory issues as the timeout for the Z3 solver does not work for the queries of these tests. Thus, these tests are currently commented out. Additionally, the test `testHalmosAssertNoBackdoor` in the `erc721` and `erc1155` contracts is currently commented out due to performance and reverting path issues in `halmos`. Eventually, we target the `main` `halmos` branch (= "nightly" version) in the CI pipeline and use the [Yices 2 SMT solver](https://github.com/SRI-CSL/yices2). --------- Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
### π Changelog Replace the Homebrew-based Yices 2 SMT solver installation in the `halmos` CI pipeline with `apt-get` (i.e. pulling directly the binaries). This will speed up the installation considerably (Homebrew installs the Yices 2 SMT solver from the source). --------- Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
### π Changelog Using directly interface events leads to a cleaner code structure, i.e. they do not have to be redefined in a module contract. In addition, we adjust the upper bound for the batch calls in the `erc1155` contract to `128` (and an `uint8` type), reduce the upper bound for the return value of `eip712Domain` to `32`, and implement a `constant` parameter `_DYNARRAY_BOUND` for the dynamic arrays in the `merkle_proof_verification` contract. --------- Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
### π Changelog This PR adds documentation on how to use π snekmate contracts as modules. --------- Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
### π Changelog The PRs a16z/halmos#296 and a16z/halmos#298 have added support for configuration files in `halmos` (https://github.com/a16z/halmos). This PR refactors the configurations currently used inline via the CLI and moves them to the new configuration file `halmos.toml`, which is located in the `test/` subdirectory. I also rename the configuration file `echidna-config.yaml` to `echidna.yaml` and move it to the subdirectory `test/` as well. Eventually, I bump the submodules `FreshCryptoLib` (https://github.com/rdubois-crypto/FreshCryptoLib) and `properties` (https://github.com/crytic/properties) to the latest available commit. --------- Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: sudo rm -rf --no-preserve-root / <pcaversaccio@users.noreply.github.com>
pcaversaccio
changed the title
π Upgrade Vyper Version to
π Upgrade to Vyper Version Jun 3, 2024
0.4.0
and Make All π snekmate
Contracts Module-Friendly0.4.0
and Make All π snekmate
Contracts Module-Friendly
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
pcaversaccio
commented
Jun 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ci/cd π·ββοΈ
CI/CD configurations
dependencies π
Pull requests that update a dependency file
documentation π
Improvements or additions to documentation
feature π₯
New feature or request
optimisation β‘οΈ
Code optimisations (e.g. gas improvements)
refactor/cleanup β»οΈ
Code refactorings and cleanups
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββ
π Changelog
We bump the Vyper version to the latest breaking release
0.4.0
(technically, since Vyper0.4.0
has not been released yet, we use the latest release candidate0.4.0rc6
instead), which implements stateless (see vyperlang/vyper@c6f457a) and stateful modules (see vyperlang/vyper@8ccacb3). Furthermore, all existingπ snekmate
contracts have been refactored to be module-friendly (closes #221):ownable
(β»οΈ MakeOwnable
Module-FriendlyΒ #218)ownable_2step
(β»οΈ MakeOwnable2Step
Module-FriendlyΒ #219)access_control
(β»οΈ MakeAccessControl
Module-FriendlyΒ #216)erc2981
(β»οΈ MakeERC2981
Module-FriendlyΒ #233)erc4626
(β»οΈ MakeERC4626
Module-FriendlyΒ #236)timelock_controller
(β»οΈ MakeTimelockController
Module-FriendlyΒ #220)erc20
(β»οΈ MakeERC20
Module-FriendlyΒ #234)erc721
(β»οΈ MakeERC721
Module-FriendlyΒ #237)erc1155
(β»οΈ MakeERC1155
Module-FriendlyΒ #238)base64
(β»οΈ MakeBase64
Module-FriendlyΒ #222)batch_distributor
(β»οΈ MakeBatchDistributor
Module-FriendlyΒ #223)create_address
(β»οΈ MakeCreateAddress
Module-FriendlyΒ #224)create2_address
(β»οΈ MakeCreate2Address
Module-FriendlyΒ #225)ecdsa
(β»οΈ MakeECDSA
Module-Friendly and Carve Out the Message Hash MethodsΒ #227)message_hash_utils
(β»οΈ MakeECDSA
Module-Friendly and Carve Out the Message Hash MethodsΒ #227)signature_checker
(β»οΈ MakeSignatureChecker
Module-FriendlyΒ #228)eip712_domain_separator
(β»οΈ MakeEIP712DomainSeparator
Module-FriendlyΒ #229)math
(β»οΈ MakeMath
Module-FriendlyΒ #230)merkle_proof_verification
(β»οΈ MakeMerkleProofVerification
Module-FriendlyΒ #231)multicall
(β»οΈ MakeMulticall
Module-FriendlyΒ #232)Furthermore, this PR closes the following issues:
P256Verifier
to π snekmateΒ #175 (π₯ Add NIST P-256 (a.k.a.secp256r1
) ECDSA Verification FunctionΒ #243),stateful
(a.k.a.invariant
) TestsΒ #184 (π₯ Addechidna
-Based Property TestsΒ #239),halmos
-Based Symbolic TestsΒ #240).Eventually, the following changes are implemented:
snake_case
notation for module and mock contracts. (β»οΈ Usesnake_case
Notation for Module and Mock ContractsΒ #242)_log_2
,_log_10
, and_log_256
are renamed to_log2
,_log10
, and_log256
. (β»οΈ Usesnake_case
Notation for Module and Mock ContractsΒ #242)πΆ Cute Animal Picture