[Persistence] First Implementation of the StateHash (#284)#285
Merged
[Persistence] First Implementation of the StateHash (#284)#285
Conversation
Collaborator
Author
deblasis
suggested changes
Nov 30, 2022
okdas
suggested changes
Nov 30, 2022
[Quick CI change]
okdas
approved these changes
Nov 30, 2022
Contributor
okdas
left a comment
There was a problem hiding this comment.
👍 sweet green them test results
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Description
The first implementation of the
Issue
Fixes #284 with follow up work in #361.
Type of change
Please mark the relevant option(s):
List of changes
Persistence - Core Changes for SMT
block_persistence.protoCommit, prepare and store a persistence block in the KV Store, SQL StoreIndexTransactions(plural) toIndexTransaction(singular)ComputeStateHashto update the global state based on:paramsandflagsPersistence - General module changes
GetAccountsUpdated,GetPoolsUpdatedandGetActorsUpdatedfunctionsGetPrevAppHashandindexTransactionsfunctionsblockProtoBytesandtxResultsfrom the local state and addedquorumCertresetContextrelated operations into a single functionReleaseWriteContextClearAllStateandResetToGenesisfor debugging & testing purposesPersistence - KVStore changes
PuttoSetsmt.MapStorein the interface containingGet,SetandDeleteDeleteGetAllto return bothkeysandvaluesPersistence - Module Interface changes
GetPrevHashand just usingGetBlockHashinsteadblockProtoBzfromSetProposalBlockinterfaceGetLatestBlockTxsandSetLatestTxResultsin exchange forIndexTransactionSetTxResultsUpdateAppHashtoComputeStateHashGetBlockTxs,GetBlockHash, etc…)Consensus
highPrepareQCif available to the block being createdblockProtoBytesfrom propagation inSetProposalBlockwriteContextis released when refreshing theutilityContextGetBlockHash(height)instead ofGetPrevAppHashto be more explicitquorumCertwhen preparing a new blockConfigs
trees_store_dirto persistence configsLocalNetconfigs to have an emptytx_indexer_pathandtrees_store_dirMakefile changes
db_cli_nodedb_show_schemastest_persistence_state_hashbenchmark_persistence_state_hashDebug
ResetToGenesis- Added the ability to reset the state to genesisClearState- Added the ability to clear the state completely (height 0 without genesis data)Testing
New:
make benchmark_persistence_state_hashmake test_persistence_state_hashExisting:
make develop_testREADMERequired Checklist
If Applicable Checklist
shared/docs/*if I updatedshared/*README(s)