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(opsim): listen for deposit transactions #61

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

jakim929
Copy link
Contributor

@jakim929 jakim929 commented Jul 25, 2024

closes #26

  • opsim on startup starts a background task to listen for L1 deposit transactions
  • simply takes a emitted deposit tx log and submits it as a Deposit transaction type on the L2
  • NOTE: test will fail this needs to wait until the new foundry nightly build gets released with the fix for block.basefee override. won't merge until Jul 26th

@jakim929
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @jakim929 and the rest of your teammates on Graphite Graphite

@jakim929 jakim929 force-pushed the 07-25-feat_opsim_listen_for_deposit_transactions branch from 66ca595 to 86046dc Compare July 25, 2024 18:23
@jakim929 jakim929 force-pushed the 07-25-feat_opsim_listen_for_deposit_transactions branch 3 times, most recently from 1d4331d to f52a51b Compare July 25, 2024 19:47
@jakim929 jakim929 marked this pull request as ready for review July 25, 2024 19:48
@jakim929 jakim929 requested a review from a team as a code owner July 25, 2024 19:48
Copy link
Contributor

coderabbitai bot commented Jul 25, 2024

Walkthrough

This update introduces enhancements across several components of the application. Key modifications include the addition of a command-line argument in the Anvil service for improved functionality, the renaming of private methods in the HD account store to enhance accessibility, and the implementation of background task management in the OpSimulator for deposit transaction processing. Additionally, the test suite sees the incorporation of a new hierarchical deterministic account management system, improving test coverage and robustness.

Changes

Files Change Summary
anvil/anvil.go Added a new command-line argument "--optimism" to the Start method of the Anvil service, expanding configuration options.
cmd/main.go Updated the constant minAnvilTimestamp to a more recent date, altering timestamp validation logic.
hdaccount/hd_account_store.go Renamed derivePrivateKeyAt and derivePublicKeyAt methods to DerivePrivateKeyAt and DerivePublicKeyAt, enhancing visibility and accessibility in the API.
opsimulator/opsimulator.go Introduced background task management to the OpSimulator struct with new fields for handling asynchronous deposit transaction processing. Updated Start and Stop methods accordingly.
supersim_test.go Added an HdAccountStore to the TestSuite and a new test function TestDepositTxSimpleEthDeposit, enhancing the testing framework with structured account management and concurrency.

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

Copy link
Contributor

@hamdiallam hamdiallam left a comment

Choose a reason for hiding this comment

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

Few comments. Great work!

opsimulator/opsimulator.go Show resolved Hide resolved
supersim_test.go Show resolved Hide resolved
@jakim929 jakim929 force-pushed the 07-25-feat_opsim_listen_for_deposit_transactions branch 3 times, most recently from 472ecd0 to 85e2168 Compare July 26, 2024 16:51
@jakim929 jakim929 force-pushed the 07-25-feat_opsim_listen_for_deposit_transactions branch from 85e2168 to 7074b1f Compare July 26, 2024 18:09
@jakim929 jakim929 merged commit 7df3085 into main Jul 26, 2024
3 checks passed
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.

op-simulator: optimism portal deposit listener
3 participants