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

Add SendAsync to TxMgr #11843

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Add SendAsync to TxMgr #11843

merged 2 commits into from
Sep 12, 2024

Conversation

mslipper
Copy link
Collaborator

@mslipper mslipper commented Sep 11, 2024

Adds a SendAsync method to TxMgr. I'd like to use this for op-deployer, which needs to send multiple transactions in parallel but with predictable nonces. SendAsync returns a channel that resolves with the result of each send, but synchronously increases the nonce and prepares the first send prior to returning.

@mslipper mslipper requested a review from a team as a code owner September 11, 2024 14:01
@mslipper mslipper force-pushed the feat/tmgr-async branch 2 times, most recently from a1e4dae to dafbe65 Compare September 11, 2024 14:03
@mslipper mslipper force-pushed the feat/tmgr-async branch 2 times, most recently from a29cc7e to 9a0cec7 Compare September 11, 2024 14:19
@mslipper mslipper requested review from a team as code owners September 11, 2024 14:19
@mslipper mslipper changed the title Add AsyncSend to TxMgr Add SendAsync to TxMgr Sep 11, 2024
@mslipper mslipper force-pushed the feat/tmgr-async branch 3 times, most recently from 2312f28 to 9620760 Compare September 11, 2024 17:09
op-service/txmgr/txmgr.go Show resolved Hide resolved
op-service/txmgr/txmgr.go Outdated Show resolved Hide resolved
Copy link
Contributor

semgrep-app bot commented Sep 11, 2024

Semgrep found 8 sol-style-return-arg-fmt findings:

  • packages/contracts-bedrock/src/libraries/Constants.sol
  • packages/contracts-bedrock/src/L1/SystemConfig.sol
  • packages/contracts-bedrock/src/L1/OptimismPortal2.sol
  • packages/contracts-bedrock/src/L1/OptimismPortal.sol
  • packages/contracts-bedrock/scripts/interfaces/ISystemConfigV0.sol
  • packages/contracts-bedrock/scripts/DeploySuperchain.s.sol

Named return arguments to functions must be appended with an underscore (_)

Ignore this finding from sol-style-return-arg-fmt.

Adds a SendAsync method to TxMgr. I'd like to use this for `op-deployer`, which needs to send multiple transactions in parallel but with predictable nonces. `SendAsync` returns a channel that resolves with the result of each send, but synchronously increases the nonce and prepares the first send prior to returning.
@tynes tynes added this pull request to the merge queue Sep 12, 2024
Merged via the queue into develop with commit 97aa08a Sep 12, 2024
60 checks passed
@tynes tynes deleted the feat/tmgr-async branch September 12, 2024 14:05
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