support for v2 txhashset (continuing to use v1 in mainnet and floonet) #3051
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #3011.
This "future proofs" nodes so that once 2.1.0 is released and widely used we can think about letting nodes migrate to v2 kernel MMR.
Its not safe to do this today because nodes do not support v2 widely.
Fast sync can only really provide the same txhashset that is used locally as converting between v1/v2 cannot be done "on demand" or per fast sync request.
So this PR leaves all nodes continuing to use (and serve) v1 txhashset.
But with support for receiving a v2 txhashset in the future.
tl;dr Nodes maintain a txhashset locally, receive a txhashset during fast sync and serve a txhashset to peers when they fast sync.
We want add support for receiving a v2 txhashset. But we want to continue to maintain and serve txhashset files in v1 for now, until v2 is widely supported on the network.