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

[validation] Create zerocoin coinspends cache #2707

Merged
merged 1 commit into from
Jan 29, 2022

Conversation

furszy
Copy link

@furszy furszy commented Jan 4, 2022

Essentially a zerocoin coinSpends cache layer to speedup the blockchain synchronization process during the period of time where blocks contained zerocoin transactions (which is the slowest period).

The reason behind this is that the sources are parsing and re-parsing the same zc transaction coinspend script over and over in different parts of the block validation circuit such as:
(1) block signature validation, (2) CheckZerocoinSpend, (3) ParseAndValidateZerocoinSpends, (4) CheckInBlockDoubleSpends, (5) IsUnspentOnFork, (6) ZPoS contextual checks, (7) NewZPivStake.

Pending to do: measure the blocks synchronization time improvement.

@furszy furszy self-assigned this Jan 4, 2022
@furszy furszy added this to the 6.0.0 milestone Jan 4, 2022
random-zebra
random-zebra previously approved these changes Jan 9, 2022
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5ac00bf

src/zpiv/zpivmodule.cpp Outdated Show resolved Hide resolved
src/zpiv/zpivmodule.cpp Outdated Show resolved Hide resolved
@furszy
Copy link
Author

furszy commented Jan 10, 2022

feedback tackled.

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 6b803fb after force push

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 6b803fb

@random-zebra random-zebra merged commit 03f9946 into PIVX-Project:master Jan 29, 2022
@Fuzzbawls Fuzzbawls modified the milestones: 6.0.0, 5.5.0 Sep 11, 2022
@furszy furszy deleted the 2021_zc_coinspend_cache branch May 27, 2023 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants