-
Notifications
You must be signed in to change notification settings - Fork 753
Description
Background
cardano-api has introduced a new era API in Cardano.Api.Experimental.Era built around Era era, IsEra era, and EraCommonConstraints. This replaces the older eon-based approach (BabbageEraOnwards, ConwayEraOnwards, babbageEraOnwardsConstraints, etc.), which is now deprecated — see cardano-api #938.
The new API is cleaner: rather than threading specific eon witnesses (ConwayEraOnwardsConway, etc.) through code and calling *EraOnwardsConstraints to bring constraints into scope, callers use Era era / IsEra era and obtainCommonConstraints.
Problem
cardano-testnet tests and infrastructure still use the old eon API extensively. For example, from the new gRPC integration tests in PR #6273:
let ceo = ConwayEraOnwardsConway
sbe = convert ceo
...
babbageEraOnwardsConstraints (convert ceo) $ do
...This should instead use Era ConwayEra / obtainCommonConstraints:
let era = ConwayEra -- Exp.Era
sbe = convert era
...
obtainCommonConstraints era $ do
...Scope
Audit all of cardano-testnet (src and tests) for usage of:
*EraOnwards*constructors and witnesses*EraOnwardsConstraintsfunctionsShelleyBasedEra*era witnesses whereEra erasuffices
And replace with the experimental era API.