Skip to content
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

feat(statesync): implement statesync spec for the new approach #655

Merged
merged 22 commits into from
Jul 19, 2023

Conversation

shotonoff
Copy link
Collaborator

@shotonoff shotonoff commented Jul 3, 2023

Issue being fixed or feature implemented

To be able to perform state synchronization in Dash Platform, Tenderdash must be compatible with some restriction of GroveDB.
This PR contains the changes of a new approach state synchonization, that is described in specification

What was done?

  • Replaced chunk index on chunk ID. Chunk Index is the number of the piece of data of a snapshot. Chunk ID is the path to the root node of subtree.
  • Replaced format field on version
  • Added the new apply chunk result: complete, to be able to get a final status of a snapshot

How Has This Been Tested?

Unit Tests / E2E tests

Breaking Changes

The original way of replicating state synchronization is obsolete and has been replaced by another approach

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 relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

proto/tendermint/abci/types.proto Outdated Show resolved Hide resolved
proto/tendermint/abci/types.proto Outdated Show resolved Hide resolved
internal/statesync/chunks.go Outdated Show resolved Hide resolved
internal/statesync/chunks.go Show resolved Hide resolved
internal/statesync/chunks.go Outdated Show resolved Hide resolved
internal/statesync/syncer.go Outdated Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
Copy link
Collaborator Author

@shotonoff shotonoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please have a look at the modifications and answers

libs/ds/ordered_map.go Show resolved Hide resolved
proto/tendermint/abci/types.proto Outdated Show resolved Hide resolved
internal/statesync/chunks.go Outdated Show resolved Hide resolved
internal/statesync/chunks.go Outdated Show resolved Hide resolved
internal/statesync/chunks.go Outdated Show resolved Hide resolved
internal/statesync/chunks.go Outdated Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
internal/statesync/chunks.go Outdated Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
internal/statesync/chunks.go Show resolved Hide resolved
Copy link
Collaborator Author

@shotonoff shotonoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the PR is ready to review

internal/statesync/chunks.go Outdated Show resolved Hide resolved
internal/statesync/snapshots.go Show resolved Hide resolved
internal/statesync/reactor.go Show resolved Hide resolved
internal/statesync/syncer.go Show resolved Hide resolved
@shotonoff shotonoff requested a review from lklimek July 18, 2023 11:38
lklimek
lklimek previously approved these changes Jul 19, 2023
@shotonoff shotonoff requested a review from lklimek July 19, 2023 07:58
@shotonoff shotonoff merged commit f8da9f7 into v0.13-dev Jul 19, 2023
17 checks passed
@shotonoff shotonoff deleted the feat/statesync-implement-spec-for-new-approach branch July 19, 2023 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants