This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
feat: calculate-hashes command to detect contract changes #37
Merged
benceharomi
merged 26 commits into
dev
from
bh-evm-290-detect-when-bootloader-hash-has-changed
Oct 18, 2023
Merged
feat: calculate-hashes command to detect contract changes #37
benceharomi
merged 26 commits into
dev
from
bh-evm-290-detect-when-bootloader-hash-has-changed
Oct 18, 2023
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
benceharomi
requested review from
StanislavBreadless and
vladbochok
as code owners
October 6, 2023 17:16
This reverts commit 639650b.
mm-zk
approved these changes
Oct 10, 2023
vladbochok
reviewed
Oct 16, 2023
nateawelch
approved these changes
Oct 16, 2023
benceharomi
changed the title
feat: calculate-hashes
feat: calculate-hashes to detect contract changes
Oct 18, 2023
benceharomi
changed the title
feat: calculate-hashes to detect contract changes
feat: calculate-hashes command to detect contract changes
Oct 18, 2023
benceharomi
deleted the
bh-evm-290-detect-when-bootloader-hash-has-changed
branch
October 18, 2023 13:22
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What ❔
Created a
calculate-hashes
script that saves the hash of the preprocessed source code and bytecode of the system contracts.Why ❔
We should clearly see when bootloader (and account abstraction) hashes have changed.
We should have a file in the repo, that contains the current hashes (of both compiled and source codes - as for bootloader and AA - we actually do some preprocessing of the source code).
we could have a small tool in era-system-contracts, that computes the hash of the compiled file (using zksync_utils::bytecode::hash_bytecode) and also a hash of the source code - and compares it with the hashes that are in the file.
This way, whenever we do the change, the PR would also contain the changes to that file.
Checklist
yarn prettier:write
andyarn lint:fix
.