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 cases of underflow in event of storage decrease #129

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

sisyphusSmiling
Copy link
Contributor

@sisyphusSmiling sisyphusSmiling commented Oct 17, 2024

Closes: #127

Description

  • Guards against instances where escrowing an asset actually decreases account storage usage due to underlying storage implementation. This may be an instance where storage blocks are reshuffled such that to total stored object is more compact and thus consumes less storage than the object preceding the newly stored asset.

For contributor use:

  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@sisyphusSmiling sisyphusSmiling self-assigned this Oct 17, 2024
@sisyphusSmiling sisyphusSmiling marked this pull request as ready for review October 17, 2024 19:13
@sisyphusSmiling sisyphusSmiling requested a review from a team as a code owner October 17, 2024 19:13
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 86.76%. Comparing base (02aab3f) to head (ebdcec4).
Report is 148 commits behind head on main.

Files with missing lines Patch % Lines
...adence/contracts/bridge/FlowEVMBridgeNFTEscrow.cdc 66.66% 1 Missing ⚠️
...ence/contracts/bridge/FlowEVMBridgeTokenEscrow.cdc 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
+ Coverage   86.19%   86.76%   +0.56%     
==========================================
  Files          18       18              
  Lines         884      967      +83     
==========================================
+ Hits          762      839      +77     
- Misses        122      128       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sisyphusSmiling sisyphusSmiling merged commit d0c8e29 into main Oct 17, 2024
2 checks passed
@sisyphusSmiling sisyphusSmiling deleted the gio/fix-storage-underflow branch October 17, 2024 20:33
@sisyphusSmiling
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Assumptions about storage usage increasing during escrow are broken
3 participants