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

Set processed_link_refs to true only in setup or constructor #916

Merged
merged 8 commits into from
Dec 16, 2024

Conversation

palinatolmach
Copy link
Collaborator

@palinatolmach palinatolmach commented Dec 15, 2024

Related: #861 and #838.

This PR fixes an issue identified by @lisandrasilva, where the second of two proofs calling a dynamically linked library fails when they're executed sequentially. The <accounts> cell of the second proof is missing an account corresponding to the library, which is present when the proof is run in isolation (or with -j2 in parallel with the first one) and the proof is then passing.

This PR changes the logic of re-deploying dynamically linked libraries by ensuring it doesn't happen only if we've run init or setUp method for a contract, in which case it'll be grafted onto the proof; otherwise, the libraries will be deployed for every individual proof.

It also adds a second test testSum to ExternalLibTest.

Copy link
Contributor

@anvacaru anvacaru left a comment

Choose a reason for hiding this comment

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

Good catch!

src/tests/integration/test-data/foundry-prove-all Outdated Show resolved Hide resolved
src/tests/integration/test-data/foundry-prove-skip-legacy Outdated Show resolved Hide resolved
@palinatolmach palinatolmach self-assigned this Dec 16, 2024
@automergerpr-permission-manager automergerpr-permission-manager bot merged commit eb5f0ca into master Dec 16, 2024
12 checks passed
@automergerpr-permission-manager automergerpr-permission-manager bot deleted the fix-library-deployment branch December 16, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants