Skip to content

feat: remove duplication of web3 client verrsion method #3508

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

Merged
merged 3 commits into from
Mar 7, 2025

Conversation

natanasow
Copy link
Contributor

@natanasow natanasow commented Feb 25, 2025

Description:

Currently, there are two implementations of the web3 client version method.

Solution:

Research why we've added both of them (is the first one deprecated) and remove the non-standard one.

Related issue(s):

Fixes #3505

Notes for reviewer:

After some research, we found out that there is no web3_client_version in any JSON RPC standard even in the deprecated ones.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: nikolay <n.atanasow94@gmail.com>
@natanasow natanasow self-assigned this Feb 25, 2025
@natanasow natanasow added the enhancement New feature or request label Feb 25, 2025
@natanasow natanasow added this to the 0.68.0 milestone Feb 25, 2025
@natanasow natanasow marked this pull request as ready for review February 25, 2025 09:00
@natanasow natanasow requested review from a team and Nana-EC as code owners February 25, 2025 09:00
Copy link

github-actions bot commented Feb 25, 2025

Test Results

 18 files   -   4  236 suites   - 44   33m 8s ⏱️ - 26m 16s
617 tests + 18  613 ✅ + 30  4 💤 ±0  0 ❌  - 12 
633 runs   - 180  629 ✅  - 166  4 💤 ±0  0 ❌  - 14 

Results for commit 2f687e9. ± Comparison against base commit 00d411b.

This pull request removes 5 and adds 23 tests. Note that renamed tests count towards both.
"after all" hook in "RPC Server Acceptance Tests" ‑ RPC Server Acceptance Tests "after all" hook in "RPC Server Acceptance Tests"
"before all" hook in "HBAR Rate Limit Tests" ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests "before all" hook in "HBAR Rate Limit Tests"
"before each" hook for "Should eventually exhaust the hbar limit for EXTENDED user and still allow another EXTENDED user to make calls" ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests HBAR Rate Limit For Different Spending Plan Tiers @hbarlimiter-batch2 Preconfigured Tiers EXTENDED Tier "before each" hook for "Should eventually exhaust the hbar limit for EXTENDED user and still allow another EXTENDED user to make calls"
"before each" hook for "Should increase the amount spent of the spending plan by the transaction cost" ‑ RPC Server Acceptance Tests Acceptance tests @hbarlimiter HBAR Limiter Acceptance Tests HBAR Rate Limit Tests HBAR Rate Limit For Different Spending Plan Tiers @hbarlimiter-batch2 Preconfigured Tiers PRIVILEGED Tier "before each" hook for "Should increase the amount spent of the spending plan by the transaction cost"
should execute "web3_client_version" ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-2 RPC Server Acceptance Tests @release Hardcoded RPC Endpoints should execute "web3_client_version"
should associate to a nft ‑ RPC Server Acceptance Tests Acceptance tests @tokencreate HTS Precompile Token Create Acceptance Tests should associate to a nft
should associate to a token with custom fees ‑ RPC Server Acceptance Tests Acceptance tests @tokencreate HTS Precompile Token Create Acceptance Tests should associate to a token with custom fees
should associate to a token ‑ RPC Server Acceptance Tests Acceptance tests @tokencreate HTS Precompile Token Create Acceptance Tests should associate to a token
should be able to approve anyone to spend tokens ‑ RPC Server Acceptance Tests Acceptance tests @tokencreate HTS Precompile Token Create Acceptance Tests HTS Precompile Approval Tests should be able to approve anyone to spend tokens
should be able to delete a token ‑ RPC Server Acceptance Tests Acceptance tests @tokencreate HTS Precompile Token Create Acceptance Tests HTS Precompile Delete Token Tests should be able to delete a token
should be able to execute getApproved on nft ‑ RPC Server Acceptance Tests Acceptance tests @tokencreate HTS Precompile Token Create Acceptance Tests HTS Precompile Approval Tests should be able to execute getApproved on nft
should be able to execute setApprovalForAllPublic ‑ RPC Server Acceptance Tests Acceptance tests @tokencreate HTS Precompile Token Create Acceptance Tests HTS Precompile Approval Tests should be able to execute setApprovalForAllPublic
should be able to get a custom token fees ‑ RPC Server Acceptance Tests Acceptance tests @tokencreate HTS Precompile Token Create Acceptance Tests HTS Precompile Custom Fees Tests should be able to get a custom token fees
should be able to get default KYC status for fungible token ‑ RPC Server Acceptance Tests Acceptance tests @tokencreate HTS Precompile Token Create Acceptance Tests HTS Precompile KYC Tests should be able to get default KYC status for fungible token
should be able to get default KYC status for non fungible token ‑ RPC Server Acceptance Tests Acceptance tests @tokencreate HTS Precompile Token Create Acceptance Tests HTS Precompile KYC Tests should be able to get default KYC status for non fungible token
…

