Skip to content

Comments

update txmgr to support sending blob txs#8760

Merged
sebastianst merged 1 commit intoethereum-optimism:developfrom
roberto-bayardo:4844-txmgr
Jan 6, 2024
Merged

update txmgr to support sending blob txs#8760
sebastianst merged 1 commit intoethereum-optimism:developfrom
roberto-bayardo:4844-txmgr

Conversation

@roberto-bayardo
Copy link
Collaborator

@roberto-bayardo roberto-bayardo commented Dec 22, 2023

Description

This PR extends TxManager to send Blob transactions instead of DynamicFeeTransactions whenever the transaction candidate passed in by the caller contains Blobs. It creates the Blob sidecars as appropriate, and implements the special fee bumping logic for blob transactions expected by standard implementations like geth.

Tests

Added unit test to confirm the new fee bumping logic for blob transactions work as expected and that receipts for mined blob transactions are generated with expected fields.

@roberto-bayardo roberto-bayardo force-pushed the 4844-txmgr branch 7 times, most recently from 6106b9a to 674147d Compare December 23, 2023 01:27
@roberto-bayardo roberto-bayardo marked this pull request as ready for review December 23, 2023 01:30
@roberto-bayardo roberto-bayardo requested a review from a team as a code owner December 23, 2023 01:30
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 23, 2023

Walkthrough

Walkthrough

The changes across various files in the transaction manager service primarily integrate support for blob transactions, adjusting fee calculations, and modifying function calls to accommodate new parameters. These updates reflect an adaptation to a new transaction type and its associated fee structures, impacting how transactions are crafted, signed, and managed within the system.

Changes

File(s) Summary of Changes
.../price_bump_test.go Modified updateFees function call to include an extra boolean argument.
.../queue_test.go Updated backend.mine call to accept an additional nil argument.
txmgr.go Added dependencies, updated constants, interface, and functions for blob transaction support.
.../txmgr_test.go Imported new packages, updated structs and methods for blob fee calculation, and mining adjustments.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit's AI:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Member

@sebastianst sebastianst left a comment

Choose a reason for hiding this comment

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

Generally LGTM! A few remarks about additional tests or improvements to tests, especially around blob fees.

@roberto-bayardo roberto-bayardo force-pushed the 4844-txmgr branch 4 times, most recently from 71d60a3 to 0e07f44 Compare January 5, 2024 17:37
sebastianst
sebastianst previously approved these changes Jan 5, 2024
Copy link
Member

@sebastianst sebastianst left a comment

Choose a reason for hiding this comment

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

LGTM

@sebastianst sebastianst dismissed their stale review January 5, 2024 18:25

Discussed with Roberto that we're gonna add a craftTx test for blob txs. We don't test these yet.

@roberto-bayardo roberto-bayardo force-pushed the 4844-txmgr branch 2 times, most recently from 4902e0b to dce8f30 Compare January 6, 2024 16:57
@roberto-bayardo
Copy link
Collaborator Author

craftTx test for blob tx added

Copy link
Member

@sebastianst sebastianst left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding that test @roberto-bayardo!

@sebastianst sebastianst enabled auto-merge January 6, 2024 18:39
@codecov
Copy link

codecov bot commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (28c3596) 34.85% compared to head (9804bc8) 34.81%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8760      +/-   ##
===========================================
- Coverage    34.85%   34.81%   -0.05%     
===========================================
  Files          165      165              
  Lines         7106     7106              
  Branches      1198     1198              
===========================================
- Hits          2477     2474       -3     
- Misses        4477     4482       +5     
+ Partials       152      150       -2     
Flag Coverage Δ
cannon-go-tests 63.48% <ø> (ø)
chain-mon-tests 27.14% <ø> (ø)
common-ts-tests 26.74% <ø> (ø)
contracts-bedrock-tests 20.67% <ø> (-0.15%) ⬇️
contracts-ts-tests 12.25% <ø> (ø)
core-utils-tests 44.03% <ø> (ø)
sdk-next-tests 42.08% <ø> (ø)
sdk-tests 42.08% <ø> (ø)

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

see 3 files with indirect coverage changes

@sebastianst sebastianst added this pull request to the merge queue Jan 6, 2024
Merged via the queue into ethereum-optimism:develop with commit 771988b Jan 6, 2024
@roberto-bayardo roberto-bayardo deleted the 4844-txmgr branch January 6, 2024 19:18
@ethereum-optimism ethereum-optimism deleted a comment May 1, 2024
@ethereum-optimism ethereum-optimism deleted a comment May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants