-
Notifications
You must be signed in to change notification settings - Fork 631
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
Feat(eth-wallet-contract): reproducible build #11011
Feat(eth-wallet-contract): reproducible build #11011
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #11011 +/- ##
==========================================
+ Coverage 71.22% 71.24% +0.01%
==========================================
Files 760 760
Lines 152630 152630
Branches 152630 152630
==========================================
+ Hits 108711 108738 +27
+ Misses 39481 39449 -32
- Partials 4438 4443 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Approving to unblock. I haven't actually reviewed. Best to wait for @staffik to do a pass.
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.
LGTM
Can we add instruction cargo test -p near-wallet-contract --features nightly
to README?
I am asking because cargo build --features nightly
did not work because of include_bytes
in read_contract
.
@staffik could you elaborate more on the error you got? This command does work on my machine. It works whether or not |
I've removed
|
Hmm, that is strange. I do not know why the build logic would not trigger to create the missing file. I know it's time-consuming to do this, but when it's not an interruption for you to do so (like when you're about to go for a break or something), could you try running |
The same issue even when I did
|
Weird that even I'm doing a bit of refactoring of the build process in the next PR I have planned. So I think I'll merge this PR for now and we can continue debugging this in the next PR. |
Continuing with the work on eth-wallet contract, this PR adds a reproducible build process. It uses the Docker image recommended in near-sdk-rs. Note that the reproducible build process is skipped if the wasm file is already present and it is still committed to the repo. This is intentional because it means developers not wanting to worry about the eth-wallets contract can safely ignore it entirely when setting up their development environment. However, it does mean that any changes to the wallet contract implementation will also require locally deleting the wasm file and then running the build process to generate the new wasm file. The test that checks the hash of the wasm file will also need to be updated with whatever the new hash is.
For reviewers: please try deleting the wasm file yourself and running the build process (e.g. with
cargo test -p near-wallet-contract --features nightly
) to ensure that it is indeed reproducible across machines.This PR also sets the value of
ADDRESS_REGISTRAR_ACCOUNT_ID
equal to the agreed upon valueaddress-map.near
. This account exists on both testnet and mainnet so the same value can be used for both networks. For now Aurora holds the keys to this account, but once we are sure the address registrar contract implementation (present in the previous eth wallet PR) will not change (e.g. after it has been audited) then we will delete the keys from that account to lock the contract implementation.