massa icon indicating copy to clipboard operation
massa copied to clipboard

State hash

Open Eitu33 opened this issue 2 years ago • 2 comments

Introduction

We need to have a way to compare the states of two different nodes, this has already been done for ledger in https://github.com/massalabs/massa/issues/2986 but needs to be done for the rest of the FinalState

TODO

On finality:

  • [ ] Compute and save async pool hash
  • [ ] Compute and save PoS state hash
  • [x] Compute and save executed ops hash
  • [ ] hash the concat of every part of the final state together to deduce the final state hash

Eitu33 avatar Sep 22 '22 09:09 Eitu33

@Eitu33 for the executed ops hash (and state hashes in general), it is important that the hashes are computed only at the final state. Computing them for speculative states would have a strong performance impact (and they are not needed there)

damip avatar Sep 25 '22 10:09 damip

Yep that's how it has been implemented for ledger and executed ops, I specified "On finality".

Eitu33 avatar Sep 26 '22 09:09 Eitu33

Taking back this issue

Eitu33 avatar Nov 09 '22 08:11 Eitu33

  • https://github.com/massalabs/massa/pull/3210
  • https://github.com/massalabs/massa/pull/3312

Eitu33 avatar Dec 09 '22 15:12 Eitu33

This is done, closing

Eitu33 avatar Dec 19 '22 15:12 Eitu33