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

remove block_height_list from BlockGenerator #18302

Merged
merged 2 commits into from
Aug 1, 2024
Merged

remove block_height_list from BlockGenerator #18302

merged 2 commits into from
Aug 1, 2024

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Jul 12, 2024

Purpose:

This simplifies the code and removes more of the old block compression logic that's no longer used.

The block_height_list field is only used when farming blocks, and we don't use it in production right now. We only use it in the tests, BlockTools. It has been updated with a cleaner and more direct way of setting the block reference list in new blocks

Current Behavior:

BlockGenerator has a field (block_height_list) that doesn't really belong, and is only used independently from the other fields.

New Behavior:

BlockGenerator only has fields that belong, and are used, together. Setting the block references list when creating (test) blocks uses a direct parameter.

… when farming blocks, and we don't use it in production right now. We only use it in the tests, BlockTools. It has been updated with a cleaner and more direct way of setting the block reference list in new blocks
@arvidn arvidn added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Jul 12, 2024
Copy link

Pull Request Test Coverage Report for Build 9919187413

Details

  • 25 of 29 (86.21%) changed or added relevant lines in 9 files are covered.
  • 30 unchanged lines in 12 files lost coverage.
  • Overall coverage increased (+0.008%) to 90.969%

Changes Missing Coverage Covered Lines Changed/Added Lines %
chia/simulator/block_tools.py 5 9 55.56%
Files with Coverage Reduction New Missed Lines %
chia/full_node/full_node_api.py 1 82.05%
chia/_tests/blockchain/blockchain_test_utils.py 1 92.86%
chia/consensus/block_body_validation.py 1 95.51%
chia/daemon/server.py 1 83.22%
chia/consensus/multiprocess_validation.py 2 94.49%
chia/full_node/weight_proof.py 2 90.51%
chia/_tests/core/test_farmer_harvester_rpc.py 2 98.02%
chia/_tests/generator/test_generator_types.py 2 90.48%
chia/rpc/rpc_server.py 3 87.71%
chia/_tests/core/util/test_lockfile.py 3 90.28%
Totals Coverage Status
Change from base Build 9913133838: 0.008%
Covered Lines: 101407
Relevant Lines: 111430

💛 - Coveralls

@arvidn arvidn closed this Jul 29, 2024
@arvidn arvidn reopened this Jul 29, 2024
@arvidn arvidn marked this pull request as ready for review July 29, 2024 15:26
@arvidn arvidn requested a review from a team as a code owner July 29, 2024 15:26
@arvidn
Copy link
Contributor Author

arvidn commented Jul 29, 2024

this missing coverage is in a test facility, and was already not covered

@arvidn arvidn requested a review from AmineKhaldi July 29, 2024 15:26
Copy link
Contributor

File Coverage Missing Lines
chia/simulator/block_tools.py 55.6% lines 802, 805, 1109, 1112
Total Missing Coverage
29 lines 4 lines 86%

@arvidn arvidn requested a review from emlowe August 1, 2024 11:05
@Starttoaster Starttoaster merged commit ba9420b into main Aug 1, 2024
731 of 733 checks passed
@Starttoaster Starttoaster deleted the block-refs branch August 1, 2024 23:41
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants