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: adding polling for new heads. #2160

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Conversation

ebadiere
Copy link
Collaborator

@ebadiere ebadiere commented Feb 29, 2024

Added polling for latest block, newHeads. This feature allows the relay to be polled for the latest blocks. This can be used by automated systems and oracles.

Related issue(s): #2117

Fixes #

@ebadiere ebadiere self-assigned this Feb 29, 2024
@ebadiere ebadiere added the enhancement New feature or request label Feb 29, 2024
@ebadiere ebadiere added this to the 0.43.0 milestone Feb 29, 2024
Copy link

github-actions bot commented Feb 29, 2024

Tests

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

Results for commit 3cd0af4.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

codecov-commenter commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.15%. Comparing base (548dbe0) to head (1e5aa53).
Report is 8 commits behind head on main.

❗ Current head 1e5aa53 differs from pull request most recent head 3cd0af4. Consider uploading reports for the commit 3cd0af4 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2160   +/-   ##
=======================================
  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.

Copy link

github-actions bot commented Feb 29, 2024

Acceptance Tests

  13 files  152 suites   15m 14s ⏱️
394 tests 389 ✔️ 4 💤 1
414 runs  409 ✔️ 4 💤 1

Results for commit 3cd0af4.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

A few items.
Also please update the PR with a description

package.json Outdated
@@ -72,7 +73,7 @@
"keyv-file": "^0.3.0",
"koa-cors": "^0.0.16",
"koa-websocket": "^7.0.0",
"lerna": "^8.1.1",
"lerna": "^8.0.2",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Q: why are we bumping down?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a new entry to the scripts in the package.json, and I suspect I didn't have the latest which was updated by a snyk. The version is updated.

@@ -20,3 +20,4 @@ DEBUG_API_ENABLED=true
SEND_RAW_TRANSACTION_SIZE_LIMIT=131072
BATCH_REQUESTS_ENABLED=true
TEST_GAS_PRICE_DEVIATION=0.2
WS_NEW_HEADS_ENABLED=true
Copy link
Collaborator

Choose a reason for hiding this comment

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

default to false for this sprint

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

packages/ws-server/src/webSocketServer.ts Show resolved Hide resolved
Copy link

sonarcloud bot commented Mar 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

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 👍

@ebadiere ebadiere merged commit 4469f5e into main Mar 5, 2024
27 of 29 checks passed
@ebadiere ebadiere deleted the 2117-poll-for-newHeads-updates branch March 5, 2024 21:18
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
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants