Skip to content
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

Add Conway support, Replace Plutip with cardano-testnet #1624

Merged
merged 159 commits into from
Jul 30, 2024
Merged

Conversation

errfrom
Copy link
Collaborator

@errfrom errfrom commented Jun 13, 2024

Based on the work from #1593

Closes #1622
Closes #1564
Closes #1631

Dependencies

Breaking Changes

Examples (Ogmios + Kupo, SanchoNet, Eternl Beta):

  • AdditionalUtxos
  • AlwaysMints
  • AlwaysSucceeds
    • Error: (OgmiosError { code: 3113, data: (Just {"providedScriptIntegrity":"15dd0a3ac1244430aacc7e95c2734b51f1a8cf2aaf05e5d6e8124cb78ab54cc9","computedScriptIntegrity":"5675d0b3607627653b48941ade5477ac756c58188547e7753be8b38243fb9fe4"})...
    • Fixed in 41f96ec
    • The underlying issue is not fixed, IncludeDatum example fails with the same error. Although the corresponding test against local testnet cluster succeeds.
  • AlwaysSucceedsV2
  • ApplyArgs
  • ChangeGeneration1-1
  • ChangeGeneration1-3
  • ChangeGeneration3-1
  • Cip30
  • DropTokens
  • MintsMultipleTokens
  • NativeScriptMints
  • OneShotMinting
  • OneShotMintingV2
  • PaysWithDatum
  • Pkh2Pkh
  • ReferenceInputsAndScripts
    • Error: OgmiosError { code: 3113, data: (Just {"providedScriptIntegrity":"a238e08fe55c3ebb72d04c08d7622c02e07bfe93a06ae27244c27d6eb40b6025","computedScriptIntegrity":"5feb905325a9c6a378adf7c23fb11837486d550f8a2fb1a23db86ab221fa43fa"}...
  • ECDSA
  • IncludeDatum
    • Error: OgmiosError { code: 3113, data: (Just {"providedScriptIntegrity":"0916f53e560760d110c0cfdd9626361129d9144cb0c1828525ce2698978ee969","computedScriptIntegrity":"ad869d3e9a101d1e9f3cfd146904aae1855beb3ffe323870eea9b0e5ae652707"}...
  • Schnorr
  • SendsToken
  • SignData
  • SignMultiple
  • TxChaining
  • Utxos
    • Error: Script evaluation failure while trying to estimate ExUnits. ... ValidatorFailed { error: "An error has occurred: User error:\nThe machine terminated because of an error, either from a built-in function or from an explicit use of 'error'.", traces: ["Utxo not consumed"] }
  • Wallet

Pre-review checklist

  • All code has been formatted using our config (make format)
  • Any new API features or modification of existing behavior are covered with tests
  • The template (templates/ctl-scaffold) has been updated
  • The changelog has been updated under the ## Unreleased header, using the appropriate sub-headings (### Added, ### Changed, ### Removed, ### Fixed), and the links to the appropriate issues/PRs have been included

@errfrom errfrom changed the title Add Conway support, Replace Plutip with cardano-testnet [WIP - do not use] Add Conway support, Replace Plutip with cardano-testnet Jul 25, 2024
@errfrom errfrom marked this pull request as ready for review July 25, 2024 16:58
Comment on lines +10 to +11
The use of [Plutip](https://github.com/mlabs-haskell/plutip) in CTL is
deprecated. For information on how to test with the Cardano Testnet, please
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The use of [Plutip](https://github.com/mlabs-haskell/plutip) in CTL is
deprecated. For information on how to test with the Cardano Testnet, please
The use of [Plutip](https://github.com/mlabs-haskell/plutip) in CTL for testing is
discontinued in favor of `cardano-testnet` integration. For information on how to test with the Cardano Testnet, please

@@ -9,6 +9,7 @@

inputs = {
nixpkgs.follows = "haskell-nix/nixpkgs-unstable";
nixpkgs-arion.url = "github:NixOS/nixpkgs";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

chromium
python38 # To serve bundled CTL
python39 # To serve bundled CTL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just python or python3?

<<< Array.fromFoldable
<<< Map.values

-- FIXME: adjust values
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjust for what?

Just (PaymentCredential (PubKeyHashCredential pkh)) ->
case mSkh of
Nothing ->
Constraints.mustPayToPubKey $ wrap pkh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are now deprecated with a type-level warning. Please use the underlying data constructors so that the warning is not propagated to the call site

withStakeKey :: PrivateStakeKey -> InitialUTxOs -> InitialUTxOsWithStakeKey
withStakeKey = InitialUTxOsWithStakeKey

privateStakeKeyForDist :: PrivateStakeKey
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

CTL depends on a number of binaries in the `$PATH` to execute tests on the
Cardano Testnet:

- [`cardano-node`](https://github.com/IntersectMBO/cardano-node) to connect to the Cardano Testnet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [`cardano-node`](https://github.com/IntersectMBO/cardano-node) to connect to the Cardano Testnet
- [`cardano-node`](https://github.com/IntersectMBO/cardano-node) to connect to the Cardano Testnet
- `cardano-testnet`
- `cardano-cli`

If you have based your project on the [`ctl-scaffold`
template](../templates/ctl-scaffold) then you have two options to run tests on
the Cardano Testnet:
1. `nix develop` followed by `npm run test` (recommended for development)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. `nix develop` followed by `npm run test` (recommended for development)
1. `nix develop` followed by `npm run testnet-test` (recommended for development)

2. `nix run .#checks.x86_64-linux.ctl-scaffold-local-testnet-test`
* where you'd usually replace `x86_64-linux` with the system you run tests on
* and `ctl-scaffold-local-testnet-test` with the name of the test derivation for your project;
* note that building of your project via Nix will fail in case there are any PureScript compile-time warnings.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* note that building of your project via Nix will fail in case there are any PureScript compile-time warnings.

It will be obvious anyway if there are errors. No need to overload users with info before it's needed

@@ -832,6 +832,9 @@ absTimeFromRelTime (EraSummary { start, end }) (RelTime relTime) = do

wrap <$> (liftM CannotGetBigIntFromNumber $ BigInt.fromNumber absTime)

slotLengthFactor :: Number
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this value affected by protocol parameters?

- remove excessive logging in cardano-testnet
- apply more relaxed process.setMaxListeners limits
@klntsky klntsky merged commit bcbfb9b into develop Jul 30, 2024
3 checks passed
@klntsky klntsky deleted the dshuiski/conway branch July 30, 2024 18:48
@errfrom errfrom mentioned this pull request Sep 9, 2024
35 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants