-
Notifications
You must be signed in to change notification settings - Fork 24
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: configurable e2e setup #87
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.
Solid work!
.produce_blocks(fuel_contract.commit_interval().into()) | ||
// given | ||
let show_logs = false; | ||
// blob support disabled because this test doesn't generate blocks with transactions in it |
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.
@@ -12,9 +12,22 @@ use crate::error::Error; | |||
fn kzg_settings() -> &'static c_kzg::KzgSettings { | |||
static KZG_SETTINGS: OnceLock<c_kzg::KzgSettings> = OnceLock::new(); | |||
KZG_SETTINGS.get_or_init(|| { | |||
// TODO: Load the trusted setup from static bytes. |
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.
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.
Beautiful work. Can't thank you enough for dropping the need for docker and docker compose to run these tests. Massive win, IMO.
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.
Awesome work!
related to: #84
closes: #86
To run e2e tests from now on you have to have
fuel-core
andfoundry
in your PATH.The e2e test rn:
How it works
Build phase
In the build phase of
e2e
we're downloading a zip offuel-bridge
and extracting theFuelChainState.sol
.We then initialize a
foundry
project, add the required deps and compile the contract.The artifacts are stored in the
target
directory. If you change the revision offuel-bridge
used or do acargo clean
this process is repeated.Usage in tests
Each service is now a structure. Running an eth node (currently
anvil
fromfoundry
) and deploying the contract looks like this:If you
drop
eth_node
the node will shut down.The remaining services are done similarly.
Contract deployment had to be done via a solidity script using
forge script
because the smart contract needs to be accessed via a proxy contract (because of how the contract is written you cannot get the role needed for committing if you deploy only the contract).Wallet keys, contract addresses and the fuel-core consensus keys are generated on each run and no longer hard coded.