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

[dev] Change Digest hashing implementation #234

Open
m-kus opened this issue Oct 2, 2024 · 0 comments
Open

[dev] Change Digest hashing implementation #234

m-kus opened this issue Oct 2, 2024 · 0 comments
Assignees

Comments

@m-kus
Copy link
Collaborator

m-kus commented Oct 2, 2024

Context

Currently Digest is serialized as two felt252 elements, where first is lower 128 bit and second is higher 128 bit of its numeric representation. It should be noted that Digest -> u256 conversion is little-endian. In particular, for txid (and also block hash, merkle root) the hex string received from RPC/explorer would look the same as u256 integer in hex form. So it would be more natural to serialize the digest in LE as well, to simplify "off-circuit" implementations (e.g. in Python).

Task

  • Swap high and low in DigestHash
  • Update data generation scripts accordingly
  • Regenerate integration tests from utreexo

Depends on #229 (should be merged first)

@m-kus m-kus added blocked Requires other issues to be resolved first and removed blocked Requires other issues to be resolved first labels Oct 2, 2024
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

No branches or pull requests

2 participants