-
Notifications
You must be signed in to change notification settings - Fork 41
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: support l2 plus fendermint tests #1177
base: support-l2-plus
Are you sure you want to change the base?
Conversation
// Run the command and handle errors | ||
let output = cmd.output().context("failed to run forge create")?; | ||
|
||
println!("OUT: {}", String::from_utf8_lossy(&output.stdout)); |
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.
@karlem print stderr in case of failure
.first() | ||
.cloned() | ||
.unwrap_or_else(|| { | ||
panic!("No node with ethapi_http_endpoint found in the contract deployment config") |
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.
Do not panic. Return an error
0d896a7
to
ff75e79
Compare
751c615
to
a8aa488
Compare
a8aa488
to
2f44952
Compare
@@ -69,7 +69,9 @@ port = 9184 | |||
enabled = true | |||
|
|||
[tracing.file] | |||
enabled = false | |||
enabled = true |
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.
probably we can revert these changes
import {EMPTY_BYTES, METHOD_SEND} from "../../contracts/constants/Constants.sol"; | ||
|
||
/// This is a simple helper contract for Materializer to test cross messages. | ||
contract CrossMessenger { |
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.
@karlem For this contract, is it possible to shift to examples
folder? That's where we put sample/custom implementations. This contract is not really part of the protocol, it feels kind of strange to put it here though.
- name: "cross_messenger" | ||
deployer: will | ||
# TODO Karel - allow relative paths | ||
foundry_root: "/Users/karlem/work/ipc/contracts" |
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.
this will break in CI?
solidity_deployments: | ||
- name: "cross_messenger" | ||
deployer: will | ||
foundry_root: "/Users/karlem/work/ipc/contracts" |
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.
same here
@@ -142,13 +142,21 @@ impl TopDownFinalityQuery for EthSubnetManager { | |||
topic1, | |||
); | |||
|
|||
println!( |
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.
shall we remove the print?
@@ -60,6 +60,8 @@ fn main() { | |||
"LibStakingChangeLog", | |||
"LibGateway", | |||
"LibQuorum", | |||
// Materializer TODO Karel - move this elsewhere | |||
"CrossMessenger", |
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.
This should not be compile as part of the rust binding. It can be shifted to the testing crate, as part of the building script.
Or the other way is just copy the abi over, use abigen!
instead, just one contract.
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.
From the materailizer tests, I could not find L3 to L3 tests, maybe I'm missing sth. Also, to clarify, by L3 to L3 test, are we testing:
- L3s with common parent
- L3s with common "grand"parent
|
||
#[serial_test::serial] | ||
#[tokio::test] | ||
async fn test_cross_messages() { |
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.
It would be very helpful to add some simple description for what the test is about, from reading the code, it's quite difficult to infer.
println!("Historical Event: {:?}", log); | ||
} | ||
|
||
// let events = england_gateway_messenger |
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.
Are these commented code still needed?
a7c17ee
to
e514fdb
Compare
17344aa
to
28209f8
Compare
Part of #1080
End-to-End Testing with Fendermint
Changes and Improvements in Materializer for Testability
L2+ Subnet Deployment Improvements: Deploying L2+ subnets was previously hindered by insufficient wait times for the deployer's balance to be funded during the top-down finalization process. To address this, a
wait_for_balance
function has been added, which ensures the deployer has a positive balance before proceeding.Custom Contract Deployment for L2+ Testing: Testing L2+ subnets requires deploying custom contracts, such as the IPC handler actor at the destination. Additionally, only smart contracts (not EOAs) are permitted to trigger cross-network messages. To support this, Materializer now includes a
solidity_deployments
field in the subnet manifest to enable the deployment of Solidity contracts.Helper Contracts for Testing: Simple helper contracts have been added to the Materializer for testing purposes. These include contracts to trigger cross-net messages and manage IPC handlers at the destination.