harmony-one / horizon

Horizon - a trustless harmony to ethereum bridge
MIT License
36 stars 29 forks source link

EIP-1559 update for verifyPOW using ethash to process modified header with baseFeePerGas #25

Closed gupadhyaya closed 2 years ago

gupadhyaya commented 2 years ago

for any blocks after the London hard fork that introduced eip 1559, the ethash validation fails: https://github.com/harmony-one/horizon/blob/main/tools/eth2hmy-relay/lib/DagProof.js#L59. this probably needs some adjustment in the ethash library https://github.com/harmony-one/horizon/tree/main/tools/eth2hmy-relay/ethash/dist

peekpi commented 2 years ago

EIP1559 appended the base_fee_per_gas field into block headers, so the library calculates the wrong block hash and then fails validation. #29 might fix it.

gupadhyaya commented 2 years ago

@peekpi could you take a look at https://github.com/harmony-one/horizon/pull/29 and see if it fixes the issue? If so, merge it. https://github.com/fzgem18 is a freelancer working part time on helping us on horizon as well.