chia-blockchain
chia-blockchain copied to clipboard
Add `use_delta_sync` option
Purpose:
Improve wallet sync speed
Current Behavior:
Currently there are a few places where subscriptions for puzzle hash and coin updates are requested from 0 every time, instead of the fork height for this sync. This is slow.
New Behavior:
If the use_delta_sync
option in the wallet config section of the config.yaml
is set to true
the fork height of the sync is used instead and wallet syncing is fast(er).
Note:
Generating new puzzle hashes will always sync them from 0, the same is true for subscribing to interested coin ids and puzzle hashes. IMHO the config option could be removed and a delta sync being used always, let me know if you have reservations with that, for now its just a config option which is not enabled by default.
Pull Request Test Coverage Report for Build 8189794206
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.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 30 of 30 (100.0%) changed or added relevant lines in 3 files are covered.
- 1432 unchanged lines in 52 files lost coverage.
- Overall coverage increased (+0.06%) to 91.022%
Files with Coverage Reduction | New Missed Lines | % |
---|---|---|
chia/rpc/rpc_client.py | 1 | 98.91% |
chia/consensus/block_record.py | 1 | 95.24% |
tests/wallet/cat_wallet/test_cat_wallet.py | 1 | 99.84% |
tests/fee_estimation/test_fee_estimation_unit_tests.py | 1 | 99.06% |
chia/daemon/client.py | 1 | 85.0% |
chia/util/json_util.py | 1 | 88.46% |
tests/util/test_priority_mutex.py | 1 | 99.66% |
chia/rpc/rpc_server.py | 1 | 88.4% |
tests/util/full_sync.py | 1 | 88.89% |
tests/core/full_node/stores/test_block_store.py | 1 | 99.19% |
<!-- | Total: | 1432 |
Totals | |
---|---|
Change from base Build 7941879901: | 0.06% |
Covered Lines: | 97555 |
Relevant Lines: | 107146 |
💛 - Coveralls
This pull request has conflicts, please resolve those before we can evaluate the pull request.
@felixbrucker looks like there's now a conflict presumably due to https://github.com/Chia-Network/chia-blockchain/pull/17209
A comment/warning in the default config would also be nice to have, explaining that if you use this option you run the risk (even if it's not likely to be an issue) of missing coin state due to reorgs.
Other than that I don't personally have any issue with landing this.
Conflicts have been resolved. A maintainer will review the pull request shortly.