chia-blockchain icon indicating copy to clipboard operation
chia-blockchain copied to clipboard

refactor new_peak_timelord

Open almogdepaz opened this issue 1 year ago • 10 comments

Purpose:

improving the flow that handles a new peak

Current Behavior:

we would skip a new peak for the wrong condition in some edge cases we would also handle peaks we should skip

New Behavior:

skip less heavy peaks even if we dont have unfinished blocks in the cache

Testing Notes:

added a test case for receiving a less heavy peak while we dont have unfinished blocks in the cache

almogdepaz avatar Nov 20 '23 10:11 almogdepaz

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Nov 22 '23 19:11 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Dec 06 '23 20:12 github-actions[bot]

Pull Request Test Coverage Report for Build 8144610631

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

  • 195 of 200 (97.5%) changed or added relevant lines in 5 files are covered.
  • 1481 unchanged lines in 65 files lost coverage.
  • Overall coverage increased (+0.3%) to 91.165%

Changes Missing Coverage Covered Lines Changed/Added Lines %
chia/simulator/block_tools.py 4 5 80.0%
tests/blockchain/test_blockchain.py 5 6 83.33%
tests/timelord/test_new_peak.py 158 161 98.14%
<!-- Total: 195 200
Files with Coverage Reduction New Missed Lines %
chia/consensus/block_record.py 1 95.24%
chia/daemon/client.py 1 84.38%
chia/daemon/keychain_proxy.py 1 64.98%
chia/daemon/server.py 1 88.56%
chia/farmer/farmer.py 1 72.67%
chia/full_node/mempool.py 1 99.66%
chia/rpc/rpc_client.py 1 98.91%
chia/server/server.py 1 81.12%
chia/util/json_util.py 1 88.46%
chia/wallet/db_wallet/db_wallet_puzzles.py 1 98.44%
<!-- Total: 1481
Totals Coverage Status
Change from base Build 7830053184: 0.3%
Covered Lines: 97886
Relevant Lines: 107364

💛 - Coveralls

coveralls-official[bot] avatar Dec 06 '23 20:12 coveralls-official[bot]

This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.

github-actions[bot] avatar Jan 26 '24 11:01 github-actions[bot]

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Feb 01 '24 01:02 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Feb 08 '24 16:02 github-actions[bot]

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Mar 14 '24 17:03 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Mar 25 '24 13:03 github-actions[bot]

File Coverage Missing Lines
chia/_tests/timelord/test_new_peak.py 98.1% lines 357, 365-366
chia/simulator/block_tools.py 80.0% lines 1096
Total Missing Coverage
199 lines 4 lines 97%

github-actions[bot] avatar Mar 25 '24 15:03 github-actions[bot]

This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.

github-actions[bot] avatar May 24 '24 11:05 github-actions[bot]

coverage exemption

emlowe avatar Jul 17 '24 14:07 emlowe

Last CI run is stale, going to close and re-open to run again.

Starttoaster avatar Jul 17 '24 15:07 Starttoaster

Please check the latest CI run. Some seemingly non-flakey failed jobs. As an aside, this PR was fairly clearly stale and imo should not have been approved without a new CI run. @almogdepaz @emlowe FYI

Starttoaster avatar Jul 17 '24 17:07 Starttoaster

File Coverage Missing Lines
chia/_tests/timelord/test_new_peak.py 98.1% lines 357, 365-366
chia/simulator/block_tools.py 80.0% lines 1073
Total Missing Coverage
200 lines 4 lines 98%

github-actions[bot] avatar Jul 24 '24 23:07 github-actions[bot]