-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed as not planned
Labels
A-devnet-sdkArea: devnet-sdkArea: devnet-sdk
Description
It would be nice if, when defining a devnet-sdk test, we could simultaneously describe:
- Constraints on the test's intended subject (i.e. this test expects to run against an Isthmus devnet with available wallets, if it is run against a Holocene devnet then it should skip)
- Clients for interacting with the intended subject
At the moment, #1 is handled by devnet-sdk validators, and #2 is handled by standardized taxonomy of devnet-sdk system objects.
This works but comes with a few drawbacks:
- When registering a validator (constraint) on a test subject, the constraint must be specified with respect to an arbitrary chain index, which must then be referenced later to unpack the values from the devnet-sdk system object.
- Validators and required clients must be handled independently, leading to redundancy in definitions.
- It's difficult to see what aspects of the system object the test interacts with at a glance. Instead you must read the entire test scenario.
As an alternative, we might consider a simple DI system that allows us to declaratively define test specs which kill two birds with one stone.
testSpec := TestSpect{
SequencerA: MustOpNode(t, WithChain(chainA), WithActiveSequencer(true)),
SequencerB: MustOpNode(t, WithChain(chainB), WithActiveSequencer(true)),
VerifierB: MustOpNode(t, WithChain(chainB), WithActiveSequencer(false)),
}This is not a burning need at the moment, but I am documenting discussions thus far in case this becomes a pain point.
Metadata
Metadata
Assignees
Labels
A-devnet-sdkArea: devnet-sdkArea: devnet-sdk