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: Add workaround for support of isAssociated #2828

Merged
merged 17 commits into from
Sep 9, 2024

Conversation

Ivo-Yankov
Copy link
Collaborator

@Ivo-Yankov Ivo-Yankov commented Aug 15, 2024

Description:

  • Adds a temporary workaround that enables the support of direct isAssociated calls to the relay.
  • Adds a new feature flag ETH_CALL_FORCE_TO_CONSENSUS_BY_SELECTOR that enables some requests to eth_call to go through the Consensus node instead of the Mirror node regardless of the value of ETH_CALL_DEFAULT_TO_CONSENSUS_NODE. When set to true if the function selector is found in a predetermined array then the call will go through Consensus. For now the only entry in this list is 0x4d8fdd6d, which is the selector of isAssociated()

Related issue(s):

Fixes #2810

Notes for reviewer:

Checklist

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

Copy link

github-actions bot commented Aug 15, 2024

Acceptance Tests

  17 files  237 suites   29m 27s ⏱️
602 tests 597 ✔️ 4 💤 1
732 runs  727 ✔️ 4 💤 1

Results for commit c6eb1fe.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 19, 2024

Tests

       3 files     272 suites   20s ⏱️
1 275 tests 1 274 ✔️ 1 💤 0
1 287 runs  1 286 ✔️ 1 💤 0

Results for commit c6eb1fe.

♻️ This comment has been updated with latest results.

Signed-off-by: Ivo Yankov <[email protected]>
@Ivo-Yankov Ivo-Yankov marked this pull request as ready for review August 26, 2024 11:48
@Ivo-Yankov Ivo-Yankov added this to the 0.55.0 milestone Aug 26, 2024
packages/relay/src/lib/eth.ts Outdated Show resolved Hide resolved
packages/relay/src/lib/eth.ts Outdated Show resolved Hide resolved
docs/configuration.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@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.

Good work. Some comments in-line.

ebadiere
ebadiere previously approved these changes Aug 28, 2024
Copy link
Collaborator

@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.

Signed-off-by: Ivo Yankov <[email protected]>
packages/relay/tests/lib/eth/eth_call.spec.ts Outdated Show resolved Hide resolved
packages/relay/src/formatters.ts Outdated Show resolved Hide resolved
Signed-off-by: Ivo Yankov <[email protected]>
Copy link
Collaborator

@konstantinabl konstantinabl left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

sonarcloud bot commented Sep 9, 2024

@Ivo-Yankov Ivo-Yankov merged commit 559285b into main Sep 9, 2024
43 checks passed
@Ivo-Yankov Ivo-Yankov deleted the 2810-add-workaround-for-support-of-isassociated branch September 9, 2024 09:23
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.32%. Comparing base (ec2a151) to head (c6eb1fe).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2828      +/-   ##
==========================================
+ Coverage   84.25%   84.32%   +0.07%     
==========================================
  Files          40       56      +16     
  Lines        3055     3771     +716     
  Branches      632      771     +139     
==========================================
+ Hits         2574     3180     +606     
- Misses        279      353      +74     
- Partials      202      238      +36     
Flag Coverage Δ
relay 84.39% <100.00%> (+0.14%) ⬆️
server 83.05% <ø> (?)
ws-server 97.87% <ø> (?)

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

Files with missing lines Coverage Δ
packages/relay/src/lib/constants.ts 90.69% <ø> (ø)
packages/relay/src/lib/eth.ts 81.10% <100.00%> (+0.41%) ⬆️

... and 17 files with indirect coverage changes

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.

Add workaround for support of isAssociated
5 participants