Skip to content

txmgr: Initialize signer and more in the tx manager proper#5258

Merged
mergify[bot] merged 8 commits intodevelopfrom
jg/tx_manager_owns_cli_setup
Mar 27, 2023
Merged

txmgr: Initialize signer and more in the tx manager proper#5258
mergify[bot] merged 8 commits intodevelopfrom
jg/tx_manager_owns_cli_setup

Conversation

@trianglesphere
Copy link
Contributor

@trianglesphere trianglesphere commented Mar 24, 2023

Description

This simplifies how the transaction manager is initialized.

Note: I am connecting to the L1 RPC twice instead of re-using a shared client. Right now we don't do anything where we might want this (like global rate limiting / retries), but we may need to change this in the future. I am relying on re-using a RPC flag for the transaction manager, but it works for now.

Some of the setup is a little tricky because we initialize the batcher/proposer from code partway through the initialization process rather than always from main.

This also moves some of the functions around inside the tx manager (but does not change their behavior).

Flag Changes

  • l2-output-hd-path and sequencer-hd-path -> hd-path. Breaking Change

TODOs

  • Author or reviewer has added an entry to the current release notes draft, if appropriate.
  • Manually verify that the flags are the same.

@changeset-bot
Copy link

changeset-bot bot commented Mar 24, 2023

⚠️ No Changeset found

Latest commit: a633783

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 24, 2023

Deploy Preview for opstack-docs canceled.

Name Link
🔨 Latest commit a633783
🔍 Latest deploy log https://app.netlify.com/sites/opstack-docs/deploys/64221ab4d63f4700081200b9

@trianglesphere trianglesphere force-pushed the jg/tx_manager_owns_cli_setup branch 4 times, most recently from 00f097e to 5937453 Compare March 24, 2023 22:23
This simplifies how the transaction manager is initialized.
@trianglesphere trianglesphere marked this pull request as ready for review March 24, 2023 22:39
@trianglesphere trianglesphere requested a review from a team as a code owner March 24, 2023 22:39
@trianglesphere trianglesphere force-pushed the jg/tx_manager_owns_cli_setup branch from 5937453 to 8e1578d Compare March 24, 2023 22:42
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.

Love the new encapsulation, how L1 write interaction is now invisible to the proposer & batcher. And another net negative diff 🎉

Shouldn't we also update the tx manager env flags in ops-bedrock/docker-compose.yml? And possibly other places as well, not sure.

A good follow up would be to also add (optional) flags for the NetworkTimeout and ReceiptQueryInterval to the tx mgr cli config.

Switch to using a shared network timeout.

Co-authored-by: Sebastian Stammler <seb@oplabs.co>
@trianglesphere trianglesphere force-pushed the jg/tx_manager_owns_cli_setup branch 2 times, most recently from b8bb962 to 2addc1b Compare March 27, 2023 19:38
@trianglesphere trianglesphere force-pushed the jg/tx_manager_owns_cli_setup branch from 2addc1b to 507fe13 Compare March 27, 2023 19:45
@trianglesphere trianglesphere force-pushed the jg/tx_manager_owns_cli_setup branch from 507fe13 to 2ebe9f4 Compare March 27, 2023 20:44
@trianglesphere trianglesphere force-pushed the jg/tx_manager_owns_cli_setup branch from eb97ec7 to 77ce12b Compare March 27, 2023 21:42
@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Merging #5258 (a633783) into develop (5449481) will decrease coverage by 3.85%.
The diff coverage is 43.81%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5258      +/-   ##
===========================================
- Coverage    39.98%   36.13%   -3.85%     
===========================================
  Files          381      227     -154     
  Lines        24256    19833    -4423     
  Branches       837        0     -837     
===========================================
- Hits          9699     7167    -2532     
+ Misses       13819    11970    -1849     
+ Partials       738      696      -42     
Flag Coverage Δ
bedrock-go-tests 36.13% <43.81%> (-0.11%) ⬇️
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-batcher/batcher/batch_submitter.go 0.00% <0.00%> (ø)
op-batcher/batcher/config.go 0.00% <0.00%> (ø)
op-batcher/batcher/driver.go 0.00% <0.00%> (-4.72%) ⬇️
op-proposer/proposer/config.go 0.00% <0.00%> (ø)
op-proposer/proposer/l2_output_submitter.go 2.80% <0.00%> (+0.16%) ⬆️
op-service/txmgr/mocks/TxManager.go 0.00% <0.00%> (-42.31%) ⬇️
op-service/txmgr/cli.go 36.19% <36.19%> (ø)
op-service/txmgr/txmgr.go 83.15% <80.76%> (-0.61%) ⬇️
op-batcher/flags/flags.go 100.00% <100.00%> (ø)
op-proposer/flags/flags.go 100.00% <100.00%> (ø)

... and 156 files with indirect coverage changes

@mergify
Copy link
Contributor

mergify bot commented Mar 27, 2023

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented Mar 27, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

1 similar comment
@mergify
Copy link
Contributor

mergify bot commented Mar 27, 2023

This PR is next in line to be merged, and will be merged as soon as checks pass.

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.

2 participants