-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Consensus] State Sync - Request, download and apply blocks #352
Comments
After a first attempt at #594, we've got some new learnings and are going to start from scratch, splitting the work into smaller PRs Notes:
As a starting point, we will create the following micro PRs: PR1: [Testing] Channel for FSM eventsDon't mock FSM in testing. Use the existing testing infrastructure and pipe the events into the shared channel. This enables waiting & controlling the clock. PR2: [Testing] HelpersAvoid boiler plate code needed in hotstuff within state sync E.g. Create PR3: [Consensus] Adding transactions via transaction indexer
PR4: [Consensus] Create Block and Metadata Response Channels
PR5: [Consensus] Investigate locks
This is a starting point and further PRs will be needed. |
## Description Populate the transactions in the persisted blocks using `txIndexer`. ## Issue Fixes the following sub-issues of #352: - PR3: [Consensus] Adding transactions via transaction indexer ## Type of change Please mark the relevant option(s): - [X] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Update `prepareBlock()` function to include transactions with `txIndexer`. ## Testing - [X] `make develop_test`; if any code changes were made - [X] [Docker Compose LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md); if any major functionality was changed or introduced - [ ] [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any infrastructure or configuration changes were made ## Required Checklist - [ ] 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 added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [X] I have tested my changes using the available tooling - [X] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s)
## Description Includes changes that primarily focus on code refactoring, simplification, and improvements to the testing in the consensus module. Key modifications entail renaming functions, altering error messages and logging, streamlining and updating imports, and introducing new helper functions. It also sets the new structure for the state sync module, although doesn't include full implementation, which is to come in the next PRs. ## Issue Fixes the following sub-issues of #352: - (Partially) PR1: [Testing] Channel for FSM events: removed FSM mocking. `waitForFSMEvents()` function to be added. - PR2: [Testing] Helpers: helpers for hotstuff messages, and state sync events. - (Partially) PR4: [Consensus] Create Block and Metadata Response Channels: ## Type of change Please mark the relevant option(s): - [X] New feature, functionality or library - [ ] Bug fix - [X] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Refactored state sync module, - Implemented two new channels for received metadata and blocks, - Refactored consensus module's testing framework by removing state machine mock in testing, - Introduced, as placeholders, new helper functions for testing state sync stages. ## Testing - [X] `make develop_test`; if any code changes were made - [X] [Docker Compose LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md); if any major functionality was changed or introduced - [ ] [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any infrastructure or configuration changes were made <!-- REMOVE this comment block after following the instructions If you added additional tests or infrastructure, describe it here. Bonus points for images and videos or gifs. --> ## Required 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 added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [X] I have tested my changes using the available tooling - [X] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s) --------- Co-authored-by: Daniel Olshansky <[email protected]>
Objective
Implement the interface that exposes the maximum & minimum blocks a node can expose and share
Origin Document
State sync block by block design: #125
Goals
Deliverables
Non-goals
General issue checklist
Creators: @jessicadaugherty @Olshansk
The text was updated successfully, but these errors were encountered: