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

fix: metadata journal can rollback incorrectly #3569

Merged
merged 5 commits into from
Sep 5, 2023

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Aug 28, 2023

call register_update when node has already been updated in this "frame"

note this does not change any observed functionality in the compiler because writes to the metadata journal inside for loops only ever happen to be written once, but it prevents a bug in case we ever add mutating writes inside of the same metadata journal frame.

chainsec june 2023 review 5.3

What I did

How I did it

How to verify it

Commit message

this commit fixes an issue where multiple writes inside of a checkpoint
lead to journal corruption on rollback. in particular, it ensures a call
to `register_update()` when the metadata dict has already been updated
inside of a given checkpoint.

note this does not change any observed functionality in the compiler
because writes to the metadata journal inside for loops only ever happen
to be written once, but it prevents a bug in case we ever add multiple
writes inside of the same checkpoint.

chainsec june review 5.3

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

call register_update when node has already been updated in this "frame"

note this does not change any observed functionality in the compiler
because writes to the metadata journal inside for loops only ever happen
to be written once, but it prevents a bug in case we ever add mutating
writes inside of the same metadata journal frame.

chainsec june review 5.3
@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2023

Codecov Report

Merging #3569 (fcdafa9) into master (43c8d85) will decrease coverage by 0.04%.
Report is 15 commits behind head on master.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #3569      +/-   ##
==========================================
- Coverage   89.13%   89.09%   -0.04%     
==========================================
  Files          85       85              
  Lines       11365    11388      +23     
  Branches     2585     2586       +1     
==========================================
+ Hits        10130    10146      +16     
- Misses        813      820       +7     
  Partials      422      422              
Files Changed Coverage Δ
vyper/ast/metadata.py 100.00% <100.00%> (+6.52%) ⬆️

... and 11 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

tserg and others added 4 commits September 5, 2023 11:54
this commit fixes an issue where multiple writes inside of a checkpoint
lead to journal corruption on rollback. in particular, it ensures a call
to `register_update()` when the metadata dict has already been updated
inside of a given checkpoint.

note this does not change any observed functionality in the compiler
because writes to the metadata journal inside for loops only ever happen
to be written once, but it prevents a bug in case we ever add multiple
writes inside of the same checkpoint.

chainsec june review 5.3
@charles-cooper charles-cooper enabled auto-merge (squash) September 5, 2023 22:01
@charles-cooper charles-cooper enabled auto-merge (squash) September 5, 2023 22:02
@charles-cooper charles-cooper merged commit 39a2313 into vyperlang:master Sep 5, 2023
76 of 77 checks passed
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.

4 participants