Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Add support for better client version details #672

Merged
merged 8 commits into from
Oct 7, 2022

Conversation

zivkovicmilos
Copy link
Contributor

@zivkovicmilos zivkovicmilos commented Aug 5, 2022

Description

This PR resolves a pending issue that doesn't return proper chain information on the client version.

It removes the base GET endpoint to the JSON-RPC layer, as it's not by the standard, nor should it be supported.
Users should use the web3_clientVersion endpoint instead, that is outlined in the specification.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Additional comments

Fix EDGE-709

@zivkovicmilos zivkovicmilos added the bug fix Functionality that fixes a bug label Aug 5, 2022
@zivkovicmilos zivkovicmilos self-assigned this Aug 5, 2022
@zivkovicmilos zivkovicmilos linked an issue Aug 5, 2022 that may be closed by this pull request
@zivkovicmilos zivkovicmilos marked this pull request as ready for review August 5, 2022 10:04
Copy link
Contributor

@ZeljkoBenovic ZeljkoBenovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good.
We should just consider if we're totally removing GET endpoint

jsonrpc/jsonrpc.go Show resolved Hide resolved
@zivkovicmilos zivkovicmilos marked this pull request as draft August 11, 2022 20:11
@Kourin1996 Kourin1996 marked this pull request as ready for review September 9, 2022 12:23
@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #672 (2ca4a03) into develop (66897d8) will decrease coverage by 0.13%.
The diff coverage is 71.42%.

❗ Current head 2ca4a03 differs from pull request most recent head bc72aaa. Consider uploading reports for the commit bc72aaa to get more accurate results

@@             Coverage Diff             @@
##           develop     #672      +/-   ##
===========================================
- Coverage    52.70%   52.56%   -0.14%     
===========================================
  Files          130      130              
  Lines        17146    17111      -35     
===========================================
- Hits          9037     8995      -42     
- Misses        7461     7470       +9     
+ Partials       648      646       -2     
Impacted Files Coverage Δ
jsonrpc/jsonrpc.go 25.53% <57.57%> (+7.29%) ⬆️
jsonrpc/dispatcher.go 55.00% <80.64%> (+1.17%) ⬆️
jsonrpc/web3_endpoint.go 80.00% <100.00%> (+10.00%) ⬆️
txpool/lookup_map.go 88.46% <0.00%> (-11.54%) ⬇️
blockchain/subscription.go 72.00% <0.00%> (-10.50%) ⬇️
blockchain/blockchain.go 51.62% <0.00%> (-1.63%) ⬇️
blockchain/testing.go 59.29% <0.00%> (-1.00%) ⬇️
types/receipt.go 11.57% <0.00%> (-0.25%) ⬇️
jsonrpc/filter_manager.go 76.96% <0.00%> (-0.21%) ⬇️
txpool/queue.go 80.46% <0.00%> (-0.16%) ⬇️
... and 13 more

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

Copy link
Contributor

@0xAleksaOpacic 0xAleksaOpacic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for exelent tests coverage 🚀

@zivkovicmilos zivkovicmilos merged commit e423eed into develop Oct 7, 2022
@zivkovicmilos zivkovicmilos deleted the feature/json-rpc-base branch October 7, 2022 10:50
@github-actions github-actions bot locked and limited conversation to collaborators Oct 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fix Functionality that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent response from JSON-RPC GET method
5 participants