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

[StateService] Storage and P2P #431

Merged
merged 45 commits into from
Jan 18, 2021

Conversation

ZhangTao1596
Copy link
Collaborator

@ZhangTao1596 ZhangTao1596 commented Dec 18, 2020

Step 1/3 StateService

Since there are too many changes in StateService, I will split it into 3 parts to commit pull request, and this is the 1st.

Changes:

  • Implement IPersistencePlugin interface, copy block changes to calculate root hash when block persisting.
  • Add StateStorage to store local state root hash and latest valiated hash and state tree.
  • Add StateSnapthot, it's the snapshot of StateStorage.
  • Define StateRoot, it contains root hash of specific index and signatures of state validators.
  • Add p2p handler to relay StateRoot in ExtensiblePayload.

src/StateService/Settings.cs Outdated Show resolved Hide resolved
src/StateService/Storage/StateSnapshot.cs Outdated Show resolved Hide resolved
erikzhang and others added 2 commits December 19, 2020 15:09
Co-authored-by: Luchuan <luchuan@ngd.neo.org>
@superboyiii superboyiii mentioned this pull request Dec 21, 2020
36 tasks
@ZhangTao1596
Copy link
Collaborator Author

Merge?

@erikzhang
Copy link
Member

Wait for neo-project/neo#2101

@ZhangTao1596
Copy link
Collaborator Author

Merge? I have subsequent pr.

Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

We can merge it and continue with the pending tasks.

@ZhangTao1596
Copy link
Collaborator Author

We should merge this.

@superboyiii superboyiii merged commit 9bee8fa into neo-project:master Jan 18, 2021
@superboyiii
Copy link
Member

I'll make integration test when these 3 completed. Merge this first.

@ZhangTao1596 ZhangTao1596 deleted the state-service-storage branch January 18, 2021 10:36
joeqian10 pushed a commit to joeqian10/neo-modules that referenced this pull request Apr 7, 2021
* make leveldb public

* storage

* rename folder

* update neo

* Fix end of line marker

* file encoding

* Update src/StateService/Network/StateRoot.cs

Co-authored-by: Luchuan <luchuan@ngd.neo.org>

* fix some

* recover levelDB

* use neo LoadStore

* clean project file

* Update MPTNode.cs

* add p2p

* internal payload category

* update neo and remove OnVerifiedInventory

* null check and clean StateStore and clean settings

* remove IP2PPlugin interface impl

* clean settings

* Update Settings.cs

* Remove StatePlugin.Persistence.cs

* clean actor system

* Fix StatePlugin

* Optimize

* format

* remove StoreDataCache and StoreMetaDataCache

* remove StoreDataCache from mpt

* Optimize

* sync OnPersist

Co-authored-by: Shargon <shargon@gmail.com>
Co-authored-by: Erik Zhang <erik@neo.org>
Co-authored-by: Luchuan <luchuan@ngd.neo.org>
Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com>
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.

7 participants