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

CHIA-1862 Fix FullNodeAPI's request_block_headers returned filter #18923

Merged

Conversation

AmineKhaldi
Copy link
Contributor

@AmineKhaldi AmineKhaldi commented Nov 22, 2024

Purpose:

This fixes a bug where request_block_headers is not accounting for removals and additions when computing the transactions filter.

Current Behavior:

request_block_headers doesn't account for removals and additions in transactions filter computation.

New Behavior:

request_block_headers takes them properly into account.

@AmineKhaldi AmineKhaldi added Changed Required label for PR that categorizes merge commit message as "Changed" for changelog Cleanup Code cleanup labels Nov 22, 2024
@AmineKhaldi AmineKhaldi self-assigned this Nov 22, 2024
@AmineKhaldi AmineKhaldi force-pushed the fix_simplify_request_block_headers branch from 4c3c008 to 2c8e2fc Compare November 22, 2024 15:27
@AmineKhaldi AmineKhaldi marked this pull request as ready for review November 22, 2024 16:23
@AmineKhaldi AmineKhaldi requested a review from a team as a code owner November 22, 2024 16:23
Copy link

coveralls-official bot commented Nov 22, 2024

Pull Request Test Coverage Report for Build 12394466119

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 75 of 75 (100.0%) changed or added relevant lines in 4 files are covered.
  • 43 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+0.05%) to 91.589%

Files with Coverage Reduction New Missed Lines %
chia/_tests/simulation/test_simulation.py 1 96.45%
chia/plotters/plotters.py 1 90.94%
chia/full_node/full_node.py 2 86.91%
chia/full_node/weight_proof.py 4 90.64%
chia/plotters/madmax.py 6 44.58%
chia/daemon/server.py 7 83.24%
chia/_tests/core/util/test_lockfile.py 22 77.31%
Totals Coverage Status
Change from base Build 12381535704: 0.05%
Covered Lines: 105092
Relevant Lines: 114566

💛 - Coveralls

chia/_tests/wallet/sync/test_wallet_sync.py Outdated Show resolved Hide resolved
chia/_tests/wallet/sync/test_wallet_sync.py Show resolved Hide resolved
chia/full_node/full_node_api.py Outdated Show resolved Hide resolved
chia/full_node/full_node_api.py Show resolved Hide resolved
@AmineKhaldi AmineKhaldi force-pushed the fix_simplify_request_block_headers branch 2 times, most recently from 032dd93 to 9195013 Compare November 26, 2024 14:12
@arvidn
Copy link
Contributor

arvidn commented Nov 27, 2024

your benchmark doesn't show that it's safe to remove the serialization optimization.

@AmineKhaldi AmineKhaldi force-pushed the fix_simplify_request_block_headers branch from 9195013 to 41f24e2 Compare November 27, 2024 22:20
@AmineKhaldi AmineKhaldi changed the title CHIA-1862 Fix FullNodeAPI's request_block_headers returned filter and simplify this method CHIA-1862 Fix FullNodeAPI's request_block_headers returned filter Nov 27, 2024
@arvidn
Copy link
Contributor

arvidn commented Dec 6, 2024

looks good! It would be good to have proper test coverage of the new parsing function too

@AmineKhaldi AmineKhaldi force-pushed the fix_simplify_request_block_headers branch from 41f24e2 to 6b2db3a Compare December 11, 2024 14:31
@AmineKhaldi
Copy link
Contributor Author

looks good! It would be good to have proper test coverage of the new parsing function too

Done. Please note that while the test in question is skipped in main, enabling it and running it (with this extra coverage added to it) passes.

@AmineKhaldi AmineKhaldi force-pushed the fix_simplify_request_block_headers branch from 6b2db3a to a357d84 Compare December 17, 2024 11:19
Copy link
Contributor

@arvidn arvidn left a comment

Choose a reason for hiding this comment

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

@AmineKhaldi AmineKhaldi force-pushed the fix_simplify_request_block_headers branch from a357d84 to 4a638bc Compare December 18, 2024 13:58
@pmaslana pmaslana merged commit c6a6c0b into Chia-Network:main Dec 18, 2024
360 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog Cleanup Code cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants