-
Notifications
You must be signed in to change notification settings - Fork 32
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
Bitcoin e2e test framework #1021
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick glance, i like where this is going. I believe this could replace the way we write E2E in general not only for the bitcoin DA.
- I would like to see this under
bin/citrea/tests
and notbin/citrea/tests/bitcoin-e2e
- Maybe add an option to use MockDA as well as Bitcoin DA (configurable).
- Port existing tests (apart from the already impemented basic ones) from sequencer / prover / full node to show case the completeness of the framework.
wait_for_*
methods are either implemented in their respective structs (Sequencer: wait_for_l2_block as an example) of in thetest_helpers
but not in both for consistency.
Great feedback @rakanalh. I'll get onto it. |
Regarding point 4, you're talking about |
Co-authored-by: Roman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must say I'm impressed. This looks very good and useful.
I have a few general questsions:
- do you run the system bitcoin? everybody might have different versions. a good idea is to bundle our stuff with some kind of docker image etc.
- Is the data dirs randomly generated? Do I get a fresh bitcoin node/sequencer/full node etc. all the time? Can we also have persisting data dirs too? Some tests in current e2e suite is about closing down and reopening the nodes.
- I noticed we spawn /target/debug/citrea instead of running the nodes as a tokio task. I aggee this waw is better. However does this mean before running these tests, do i need to build the project, or is there a way to bundle these two actions together?
I agree with @rakanalh we should port our current e2e tests here. However, we can do it in different PRs, step by step. Or we'll have to wait on the "porting" pr to get merged. This would slow down other prs.
One more feature we'd need is to be able to pass different genesises, not just bitcoin-regtest. |
1 - Good point, I'll do this. |
renaming node to bitcoinnode might be a good idea as well. I was confused for some time |
I am impressed. Good job! I would say we should merge this asap and open other followup PRs to port e2e test using this framework. It's clear that we can't predict all our needs right now, so those PRs will extend API to the desired level. |
I'll add a HOLD MERGE tag until I resolved point 1 raised above by @eyusufatik regarding bitcoin binary. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
seconded |
Should already be renamed as of now, anything you still find confusing @ercecan ? |
Nope, my bad |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool
Lots of files have been touched as a side effect but should have limited impact.
|
Co-authored-by: Roman <[email protected]>
acd6c14
to
22c79aa
Compare
Description
TestCaseConfig
, i.e.TestCaseConfig
As seen in the
prover_test.rs
fileAdds three basic tests to showcase its functionalities :
BasicSequencerTest
: Validates basic sequencer functionality.BasicProverTest
: Tests the prover flow, up to blob inscription transactions.BasicSyncTest
: Verifies synchronization between multiple Bitcoin nodes.Linked Issues