♻️ This comment has been updated with latest results.

quiet-node
quiet-node previously approved these changes Feb 26, 2025
Copy link
Contributor

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

LGTM

@quiet-node
Copy link
Contributor

Approved but however, we should also reach out to DAs to make sure this removal is not blocking anyone

@natanasow natanasow requested a review from a team February 26, 2025 15:12
acuarica
acuarica previously approved these changes Feb 27, 2025
Copy link
Contributor

@acuarica acuarica left a comment

Choose a reason for hiding this comment

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

Out of curiosity, do we know why we added it in the first place?

Signed-off-by: nikolay <n.atanasow94@gmail.com>
@natanasow natanasow dismissed stale reviews from acuarica and quiet-node via c1da700 February 27, 2025 10:51
@natanasow
Copy link
Contributor Author

Out of curiosity, do we know why we added it in the first place?

TBH I don't know. I tried to dig deeper but it was added a long time ago (September 2022) and I didn't find any clue.

Copy link
Contributor

@Ferparishuertas Ferparishuertas left a comment

Choose a reason for hiding this comment

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

LGTM

quiet-node
quiet-node previously approved these changes Feb 28, 2025
Signed-off-by: nikolay <n.atanasow94@gmail.com>
@natanasow natanasow dismissed stale reviews from quiet-node and Ferparishuertas via 2f687e9 February 28, 2025 09:29
Copy link

@natanasow natanasow requested review from Ferparishuertas, acuarica, a team and quiet-node March 1, 2025 05:08
Copy link
Contributor

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

LGTM

@quiet-node quiet-node merged commit a632c53 into main Mar 7, 2025
47 checks passed
@quiet-node quiet-node deleted the 3505-remove-duplication-of-web3-clientversion branch March 7, 2025 17:31
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.55%. Comparing base (00d411b) to head (2f687e9).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3508      +/-   ##
==========================================
+ Coverage   85.38%   85.55%   +0.16%     
==========================================
  Files          74       74              
  Lines        4777     4777              
  Branches      985      985              
==========================================
+ Hits         4079     4087       +8     
+ Misses        407      403       -4     
+ Partials      291      287       -4     
Flag Coverage Δ
config-service 95.16% <ø> (ø)
relay 79.38% <ø> (ø)
server 84.71% <ø> (+0.43%) ⬆️
ws-server 36.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...s/server/src/koaJsonRpc/lib/methodConfiguration.ts 100.00% <ø> (ø)

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

simzzz pushed a commit that referenced this pull request Mar 11, 2025
* chore: remove web3_client_version

Signed-off-by: nikolay <n.atanasow94@gmail.com>

* chore: remove duplicated test

Signed-off-by: nikolay <n.atanasow94@gmail.com>

---------

Signed-off-by: nikolay <n.atanasow94@gmail.com>
@acuarica acuarica modified the milestones: 0.68.0, 0.67.0 Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review duplication of web3_client_version and web3_clientVersion.
4 participants