Skip to content

[Persistence] State Hash Computation Implementation #147

@Olshansk

Description

@Olshansk

Objective

Compute a hash in order to take a snapshot of the V1 state via a single hash.

Origin Document

See the entire conversation around the state hash in https://github.com/pokt-network/pocket-network-protocol/tree/main/persistence.

Goals / Deliverables

  • Determine if we should use a Merkle Tree or Vector Committments
  • Pick a library for the merkle Tree or commitments
  • Compute and expose the state hash after every block commit
  • Incorporate the schemas (i.e. protobuf message definitions) in the state hash
  • Create a foundation to enable fast sync and slow sync by synching the different state trees
  • Do not limit the trees to only be keyed by addresses

General issue checklist

  • Update the appropriate CHANGELOG
  • Update the README
  • If applicable, update the source code tree explanation
  • If applicable, add or update a state, sequence or flowchart diagram using mermaid
  • Update any relevant global documentation & references
  • Document small issues / TODOs along the way

Non-goals

  • TODO

Testing Methodology

  • Develop an appropriate test suite
  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md
    Remove

Creator: @Olshansk
Co-Owners: @andrewnguyen22

Metadata

Metadata

Assignees

Labels

coreCore infrastructure - protocol relatedpersistencePersistence specific changes

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions