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
*EraOnwardsConstraints functions
ShelleyBasedEra* era witnesses where Era era suffices
And replace with the experimental era API.
Background
cardano-apihas introduced a new era API inCardano.Api.Experimental.Erabuilt aroundEra era,IsEra era, andEraCommonConstraints. 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*EraOnwardsConstraintsto bring constraints into scope, callers useEra era/IsEra eraandobtainCommonConstraints.Problem
cardano-testnettests and infrastructure still use the old eon API extensively. For example, from the new gRPC integration tests in PR #6273:This should instead use
Era ConwayEra/obtainCommonConstraints:Scope
Audit all of
cardano-testnet(src and tests) for usage of:*EraOnwards*constructors and witnesses*EraOnwardsConstraintsfunctionsShelleyBasedEra*era witnesses whereEra erasufficesAnd replace with the experimental era API.