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

test(common): fix and improve Ethereum proof tests #1872

Merged
merged 9 commits into from
Mar 11, 2024

Conversation

lumtis
Copy link
Member

@lumtis lumtis commented Mar 11, 2024

Description

Fix the current unit test failure we have

The reason for the failure was to use Ankr RPC for Goerli for unit test and this endpoint is no longer supported.

We already add an issue to remove use of RPC so this PR replace the RPC usage with static data fetched from Sepolia network.

Some other improvement:

  • Remove logs: not necessary as unit test are easy to debug
  • Simplify the test for the essential
  • Add more assertion, previous tests show errors in logs but didn't assert for it

Some other tests related to MsgBlockHeader and add trackers don't work when not relying on the RPC. The implementation of sample.Header was also incorrect.
Since block headers are not yet ready to production in any case, I commented out some of the tests and track it here: #1875
Future tests should mock proof verification

Closes: #1458 #1871

@lumtis lumtis linked an issue Mar 11, 2024 that may be closed by this pull request
@lumtis lumtis marked this pull request as draft March 11, 2024 12:56
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.62%. Comparing base (34c586b) to head (23867cd).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1872      +/-   ##
===========================================
- Coverage    45.11%   44.62%   -0.50%     
===========================================
  Files          219      219              
  Lines        12770    12770              
===========================================
- Hits          5761     5698      -63     
- Misses        6555     6630      +75     
+ Partials       454      442      -12     

see 5 files with indirect coverage changes

@lumtis lumtis marked this pull request as ready for review March 11, 2024 14:24
@lumtis lumtis merged commit 414e5fe into develop Mar 11, 2024
21 checks passed
@lumtis lumtis deleted the test/remove-eth-proof-test branch March 11, 2024 21:06
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.

Unit test failing common: remove usage of https://rpc.ankr.com/eth_goerli dialing for testing
3 participants