Plutonomicon / cardano-transaction-lib

A Purescript library for building smart contract transactions on Cardano
https://plutonomicon.github.io/cardano-transaction-lib/
MIT License
91 stars 52 forks source link

Add Conway and enable sanchonet #1593

Open klarkc opened 5 months ago

klarkc commented 5 months ago

Depends on mlabs-haskell/kupo-nixos#13 Depends on mlabs-haskell/ogmios-nixos#2 Depends on mlabs-haskell/cardano-serialization-lib-gc#1 Depends on CardanoSolutions/ogmios#363 Depends on CardanoSolutions/ogmios#386

Fix #1564 Closes #1543

Pre-review checklist

klntsky commented 5 months ago

Hi! Sorry for not being able to review it sooner, I'll hopefully have free time next week

klarkc commented 5 months ago

@klntsky don't worry, this is not even close of being finished. There is a lot of moving parts :rofl:

klarkc commented 4 months ago

A breaking change on Sanchonet is causing a bug in Kupo: https://github.com/CardanoSolutions/kupo/issues/164, this is blocking us from querying the blockchain utxos.

klarkc commented 4 months ago

@klntsky I could keep going with cardano-dev-wallet and a local testnet with sanchonet-demo, does CTL supports this dev-wallet?

Update: We've decided to continue fixing kupo sanchonet breaking changes.

klntsky commented 3 months ago

@klarkc no one tested cardano-dev-wallet with sancho, what are the CSL version requirements for sancho? That, and ogmios/kupo version are limiting factors

klarkc commented 3 months ago

@klntsky, I see. CSL for Sancho is being developed in Emurgo/cardano-serialization-lib#636, which is being used for this PR. At the moment, we are continuing to fix the breaking changes on Kupo with the goal of reaching the Sancho tip. Therefore, there is no need for the dev wallet now.

klarkc commented 2 months ago

Tried to evaluate a PlutusV3 transaction, but ogmios failed, log:

AlonzoTx {body = TxBodyConstr BabbageTxBodyRaw {btbrSpendInputs = fromList [TxIn (TxId {unTxId = SafeHash "9bc2008babae1a0750d926f12d53e5ee77f042853cea711dded5fc5885121e0a"}) (TxIx 4)], btbrCollateralInputs = fromList [], btbrReferenceInputs = fromList [], btbrOutputs = StrictSeq {fromStrict = fromList [Sized {sizedValue = (Addr Testnet (ScriptHashObj (ScriptHash "6ea06f17c77d52f08e208ded10b0b7cffec0185efb4220a1ac18aa3f")) (StakeRefBase (KeyHashObj (KeyHash "899caf87c60e581582a408206fe6cc58e7a779afbc516b3726a82f2e"))),MaryValue (Coin 2000000) (MultiAsset (fromList [])),DatumHash (SafeHash "923918e403bf43c34b4ef6b48eb2ee04babed17320d8d1b9ff9ad086e86f44ec"),SNothing), sizedSize = 99},Sized {sizedValue = (Addr Testnet (KeyHashObj (KeyHash "a838a4e1280f3bf8e1462f7a9d728b3e277427cd08d0512594603ccd")) (StakeRefBase (KeyHashObj (KeyHash "899caf87c60e581582a408206fe6cc58e7a779afbc516b3726a82f2e"))),MaryValue (Coin 12496750000) (MultiAsset (fromList [])),NoDatum,SNothing), sizedSize = 69}]}, btbrCollateralReturn = SNothing, btbrTotalCollateral = SNothing, btbrCerts = StrictSeq {fromStrict = fromList []}, btbrWithdrawals = Withdrawals {unWithdrawals = fromList []}, btbrTxFee = Coin 0, btbrValidityInterval = ValidityInterval {invalidBefore = SNothing, invalidHereafter = SNothing}, btbrUpdate = SNothing, btbrReqSignerHashes = fromList [], btbrMint = MultiAsset (fromList []), btbrScriptIntegrityHash = SNothing, btbrAuxDataHash = SNothing, btbrTxNetworkId = SJust Testnet} (blake2b_256: SafeHash "434096cd744da6906aa3813cf2aa3ba171bde2fd5f9d231d3a48828d07c5ee2c"), wits = AlonzoTxWitsRaw {atwrAddrTxWits = fromList [], atwrBootAddrTxWits = fromList [], atwrScriptTxWits = fromList [], atwrDatsTxWits = TxDatsConstr TxDatsRaw {unTxDatsRaw = fromList [(SafeHash "923918e403bf43c34b4ef6b48eb2ee04babed17320d8d1b9ff9ad086e86f44ec",DataConstr Constr 0 [] (blake2b_256: SafeHash "923918e403bf43c34b4ef6b48eb2ee04babed17320d8d1b9ff9ad086e86f44ec"))]} (blake2b_256: SafeHash "d89d18b7b8eb394cd1ce8ce06e930cf688c5c669a6410ec89dc01c2372043936"), atwrRdmrsTxWits = RedeemersConstr fromList [] (blake2b_256: SafeHash "45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0")} (blake2b_256: SafeHash "dbbc4ce17958e0431ba7924691ff15f5da2a3b36713e142a2f11b69915ed589b"), isValid = IsValid True, auxiliaryData = SNothing}
DecoderErrorDeserialiseFailure "witness" (DeserialiseFailure 9 "Empty list found, expected non-empty")

https://github.com/Emurgo/cardano-serialization-lib/pull/636/commits/0be14e4a71841ab9779372621a91553e729242e9 mentions an empty witness validation on serialization, I'll bump CSL to see if it will show me any additional useful info.

klarkc commented 2 months ago

Kupo sync halted, addressing in https://github.com/CardanoSolutions/kupo/pull/168

klarkc commented 2 months ago

submitTransaction is failing on AlwaysSucceedsV3 example (and a few others)

Details

message: {"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3113,"message":"The transaction failed because the provided script integrity hash doesn't match the computed one. This is crucial for ensuring the integrity of cost models and Plutus version used during script execution. The field 'data.providedScriptIntegrity' correspond to what was given, if any, and 'data.computedScriptIntegrity' is what was expected. If the latter is null, this means you shouldn't have included a script integrity hash to begin with.","data":{"providedScriptIntegrity":"15dd0a3ac1244430aacc7e95c2734b51f1a8cf2aaf05e5d6e8124cb78ab54cc9","computedScriptIntegrity":"5675d0b3607627653b48941ade5477ac756c58188547e7753be8b38243fb9fe4"}},"id":"submitTransaction-lvy8v66e"}

klarkc commented 2 months ago

Error: Could not get utxo

On TxChaining example

klarkc commented 2 months ago

Error: Script evaluation failure while trying to estimate ExUnits

On Utxos example