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

v6: Merkle tree hashing #1223

Open
wants to merge 2 commits into
base: v6
Choose a base branch
from

Conversation

corynthian
Copy link

@corynthian corynthian commented Jan 15, 2023

Motivation

Implements Keccak (sha3-256) based Merkle Tree hashing.

Note: Also includes fixes to VoteTests.

Test Plan

cargo test --test move_unit_test

Related PRs

#627

@hemulin
Copy link
Collaborator

hemulin commented Jan 19, 2023

@ashiiix note that this is addressing a ticket you were involved in before

@corynthian
Copy link
Author

One issue with this PR is that it uses sha3-256 from tiny-keccak rather than the Ethereum Keccak256. So its not usable for an ETH bridge.

@0o-de-lally
Copy link
Collaborator

This is stellar Move code! Hat's off!

We have a user here @coin1111 that has implemented a early version of an eth bridge. For that he created a "native function" with keccak. Although, oddly I don't see it in V6, so I think it was ignored with the migration.

Anyhow. Perhaps you want to pull in the XHASH module from V5, see below. And secondly, you might want to review the bridge code. Although, where we are today, it seems more likely that axelar would be the first bridge on 0L.

https://github.com/0LNetworkCommunity/libra/blob/main/language/diem-framework/modules/0L/xhash.move

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.

3 participants