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

feat(relayer): Withdrawals root #13360

Merged
merged 21 commits into from
Mar 19, 2023
Merged

feat(relayer): Withdrawals root #13360

merged 21 commits into from
Mar 19, 2023

Conversation

cyberhorsey
Copy link
Contributor

@cyberhorsey cyberhorsey commented Mar 18, 2023

This PR fixes the remaining bridge issues for claiming messages.

  1. post-shanghai forks need withdrawalsRoot for generating proofs. This is why neither relayer nor bridge-ui work on Sepolia right now, but work on internal devnet, hardhat tests, and Goerli. But code must be backwards compatible with non-shanghai chains. Now this proof generation works on both.

  2. Ethers can not process empty string for bytes or bytes32, so with relayer-saved transactions from the API, we need to check if Message.Data is empty, and if so, set it to 0x, which ethers accepts.

  3. Working in this project doesnt feel good with adding very strict eslint and then not fixing any of the issues. I removed ESLint, and we can re-add a light one, and fix rules one by one, so its a happy working environment. There is no value to the current approach at all.

  4. Update go-ethereum library to latest, so we have access to WithdrawalsHash on the header, for post-Shanghai forks such as Sepolia.

  5. Add code coverage for both types of blocks.

  6. bridge UI was using the MySQL database ID and not the message ID, so claim header hash would not be valid.

After merging this, bridge-ui will auto deploy to Vercel, but relayer needs deployment in Kubernetes after latest image builds.

@codecov
Copy link

codecov bot commented Mar 18, 2023

Codecov Report

❗ No coverage uploaded for pull request base (alpha-2@ec98998). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             alpha-2   #13360   +/-   ##
==========================================
  Coverage           ?   35.15%           
==========================================
  Files              ?      122           
  Lines              ?     3689           
  Branches           ?      510           
==========================================
  Hits               ?     1297           
  Misses             ?     2302           
  Partials           ?       90           
Flag Coverage Δ *Carryforward flag
bridge-ui 95.80% <0.00%> (?)
protocol 0.00% <0.00%> (?)
relayer 61.96% <0.00%> (?)
ui 100.00% <0.00%> (?) Carriedforward from 2dfa22b

*This pull request uses carry forward flags. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@davidtaikocha davidtaikocha added this pull request to the merge queue Mar 19, 2023
@davidtaikocha davidtaikocha merged commit 935b0cc into alpha-2 Mar 19, 2023
@davidtaikocha davidtaikocha deleted the withdrawals_root branch March 19, 2023 02:59
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.

4 participants