Skip to content

txgmr,op-batcher,op-proposer: Migrate transaction creation to the txmgr#5246

Merged
trianglesphere merged 3 commits intodevelopfrom
jg/proposer_craft_tx_in_tx_manager
Mar 24, 2023
Merged

txgmr,op-batcher,op-proposer: Migrate transaction creation to the txmgr#5246
trianglesphere merged 3 commits intodevelopfrom
jg/proposer_craft_tx_in_tx_manager

Conversation

@trianglesphere
Copy link
Contributor

@trianglesphere trianglesphere commented Mar 23, 2023

Description

This consolidates the CraftTx and Send functions in the transaction manger. The transaction manager is now fully responsible for creating & sending transactions.

I did have to reimplement some of the behavior inside the action testing because it is unable to handle blocking the actual proposer.

Tests

Added a test to ensure that the manual packing is the same the expected packing from the contracts. Note that this code is also tested by the devnet & op-e2e which exercise the full withdrawals codepath.

Metadata

TODOs

@changeset-bot
Copy link

changeset-bot bot commented Mar 23, 2023

⚠️ No Changeset found

Latest commit: 8ade648

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Mar 23, 2023

Deploy Preview for opstack-docs canceled.

Name Link
🔨 Latest commit 8ade648
🔍 Latest deploy log https://app.netlify.com/sites/opstack-docs/deploys/641dcb9bf07a3e00081fefad

@codecov
Copy link

codecov bot commented Mar 23, 2023

Codecov Report

Merging #5246 (3b723d6) into develop (0446d83) will decrease coverage by 4.44%.
The diff coverage is 19.67%.

❗ Current head 3b723d6 differs from pull request most recent head 8ade648. Consider uploading reports for the commit 8ade648 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5246      +/-   ##
===========================================
- Coverage    40.34%   35.91%   -4.44%     
===========================================
  Files          372      225     -147     
  Lines        23676    19564    -4112     
  Branches       832        0     -832     
===========================================
- Hits          9552     7026    -2526     
+ Misses       13397    11852    -1545     
+ Partials       727      686      -41     
Flag Coverage Δ
bedrock-go-tests 35.91% <19.67%> (-0.68%) ⬇️
common-ts-tests ?
contracts-bedrock-tests ?
contracts-tests ?
core-utils-tests ?
dtl-tests ?
fault-detector-tests ?
sdk-tests ?

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

Impacted Files Coverage Δ
op-proposer/proposer/l2_output_submitter.go 2.63% <7.31%> (ø)
op-service/txmgr/txmgr.go 79.59% <22.22%> (-2.01%) ⬇️
op-service/txmgr/mocks/TxManager.go 42.30% <60.00%> (-5.52%) ⬇️
op-batcher/batcher/driver.go 5.03% <66.66%> (-0.31%) ⬇️

... and 161 files with indirect coverage changes

@trianglesphere trianglesphere force-pushed the jg/proposer_craft_tx_in_tx_manager branch from f16678a to 9241d24 Compare March 23, 2023 21:32
@trianglesphere trianglesphere force-pushed the jg/proposer_craft_tx_in_tx_manager branch from 9241d24 to c5e9bba Compare March 23, 2023 21:35
@trianglesphere trianglesphere force-pushed the jg/proposer_craft_tx_in_tx_manager branch 4 times, most recently from 46fb6c2 to 3b723d6 Compare March 23, 2023 23:39
@trianglesphere trianglesphere changed the title Jg/proposer craft tx in tx manager txgmr,op-batcher,op-proposer: Migrate transaction creation to the txmgr Mar 23, 2023
@trianglesphere trianglesphere marked this pull request as ready for review March 23, 2023 23:47
@trianglesphere trianglesphere requested a review from a team as a code owner March 23, 2023 23:47
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.

Looks very good, just one suggestion about improving the abi encoding test.

Copy link
Contributor

@protolambda protolambda left a comment

Choose a reason for hiding this comment

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

LGTM, good refactor

This also adds a test for the proposer tx data creation.
@trianglesphere trianglesphere force-pushed the jg/proposer_craft_tx_in_tx_manager branch from 3b723d6 to 8ade648 Compare March 24, 2023 16:11
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.

Awesome ✨

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