Skip to content

[WIP] Block by Block Synchronous Sate Sync#812

Open
Olshansk wants to merge 126 commits into
mainfrom
issues/352/state_sync
Open

[WIP] Block by Block Synchronous Sate Sync#812
Olshansk wants to merge 126 commits into
mainfrom
issues/352/state_sync

Conversation

@Olshansk

@Olshansk Olshansk commented Jun 8, 2023

Copy link
Copy Markdown
Collaborator

Description

Summary generated by Reviewpad on 07 Aug 23 18:22 UTC

This pull request includes changes in multiple files. Here is a summary of the modifications:

  • The "consensus_module's state synchronization" file was completely deleted.
  • The "bus_module.go" file added a new type and a new method.
  • The "state_machine/module.go" file had comments added and a line modified.
  • The "state_machine/fsm.go" file had comments added and new states added.
  • The "hotstuff.proto" file added a comment related to a circular dependency.
  • The "charts/pocket/README.md" file added a new configuration option.
  • The "PROTOCOL_STATE_SYNC.md" file had several updates to the content.
  • The "hotstuff_leader.go" file had modifications in various functions.
  • The "actor.go" file had changes related to the Output Address design.
  • The "events.proto" file added two new messages.
  • The "consensus_module.go" file had several changes and suggestions in the code.
  • The "state_sync_handler.go" file had modifications in two functions.
  • The "types.go" file added a new function.
  • The "config.validator1.json" file had changes in the "servicer" and "ibc" sections.
  • The "charts/pocket/values.yaml" file added a new key-value pair.
  • The "p2p/utils_test.go" file had a constant commented as technical debt.
  • The "defaults.go" file added a new constant.
  • The "events.go" file had updates in comments.
  • The "Tiltfile" had changes in the dependencies list.
  • The "consensus/state_sync/helpers.go" file had changes in three functions.
  • The "event_handler.go" file had a comment removed.
  • The "block.proto" file had modifications in the "BlockHeader" message.

Please review these changes and let me know if you need further assistance.

Issue

Fixes #579

Type of change

Please mark the relevant option(s):

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Major breaking change
  • Documentation
  • Other

List of changes

What is this PR in its current form?

  • Basic synchronous block-by-block state sync
  • Not the perfect/cleanest code, but something that's somewhat understandable
  • Some code cleanup related to consensus tended to along the way

What is this PR NOT intended to be

  • Fully asynchronous background state sync
  • State sync independent of FSM
  • Any sort of optimization in state sync

Blockers / further improvements needed in this PR

  • Tickets to track future work (tech debt, improvements, cleanup, optimizations)
  • An E2E test as part of this PR
  • A video showing that it works on localnet

Testing

  • make develop_test; if any code changes were made
  • make test_e2e on k8s LocalNet; if any code changes were made
  • e2e-devnet-test passes tests on DevNet; if any code was changed
  • Docker Compose LocalNet; if any major functionality was changed or introduced
  • k8s LocalNet; if any infrastructure or configuration changes were made

Required Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added, or updated, godoc format comments on touched members (see: tip.golang.org/doc/comment)
  • I have tested my changes using the available tooling
  • 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 diagrams in the corresponding README(s)
  • I have added, or updated, documentation and mermaid.js diagrams in shared/docs/* if I updated shared/*README(s)

@Olshansk

Copy link
Copy Markdown
Collaborator Author

@red-0ne Will look into the broken tests tomorrow.

@Olshansk Olshansk requested a review from red-0ne August 1, 2023 22:18
@Olshansk Olshansk changed the base branch from main to issues/829/state_sync_test August 3, 2023 19:18
@Olshansk Olshansk changed the base branch from issues/829/state_sync_test to main August 3, 2023 20:35
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 4.58015% with 250 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.64%. Comparing base (fd09f2c) to head (6ffe41d).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
consensus/state_sync_handler.go 0.00% 90 Missing ⚠️
consensus/event_handler.go 0.00% 63 Missing ⚠️
consensus/module.go 0.00% 24 Missing ⚠️
consensus/debugging.go 0.00% 15 Missing ⚠️
consensus/helpers.go 0.00% 13 Missing ⚠️
runtime/debug_helpers.go 0.00% 10 Missing ⚠️
consensus/hotstuff_replica.go 0.00% 8 Missing ⚠️
runtime/bus.go 38.46% 7 Missing and 1 partial ⚠️
consensus/block.go 0.00% 7 Missing ⚠️
consensus/hotstuff_leader.go 0.00% 7 Missing ⚠️
... and 2 more
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #812      +/-   ##
==========================================
- Coverage   34.83%   34.64%   -0.20%     
==========================================
  Files         128      128              
  Lines       10986    11056      +70     
==========================================
+ Hits         3827     3830       +3     
- Misses       6667     6733      +66     
- Partials      492      493       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus Consensus specific changes large Pull request is large waiting-for-review

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[DOCUMENT][DEMO] Block by block state sync

5 participants