-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Core] StateHash Interfaces & Diagrams (#252)
## Description Interface updates and diagrams to document the cross-module flow for stateHash implementation. ## Issue Fixes part of #251 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [x] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes The goal of this change is to show the interface changes and plan of action to implement the state hash implementation. Documentation and external interface changes required for updating the state hash. Details related to the internals of the persistence module will be done in a follow up commit. The major change is that the final `quorumCertificate` is only known at the time of committal, not proposal, so the corresponding changes were made as well as interface changes to make the terminology easier to follow with the corresponding documentation. **General** - Update some comments / TODOs throughout the code - Handle errors where appropriate to support interface changes **UtilityContext interface changes** - Change `CommitPersistenceContext()` to `Commit(quorumCert) - Change `ReleaseContext()` to `Release() error` **PostgresContext interface changes** - Removed `quorumCert` from the `SetProposalBlock` method signature - Changed `Commit()` to `Commit(quorumCert)` - Renamed `ResetContext` to `Release` - Replace `AppHash` with `UpdateAppHash` - Added `ReleaseWriteContext` to the module level interface **Persistence Module/Interface changes** - Reduce the cope of the `StoreBlock` function - Make `storeBlock` accept a `quorumCert` - Remove `quorumCertificate` from local state and corresponding setters/getters - Reduce the cope of the `IndexTransactions` function and remove from interface **Consensus module changes** - Add error handling where appropriate corresponding to the interface changes ## Testing - [x] `make develop_test` - [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README` ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have tested my changes using the available tooling - [ ] If applicable, I have made corresponding changes to related local or global README - [ ] If applicable, I have updated the corresponding CHANGELOG - [ ] If applicable, I have added tests that prove my fix is effective or that my feature works - [ ] If applicable, I have added new diagrams using [mermaid.js](https://mermaid-js.github.io) --- Co-authored-by: Alessandro De Blasis <[email protected]> Co-authored-by: Irving A.J. Rivas Z. <[email protected]> Co-authored-by: Andrew Nguyen <[email protected]> Co-authored-by: Daniel Olshansky <[email protected]> Co-authored-by: Jason You <[email protected]>
- Loading branch information
1 parent
ff744af
commit daaec74
Showing
28 changed files
with
354 additions
and
153 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.