Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Inconsistent transaction hashing with Tendermint #67

Closed
fedekunze opened this issue Jun 4, 2021 · 5 comments · Fixed by #202
Closed

Inconsistent transaction hashing with Tendermint #67

fedekunze opened this issue Jun 4, 2021 · 5 comments · Fixed by #202
Labels
⚠️ Blocked Blocked by another dependency (issue or PR)

Comments

@fedekunze
Copy link
Contributor

The hash that a user or library would expect from sending an ethereum tx over JSON-RPC doesn't match the one provided by the ResponseDeliverTx on Tendermint.

ref: tendermint/tendermint#6539

@fedekunze fedekunze added the ⚠️ Blocked Blocked by another dependency (issue or PR) label Jun 4, 2021
@fedekunze fedekunze changed the title Inconsistent transaction hashing Inconsistent transaction hashing with Tendermint Jun 4, 2021
@yihuang
Copy link
Contributor

yihuang commented Jun 10, 2021

If don't modify tendermint itself, we can store the hash relationship on chain?

@fedekunze
Copy link
Contributor Author

that's an option, but we would have to prune the entries at some point. The map would have to be eth hash --> tm hash (querying by tm hash should already work fine)

@yihuang
Copy link
Contributor

yihuang commented Jun 22, 2021

another thing about tx hash is, if we maintain hash relationship by ourself, we might be able to support multiple eth tx in one tm tx, just maintain the map of eth hash -> (tm hash, msg index), if we customize the tm hash, we stick with 1-to-1 map of evm tx and tm tx. There might be other tricky issues with multiple eth tx in single tm tx though.

@fedekunze
Copy link
Contributor Author

Let's implement the map as a short-term solution. The update to Tendermint probably won't be included in a release soon...
cc: @marbar3778

@khoslaventures khoslaventures added this to the Milestone 1: Developer Usability and Testing milestone Jun 23, 2021
@yihuang
Copy link
Contributor

yihuang commented Jun 29, 2021

We already emit the eth tx hash in events, so as long as enabled indexing in tendermint, we can query /tx_search to do the hash conversion.
Sounds good as a temporary solution before we finally customize tendermint.
Leave the pruning issues to tendermint itself.

yihuang referenced this issue in yihuang/ethermint Jun 30, 2021
Closes #67

Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

change GetTxByEthHash to method

add entry to changelog
fedekunze pushed a commit that referenced this issue Jun 30, 2021
* return eth tx hash to client

Closes #67

Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

change GetTxByEthHash to method

add entry to changelog

* use eth tx hash internally
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚠️ Blocked Blocked by another dependency (issue or PR)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants