Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

[WIP][Core][Wallet] Sync improvements #55

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

JSKitty
Copy link

@JSKitty JSKitty commented Aug 4, 2020

This PR backports a bunch of small but effective amount of improvements to the syncing process of SCC, most of these changes are from ZENZO and upstream PIVX, adapted to work with SCC's slightly-older codebase.

No in-depth tests have been ran on this PR yet, nor benchmarks, but this is critical to ensuring the PR works as intended and so that we can find a readable statistic (E.G: Percentage difference) of the syncing speed between SCC v2.0.2 and this PR.

Code reviews and tests appreciated!

Work-In-Progress; Please do NOT merge yet!

@stakecube
Copy link
Collaborator

Can't connect to chain

2020-08-07 11:55:38 ERROR: ContextualCheckBlock : block height mismatch in coinbase
2020-08-07 11:55:38 ERROR: ProcessNewBlock : AcceptBlock FAILED

No code review done yet

JSKitty added 4 commits August 16, 2020 18:23
This is a very intensive check which is hardly used in SCC and can safely be replaced with lightweight, height-based enforcements instead of softforks.
This commit will stop the wallet model from polling for balance changes on new blocks when the blocks have a timestamp older than the earliest key the wallet generated, saving a very large amount of resources for syncs from scratch.
@JSKitty JSKitty force-pushed the sync_improvements branch from 623eca0 to 80aeccf Compare August 16, 2020 17:23
Block 199 was the last black that did not have a serialized height within the coinbase, so the BlockV2 check is only enabled on, and after, block 200
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants