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: calculate logsBloom for synthetic transactions #2785

Merged
merged 11 commits into from
Aug 12, 2024

Conversation

natanasow
Copy link
Collaborator

Description:
Currently with our synthetic transactions, which are constructed on the fly using events from the operations, we don't return adequate and real logsBloom. This might be a problem for some tools, which requires logsBloom for their operation.

Solution:

We can easily calculate logsBloom for each receipt, this can be done, by taking a look at how it's implemented in the javascript execution client for Ethereum here

Related issue(s):

Fixes #2664

Notes for reviewer:

Checklist

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

@natanasow natanasow self-assigned this Aug 2, 2024
@natanasow natanasow added the enhancement New feature or request label Aug 2, 2024
@natanasow natanasow added this to the 0.54.0 milestone Aug 2, 2024
@natanasow natanasow marked this pull request as ready for review August 2, 2024 08:54
Copy link

github-actions bot commented Aug 2, 2024

Acceptance Tests

  23 files  310 suites   38m 39s ⏱️
611 tests 605 ✔️ 4 💤   2
876 runs  860 ✔️ 4 💤 12

Results for commit 9823872.

♻️ This comment has been updated with latest results.

@natanasow natanasow marked this pull request as draft August 2, 2024 09:53
Copy link

github-actions bot commented Aug 2, 2024

Tests

    3 files  168 suites   12s ⏱️
901 tests 900 ✔️ 1 💤 0
914 runs  913 ✔️ 1 💤 0

Results for commit 9823872.

♻️ This comment has been updated with latest results.

@natanasow natanasow marked this pull request as ready for review August 2, 2024 11:50
georgi-l95
georgi-l95 previously approved these changes Aug 6, 2024
Copy link
Member

@georgi-l95 georgi-l95 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
Contributor

@victor-yanev victor-yanev left a comment

Choose a reason for hiding this comment

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

LGTM, I left a few suggestions

packages/relay/src/utils.ts Outdated Show resolved Hide resolved
packages/relay/src/utils.ts Outdated Show resolved Hide resolved
packages/relay/src/utils.ts Outdated Show resolved Hide resolved
packages/relay/src/utils.ts Outdated Show resolved Hide resolved
packages/relay/src/utils.ts Outdated Show resolved Hide resolved
packages/relay/tests/lib/utils.spec.ts Outdated Show resolved Hide resolved
packages/relay/src/lib/eth.ts Outdated Show resolved Hide resolved
Signed-off-by: nikolay <[email protected]>
@natanasow natanasow requested a review from victor-yanev August 8, 2024 06:43
Signed-off-by: nikolay <[email protected]>
victor-yanev
victor-yanev previously approved these changes Aug 8, 2024
Copy link
Contributor

@victor-yanev victor-yanev left a comment

Choose a reason for hiding this comment

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

LGTM, few last suggestions:

packages/relay/tests/lib/utils.spec.ts Outdated Show resolved Hide resolved
packages/relay/tests/lib/utils.spec.ts Outdated Show resolved Hide resolved
packages/relay/tests/lib/utils.spec.ts Outdated Show resolved Hide resolved
packages/relay/src/logsBloomUtils.ts Outdated Show resolved Hide resolved
Signed-off-by: nikolay <[email protected]>
Copy link

sonarqubecloud bot commented Aug 9, 2024

Copy link

codecov bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.07%. Comparing base (d74f13b) to head (9823872).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2785      +/-   ##
==========================================
+ Coverage   77.80%   80.07%   +2.27%     
==========================================
  Files          43       47       +4     
  Lines        3329     3478     +149     
  Branches      706      736      +30     
==========================================
+ Hits         2590     2785     +195     
+ Misses        493      429      -64     
- Partials      246      264      +18     
Flag Coverage Δ
relay 79.06% <95.65%> (+0.19%) ⬆️
server 74.61% <ø> (ø)
ws-server 61.70% <ø> (ø)

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

Files Coverage Δ
packages/relay/src/lib/eth.ts 83.08% <100.00%> (+1.51%) ⬆️
packages/relay/src/logsBloomUtils.ts 100.00% <100.00%> (ø)

... and 17 files with indirect coverage changes

Copy link
Contributor

@victor-yanev victor-yanev left a comment

Choose a reason for hiding this comment

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

LGTM

@natanasow natanasow merged commit 3d6ce10 into main Aug 12, 2024
38 checks passed
@natanasow natanasow deleted the 2644-calculate-logsBloom-for-synthetic-txs branch August 12, 2024 07:08
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.

Calculate logsBloom for synthetic transactions
4 participants