Description
Overview
We have re-architected the rollup node manager to be a node addon. As such, we can now access the rollup node manager handle from the node handle. We use this to invoke methods on the rollup node manager. Currently, we are fetching the rollup manager handle explicitly and invoking commands on the handle. It would be preferable if we had a standard suite of methods that we can invoke that abstract the implementation details. Examples of the explicit / manual mechanism seen below:
rollup-node/crates/node/tests/e2e.rs
Lines 31 to 158 in b25c8de
Node Test Design
There are two approaches we can take for the node here:
- Introduce a
RollupManagerTest
trait and implement it onNodeTestContext
. - Wrap
NodeTestContext
inScrollNodeTestContext
which includes aRollupManagerTestContext
field which own a rollup node manager handle and implements useful methods for testing. For convenience, we can implementderef
onScrollNodeTestContext
to get access to methods fromNodeTestContext
for free.
I'm slightly in favor of approach 2.
Node Network Design
The setup_engine
function returns a Vec<NodeTestContext>
. We can consider introducing a wrapper around this ScrollNetworkTestContext
, which includes helper methods to invoke actions on nodes in the network and also to assert expected outcomes on the rest of the nodes.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status