Skip to content

Conversation

@manav2401
Copy link
Member

This PR adds new block type for "finalized and "safe" blocks to honour the post-merge API modifications.

The purpose behind this change is to consume this client in heimdall for L1 communication i.e. ethereum mainnet and goerli test network which are already following these notions.

Reference implementation from geth: ethereum/go-ethereum#24282, ethereum/go-ethereum#25165, ethereum/go-ethereum#25580.

NOTE: This by no means adds/serves "finalized" or "safe" blocks from bor.

@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2022

Codecov Report

Base: 56.80% // Head: 56.73% // Decreases project coverage by -0.07% ⚠️

Coverage data is based on head (707d0de) compared to base (d73d6df).
Patch coverage: 16.66% of modified lines in pull request are covered.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           v0.2.18-candidate     #517      +/-   ##
=====================================================
- Coverage              56.80%   56.73%   -0.08%     
=====================================================
  Files                    578      578              
  Lines                  68307    68319      +12     
=====================================================
- Hits                   38805    38761      -44     
- Misses                 26154    26208      +54     
- Partials                3348     3350       +2     
Impacted Files Coverage Δ
ethclient/gethclient/gethclient.go 0.00% <0.00%> (ø)
rpc/types.go 82.52% <ø> (ø)
ethclient/ethclient.go 8.49% <33.33%> (+0.58%) ⬆️
p2p/simulations/mocker.go 30.00% <0.00%> (-5.56%) ⬇️
p2p/discover/v4_udp.go 72.75% <0.00%> (-4.35%) ⬇️
p2p/peer.go 73.63% <0.00%> (-2.00%) ⬇️
les/costtracker.go 62.96% <0.00%> (-1.59%) ⬇️
core/state/trie_prefetcher.go 74.80% <0.00%> (-1.53%) ⬇️
les/odr.go 89.02% <0.00%> (-1.22%) ⬇️
rpc/client.go 83.72% <0.00%> (-1.17%) ⬇️
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@manav2401 manav2401 requested a review from a team September 21, 2022 11:37
@manav2401 manav2401 merged commit c91d4ca into v0.2.18-candidate Sep 22, 2022
@manav2401 manav2401 deleted the manav/ethclient-finalized-safe-tags branch September 22, 2022 05:06
manav2401 added a commit that referenced this pull request Sep 22, 2022
* rpc: add finalized and safe block types

* ethclient: honour safe and finalized block requests

* fix: remove BlockByNumberWithoutTx function
manav2401 added a commit that referenced this pull request Sep 22, 2022
… (#523)

* rpc: add finalized and safe block types

* ethclient: honour safe and finalized block requests

* fix: remove BlockByNumberWithoutTx function
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.

6 participants