Skip to content
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

Verify with immutableReferences #973

Merged
merged 10 commits into from
Apr 3, 2023
Merged

Verify with immutableReferences #973

merged 10 commits into from
Apr 3, 2023

Conversation

kuzdogan
Copy link
Member

@kuzdogan kuzdogan commented Mar 29, 2023

Uses the immutableReferences output of the compiler to set the immutable values in the onchain bytecode to 0000... before matching. Saves them in a file called immutable-references.json.

Fix #972

  • Lowers the branch threshold to 60%. I've added some tests to increase coverage but branch coverage is left as something for the future.
  • Adds the CREATE2 test to lib-sourcify too
  • Adds additional lib-sourcify tests.
  • Removes the "simulation" and creatorTxHash tests but adds them as unit tests below.
  • Add unit test for the replaceImmutableReferences function.
  • Skips etherscan rate limit tests as they seem to be inconsistent. Left for the future.
  • Remove constructor args checks from monitor tests as immutbles are no longer handled by verifyWithCreatorTx.

View in Huly HI-709

@kuzdogan kuzdogan marked this pull request as ready for review March 31, 2023 10:57
Copy link
Member

@marcocastignoli marcocastignoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking at this, I think that the only case in which other verification methods are useful is when the compiler can't generate the ImmutableReferences object, but can it happen?

I'm in favor for keeping this as the only verification method.

@kuzdogan
Copy link
Member Author

kuzdogan commented Apr 3, 2023

After looking at this, I think that the only case in which other verification methods are useful is when the compiler can't generate the ImmutableReferences object, but can it happen?

I'm in favor for keeping this as the only verification method.

I don't think that would ever happen. That'd be a compiler bug.

Ok, good. Still we should not remove it immediately but after making sure we won't need them

@kuzdogan kuzdogan merged commit 1ef0e73 into staging Apr 3, 2023
@kuzdogan kuzdogan deleted the immutable-references branch May 10, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using immutableReferences in verification
2 participants