celestiaorg / ethermint

Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK.
https://evmos.dev/
GNU Lesser General Public License v3.0
10 stars 15 forks source link

Ethermint uses Tendermint Hashes #71

Open jbowen93 opened 2 years ago

jbowen93 commented 2 years ago

Currently Ethermint uses Tendermint hashes for blocks. This is problematic because when Optimism retrieves a block it validates its header https://github.com/celestiaorg/optimism/blob/develop/op-node/l1/types.go#L113

if computed := header.header.Hash(); computed != info.hash

These hashes do not match

jbowen93 commented 2 years ago

I'm going to attempt to create a middleware layer that converts Ethereum hashes to Tendermint hashes prior to passing retrieve call to Optimint/Tendermint.

jbowen93 commented 2 years ago

The best way to move forward here is to include both the tendermint hash and the ethereum hash on each block. Then we can create an index between the two.