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: refactor unnecessary replies #647

Merged
merged 33 commits into from
Aug 29, 2023
Merged

Conversation

ibrizsabin
Copy link
Collaborator

@ibrizsabin ibrizsabin commented Aug 22, 2023

Description:

Removed callback replies from cross contract calls since we found it to be unnecessary in most of the cases and also had probability of introducing reentrancy.

Commit Message

fix: removed unnecessary replies in cross contract calls to reduce reentrancy 

see the guidelines for commit messages.

Changelog Entry

version: <log entry>

Checklist:

  • I have performed a self-review of my own code
  • I have documented my code in accordance with the documentation guidelines
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the unit tests
  • I only have one commit (if not, squash them into one commit).
  • I have a descriptive commit message that adheres to the commit message guidelines

Please review the CONTRIBUTING.md file for detailed contributing guidelines.

@ibrizsabin ibrizsabin added Archway Archway Chain related task Audit Issue Issues discovered in security audit labels Aug 22, 2023
@ibrizsabin ibrizsabin self-assigned this Aug 22, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2023

Codecov Report

Merging #647 (7d810b8) into main (c597775) will decrease coverage by 0.06%.
The diff coverage is 98.76%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #647      +/-   ##
============================================
- Coverage     69.11%   69.06%   -0.06%     
+ Complexity      404      401       -3     
============================================
  Files           151      152       +1     
  Lines         14044    13770     -274     
  Branches        287      282       -5     
============================================
- Hits           9707     9510     -197     
+ Misses         4186     4112      -74     
+ Partials        151      148       -3     
Flag Coverage Δ
rust 67.08% <98.76%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
contracts/cosmwasm-vm/cw-ibc-core/src/contract.rs 45.07% <ø> (-1.38%) ⬇️
contracts/cosmwasm-vm/cw-ibc-core/src/error.rs 34.14% <ø> (ø)
contracts/cosmwasm-vm/cw-ibc-core/src/lib.rs 42.85% <ø> (ø)
...-core/src/ics04_channel/packet/timeout_on_close.rs 81.71% <96.00%> (+0.64%) ⬆️
...vm/cw-ibc-core/src/ics04_channel/packet/timeout.rs 82.38% <96.96%> (+3.18%) ⬆️
...smwasm-vm/cw-ibc-core/src/ics04_channel/handler.rs 92.45% <99.08%> (+0.09%) ⬆️
contracts/cosmwasm-vm/cw-common/src/raw_types.rs 100.00% <100.00%> (ø)
contracts/cosmwasm-vm/cw-ibc-core/src/context.rs 96.00% <100.00%> (+0.54%) ⬆️
...osmwasm-vm/cw-ibc-core/src/ics02_client/handler.rs 95.43% <100.00%> (+0.01%) ⬆️
...osmwasm-vm/cw-ibc-core/src/ics04_channel/events.rs 89.61% <100.00%> (+0.13%) ⬆️
... and 6 more

... and 11 files with indirect coverage changes

@ibrizsabin ibrizsabin marked this pull request as ready for review August 24, 2023 08:34
@AntonAndell
Copy link
Collaborator

Make sure to try and run the e2e for PRs like this to make sure the functionallity is the same

Copy link
Collaborator

@AntonAndell AntonAndell left a comment

Choose a reason for hiding this comment

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

Looks fine to me, with e2e passing it should be good to merge

@ibrizsabin ibrizsabin merged commit 3044520 into main Aug 29, 2023
@ibrizsabin ibrizsabin deleted the fix/security-review-180-183-185 branch August 29, 2023 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Archway Archway Chain related task Audit Issue Issues discovered in security audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants