flow-go-sdk icon indicating copy to clipboard operation
flow-go-sdk copied to clipboard

Calculating events hash using Patricia Merkle tree

Open devbugging opened this issue 3 years ago • 3 comments

Closes: #246

Description

Refactors how event hash is calculated. It now uses the flow-go Merkle Patricia tree for calculating the hash.

A test example results in a change of hash:

      -0x0a1e6871892be16088661236ae90c3b3eb7d99e2a367faba55927425d000f43c (previous method)
      +0x7b3d0915bac54b34aba06160ec518ae3be4212a4dc18ad33163601e57f9b1e15 (current method)

For contributor use:

  • [x] Targeted PR against master branch
  • [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • [x] Code follows the standards mentioned here.
  • [x] Updated relevant documentation
  • [x] Re-reviewed Files changed in the Github PR explorer
  • [x] Added appropriate labels

devbugging avatar Feb 21 '22 16:02 devbugging

I would need a validation the implementation actually produces a valid output cc @ramtinms @smnzhu Since I can't really compare it to the previous result as it changed, it should right? Should I just write the same test in flow-go to test the output?

devbugging avatar Feb 23 '22 11:02 devbugging

Can we get this merged so it doesn't get outdated 🙏 cc @ramtinms @smnzhu

devbugging avatar Mar 08 '22 10:03 devbugging

@psiemens can you help review this?

devbugging avatar Apr 08 '22 10:04 devbugging