-
Notifications
You must be signed in to change notification settings - Fork 2k
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
update the StateChangeSummary
to not keep full NPCResult
objects
#16793
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arvidn
added
the
Changed
Required label for PR that categorizes merge commit message as "Changed" for changelog
label
Nov 8, 2023
Merged
arvidn
force-pushed
the
simplify-state-update-summary
branch
from
November 8, 2023 13:37
e4a7ed6
to
db1d954
Compare
arvidn
changed the title
update the StateUpdateSummary to not keep full NPCResult objects
update the 'StateChangeSummary` to not keep full 'NPCResult' objects
Nov 8, 2023
arvidn
changed the title
update the 'StateChangeSummary` to not keep full 'NPCResult' objects
update the 'StateChangeSummary' to not keep full 'NPCResult' objects
Nov 8, 2023
arvidn
changed the title
update the 'StateChangeSummary' to not keep full 'NPCResult' objects
update the Nov 8, 2023
StateChangeSummary
to not keep full NPCResult
objects
fchirica
previously approved these changes
Nov 9, 2023
arvidn
force-pushed
the
simplify-state-update-summary
branch
from
November 15, 2023 17:05
db1d954
to
eb4919a
Compare
Pull Request Test Coverage Report for Build 6880536962Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
Quexington
reviewed
Nov 16, 2023
… just the parts we need
arvidn
force-pushed
the
simplify-state-update-summary
branch
from
November 16, 2023 23:16
eb4919a
to
60a04ac
Compare
Quexington
approved these changes
Nov 20, 2023
emlowe
approved these changes
Nov 21, 2023
arvidn
added
ready_to_merge
Submitter and reviewers think this is ready
Cleanup
Code cleanup
labels
Nov 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Changed
Required label for PR that categorizes merge commit message as "Changed" for changelog
Cleanup
Code cleanup
ready_to_merge
Submitter and reviewers think this is ready
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.
Purpose:
This is a simplification of the state the
Blockchain
object returns in itsStateChangeSummary
class.Currently, it includes the
NPCResult
object for the most recent block (and possibly all blocks along a reorg-chain).The
NPCResult
is the conditions and created coins from each block. In the case of a reorg, we currently have to re-run all the blocks to produce this state, to be able to return it.The only things we actually need out of the
NPCResult
object are additions and removals (and hints). This patch simplifies theStateChangeSummary
class to only include the information we need.The consumers of this information are the mempool (to determine which mempool items are no longer valid) and the hint store, to index hints and update subscriptions.
This is a step towards not having to re-run the blocks in the case of a reorg.
The main change is the members of
StateChangeSummary
, here: https://github.com/Chia-Network/chia-blockchain/pull/16793/files#diff-40409ea13958d9e8cec2be388c12e68da7c3179de55f01879713c5abdb1fed38R78-R81Current Behavior:
StateChangeSummary
contains information that's expensive to compute.New Behavior:
StateChangeSummary
contains information that's cheaper to compute.Profile
Profile of the cost of computing the
NPCResult
in_reconsider_peak()
: