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: added support for getTransactionByHash endpoint in the WS server (#2273) #2295

Conversation

quiet-node
Copy link
Member

Description:
This PR adds support and test coverage for eth_getTransactionByHash(txHash) endpoint to the websocket server.

This PR also slightly modify utils functions in ws-server package to better suit the new API

Related issue(s):

Fixes #2273

Notes for reviewer:

Checklist

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

@quiet-node quiet-node linked an issue Apr 5, 2024 that may be closed by this pull request
@quiet-node quiet-node self-assigned this Apr 5, 2024
@quiet-node quiet-node added enhancement New feature or request P1 labels Apr 5, 2024
Copy link

github-actions bot commented Apr 5, 2024

Tests

    1 files    35 suites   3s ⏱️
194 tests 193 ✔️ 1 💤 0
197 runs  196 ✔️ 1 💤 0

Results for commit 1591362.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 5, 2024

Acceptance Tests

  15 files  173 suites   16m 8s ⏱️
423 tests 391 ✔️ 4 💤 28
575 runs  533 ✔️ 4 💤 38

Results for commit 1591362.

♻️ This comment has been updated with latest results.

Copy link

sonarqubecloud bot commented Apr 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
13.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.15%. Comparing base (624072c) to head (657db83).

❗ Current head 657db83 differs from pull request most recent head 1591362. Consider uploading reports for the commit 1591362 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2295   +/-   ##
=======================================
  Coverage   75.15%   75.15%           
=======================================
  Files          13       13           
  Lines         644      644           
  Branches      118      118           
=======================================
  Hits          484      484           
  Misses        115      115           
  Partials       45       45           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@quiet-node quiet-node changed the title feat: added support for getTransactionByHas endpoint in the WS server (#2273) feat: added support for getTransactionByHash endpoint in the WS server (#2273) Apr 5, 2024
Copy link
Collaborator

@AlfredoG87 AlfredoG87 left a comment

Choose a reason for hiding this comment

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

LGTM, just one question.

Comment on lines +186 to +188
socketIdPrefix,
requestIdPrefix,
connectionIdPrefix,
Copy link
Collaborator

Choose a reason for hiding this comment

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

question, what is the difference between socketId and connectionId.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is actually a good question they are actually both the same. I have made an update to remove the socketId in the next PR

Copy link
Contributor

@ebadiere ebadiere left a comment

Choose a reason for hiding this comment

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

LG.

@ebadiere ebadiere merged commit 967056c into main Apr 5, 2024
32 of 33 checks passed
@ebadiere ebadiere deleted the 2273-implement-gettransactiontransactionhash-in-the-websocket-server branch April 5, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement getTransaction(transactionHash) :in the websocket server
4 participants