From 89d1cf876fc8383807a4e6d2e9c32e1d08f0edc6 Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Fri, 5 Sep 2025 16:01:00 -0300 Subject: [PATCH 01/11] fix(compiler): include tip_slot in Compiler configuration --- alonzo.json | 196 ++++++++++++++++++++++ byron.json | 91 ++++++++++ conway.json | 297 +++++++++++++++++++++++++++++++++ crates/trp/src/compiler.rs | 1 + dolos.toml | 60 +++++++ dolos2.toml | 44 +++++ githoney_test.diff | 334 +++++++++++++++++++++++++++++++++++++ shelley.json | 68 ++++++++ 8 files changed, 1091 insertions(+) create mode 100644 alonzo.json create mode 100644 byron.json create mode 100644 conway.json create mode 100644 dolos.toml create mode 100644 dolos2.toml create mode 100644 githoney_test.diff create mode 100644 shelley.json diff --git a/alonzo.json b/alonzo.json new file mode 100644 index 00000000..3621f2d6 --- /dev/null +++ b/alonzo.json @@ -0,0 +1,196 @@ +{ + "lovelacePerUTxOWord": 34482, + "executionPrices": { + "prSteps": + { + "numerator" : 721, + "denominator" : 10000000 + }, + "prMem": + { + "numerator" : 577, + "denominator" : 10000 + } + }, + "maxTxExUnits": { + "exUnitsMem": 10000000, + "exUnitsSteps": 10000000000 + }, + "maxBlockExUnits": { + "exUnitsMem": 50000000, + "exUnitsSteps": 40000000000 + }, + "maxValueSize": 5000, + "collateralPercentage": 150, + "maxCollateralInputs": 3, + "costModels": { + "PlutusV1": { + "sha2_256-memory-arguments": 4, + "equalsString-cpu-arguments-constant": 1000, + "cekDelayCost-exBudgetMemory": 100, + "lessThanEqualsByteString-cpu-arguments-intercept": 103599, + "divideInteger-memory-arguments-minimum": 1, + "appendByteString-cpu-arguments-slope": 621, + "blake2b-cpu-arguments-slope": 29175, + "iData-cpu-arguments": 150000, + "encodeUtf8-cpu-arguments-slope": 1000, + "unBData-cpu-arguments": 150000, + "multiplyInteger-cpu-arguments-intercept": 61516, + "cekConstCost-exBudgetMemory": 100, + "nullList-cpu-arguments": 150000, + "equalsString-cpu-arguments-intercept": 150000, + "trace-cpu-arguments": 150000, + "mkNilData-memory-arguments": 32, + "lengthOfByteString-cpu-arguments": 150000, + "cekBuiltinCost-exBudgetCPU": 29773, + "bData-cpu-arguments": 150000, + "subtractInteger-cpu-arguments-slope": 0, + "unIData-cpu-arguments": 150000, + "consByteString-memory-arguments-intercept": 0, + "divideInteger-memory-arguments-slope": 1, + "divideInteger-cpu-arguments-model-arguments-slope": 118, + "listData-cpu-arguments": 150000, + "headList-cpu-arguments": 150000, + "chooseData-memory-arguments": 32, + "equalsInteger-cpu-arguments-intercept": 136542, + "sha3_256-cpu-arguments-slope": 82363, + "sliceByteString-cpu-arguments-slope": 5000, + "unMapData-cpu-arguments": 150000, + "lessThanInteger-cpu-arguments-intercept": 179690, + "mkCons-cpu-arguments": 150000, + "appendString-memory-arguments-intercept": 0, + "modInteger-cpu-arguments-model-arguments-slope": 118, + "ifThenElse-cpu-arguments": 1, + "mkNilPairData-cpu-arguments": 150000, + "lessThanEqualsInteger-cpu-arguments-intercept": 145276, + "addInteger-memory-arguments-slope": 1, + "chooseList-memory-arguments": 32, + "constrData-memory-arguments": 32, + "decodeUtf8-cpu-arguments-intercept": 150000, + "equalsData-memory-arguments": 1, + "subtractInteger-memory-arguments-slope": 1, + "appendByteString-memory-arguments-intercept": 0, + "lengthOfByteString-memory-arguments": 4, + "headList-memory-arguments": 32, + "listData-memory-arguments": 32, + "consByteString-cpu-arguments-intercept": 150000, + "unIData-memory-arguments": 32, + "remainderInteger-memory-arguments-minimum": 1, + "bData-memory-arguments": 32, + "lessThanByteString-cpu-arguments-slope": 248, + "encodeUtf8-memory-arguments-intercept": 0, + "cekStartupCost-exBudgetCPU": 100, + "multiplyInteger-memory-arguments-intercept": 0, + "unListData-memory-arguments": 32, + "remainderInteger-cpu-arguments-model-arguments-slope": 118, + "cekVarCost-exBudgetCPU": 29773, + "remainderInteger-memory-arguments-slope": 1, + "cekForceCost-exBudgetCPU": 29773, + "sha2_256-cpu-arguments-slope": 29175, + "equalsInteger-memory-arguments": 1, + "indexByteString-memory-arguments": 1, + "addInteger-memory-arguments-intercept": 1, + "chooseUnit-cpu-arguments": 150000, + "sndPair-cpu-arguments": 150000, + "cekLamCost-exBudgetCPU": 29773, + "fstPair-cpu-arguments": 150000, + "quotientInteger-memory-arguments-minimum": 1, + "decodeUtf8-cpu-arguments-slope": 1000, + "lessThanInteger-memory-arguments": 1, + "lessThanEqualsInteger-cpu-arguments-slope": 1366, + "fstPair-memory-arguments": 32, + "modInteger-memory-arguments-intercept": 0, + "unConstrData-cpu-arguments": 150000, + "lessThanEqualsInteger-memory-arguments": 1, + "chooseUnit-memory-arguments": 32, + "sndPair-memory-arguments": 32, + "addInteger-cpu-arguments-intercept": 197209, + "decodeUtf8-memory-arguments-slope": 8, + "equalsData-cpu-arguments-intercept": 150000, + "mapData-cpu-arguments": 150000, + "mkPairData-cpu-arguments": 150000, + "quotientInteger-cpu-arguments-constant": 148000, + "consByteString-memory-arguments-slope": 1, + "cekVarCost-exBudgetMemory": 100, + "indexByteString-cpu-arguments": 150000, + "unListData-cpu-arguments": 150000, + "equalsInteger-cpu-arguments-slope": 1326, + "cekStartupCost-exBudgetMemory": 100, + "subtractInteger-cpu-arguments-intercept": 197209, + "divideInteger-cpu-arguments-model-arguments-intercept": 425507, + "divideInteger-memory-arguments-intercept": 0, + "cekForceCost-exBudgetMemory": 100, + "blake2b-cpu-arguments-intercept": 2477736, + "remainderInteger-cpu-arguments-constant": 148000, + "tailList-cpu-arguments": 150000, + "encodeUtf8-cpu-arguments-intercept": 150000, + "equalsString-cpu-arguments-slope": 1000, + "lessThanByteString-memory-arguments": 1, + "multiplyInteger-cpu-arguments-slope": 11218, + "appendByteString-cpu-arguments-intercept": 396231, + "lessThanEqualsByteString-cpu-arguments-slope": 248, + "modInteger-memory-arguments-slope": 1, + "addInteger-cpu-arguments-slope": 0, + "equalsData-cpu-arguments-slope": 10000, + "decodeUtf8-memory-arguments-intercept": 0, + "chooseList-cpu-arguments": 150000, + "constrData-cpu-arguments": 150000, + "equalsByteString-memory-arguments": 1, + "cekApplyCost-exBudgetCPU": 29773, + "quotientInteger-memory-arguments-slope": 1, + "verifySignature-cpu-arguments-intercept": 3345831, + "unMapData-memory-arguments": 32, + "mkCons-memory-arguments": 32, + "sliceByteString-memory-arguments-slope": 1, + "sha3_256-memory-arguments": 4, + "ifThenElse-memory-arguments": 1, + "mkNilPairData-memory-arguments": 32, + "equalsByteString-cpu-arguments-slope": 247, + "appendString-cpu-arguments-intercept": 150000, + "quotientInteger-cpu-arguments-model-arguments-slope": 118, + "cekApplyCost-exBudgetMemory": 100, + "equalsString-memory-arguments": 1, + "multiplyInteger-memory-arguments-slope": 1, + "cekBuiltinCost-exBudgetMemory": 100, + "remainderInteger-memory-arguments-intercept": 0, + "sha2_256-cpu-arguments-intercept": 2477736, + "remainderInteger-cpu-arguments-model-arguments-intercept": 425507, + "lessThanEqualsByteString-memory-arguments": 1, + "tailList-memory-arguments": 32, + "mkNilData-cpu-arguments": 150000, + "chooseData-cpu-arguments": 150000, + "unBData-memory-arguments": 32, + "blake2b-memory-arguments": 4, + "iData-memory-arguments": 32, + "nullList-memory-arguments": 32, + "cekDelayCost-exBudgetCPU": 29773, + "subtractInteger-memory-arguments-intercept": 1, + "lessThanByteString-cpu-arguments-intercept": 103599, + "consByteString-cpu-arguments-slope": 1000, + "appendByteString-memory-arguments-slope": 1, + "trace-memory-arguments": 32, + "divideInteger-cpu-arguments-constant": 148000, + "cekConstCost-exBudgetCPU": 29773, + "encodeUtf8-memory-arguments-slope": 8, + "quotientInteger-cpu-arguments-model-arguments-intercept": 425507, + "mapData-memory-arguments": 32, + "appendString-cpu-arguments-slope": 1000, + "modInteger-cpu-arguments-constant": 148000, + "verifySignature-cpu-arguments-slope": 1, + "unConstrData-memory-arguments": 32, + "quotientInteger-memory-arguments-intercept": 0, + "equalsByteString-cpu-arguments-constant": 150000, + "sliceByteString-memory-arguments-intercept": 0, + "mkPairData-memory-arguments": 32, + "equalsByteString-cpu-arguments-intercept": 112536, + "appendString-memory-arguments-slope": 1, + "lessThanInteger-cpu-arguments-slope": 497, + "modInteger-cpu-arguments-model-arguments-intercept": 425507, + "modInteger-memory-arguments-minimum": 1, + "sha3_256-cpu-arguments-intercept": 0, + "verifySignature-memory-arguments": 1, + "cekLamCost-exBudgetMemory": 100, + "sliceByteString-cpu-arguments-intercept": 150000 + } + } +} \ No newline at end of file diff --git a/byron.json b/byron.json new file mode 100644 index 00000000..62363764 --- /dev/null +++ b/byron.json @@ -0,0 +1,91 @@ +{ + "bootStakeholders": { + "021e737009040bf7f1e7b1bcc148f29d748d4a6b561902c95e4a9f36": 1, + "0bc82ced9544980b9ffe7f64b1538bbda6804a5cc32c8035485e184b": 1, + "18ed9844deef98cf9ba8b39791dede0538d2d2fa79bf67ef37dcc826": 1, + "66cfa84ad0ee5ca8586244c8393007cf3d9622d77cfa03fd4f35065b": 1, + "76c4d6c68c0ef81ae364411a84e52ce66089ed006ca29adfc0227901": 1, + "8cc6b89fec65cc83d34b7bab2e6494db631d8476a86625767dd0c2a0": 1, + "e90060fdc085ac9f63cdb3b32ba1d84e0f7eb98561687b213b4c8770": 1 + }, + "heavyDelegation": { + "021e737009040bf7f1e7b1bcc148f29d748d4a6b561902c95e4a9f36": { + "omega": 0, + "issuerPk": "6hSFCotivD08t02n43RMiaF9LzwtYVrFMu/WX6ShfEsxfdXFL5Y6c+DwHSZOCywU0RJz5er2icIO03UytC9NTg==", + "delegatePk": "JEnSVQTPGriTx1+lAMkKhCNsMBDNPGw+NiEvNPh4ui6IdvxrO+WkQPTy5U865XB4VFvi/zb7d+H1bilnztQNBg==", + "cert": "558952d17442e8cc73f0c7dd606e329b38ed2ec0c1f83fe2567d28b21ef2223d2d23640cd0531f75832b50e519631c48643fcfaa7168851645dce07b90d87f0e" + }, + "0bc82ced9544980b9ffe7f64b1538bbda6804a5cc32c8035485e184b": { + "omega": 0, + "issuerPk": "MJ7IskKU8GKk0Eeg3zhfSOK1DDVXOMHD2V/zhEpODUtL9YB0Y7sXnbZfg3+Df05hskP5Jz+dZvdC6DH/dP9jmQ==", + "delegatePk": "hwO7NJL7LfAk5e/QG61FKcdORoK60tvprE3063Muh4EQKrWA6l7t23B2GziK8D0hRO0j5W1Gzpn8WW69XLIlKA==", + "cert": "2bccf50d0c3cbb03dd29cfba817e8ba615db3d7722b41b264ad08722e548cfe83d069b29d13e490823d7519ecdd9940ea49573f6027056c4bd58da1adf75020e" + }, + "18ed9844deef98cf9ba8b39791dede0538d2d2fa79bf67ef37dcc826": { + "omega": 0, + "issuerPk": "pXbW4Jak8maeuWiosvrurykKnqDSHswUjroonSDS3fTnWS+BKe+vjT4zZJNKhQ33KbagiHVJ5CJUNggfsCtG2g==", + "delegatePk": "rbJAZp3kWCUvp8dnLR6qsgpGU+qKAFow4NHYKWiKCkfm1qFCFONob50N1IbNWCGWAhg38ZPTvBazTasjsfj6yQ==", + "cert": "89e1638e31fd3d402cecb897ba773d8c2c11c2d3cff2462b266e21461539b1a4fe8fb528e159b9af473799b51e49aa5b5816a88f10c484aa7cef7ad12850830a" + }, + "66cfa84ad0ee5ca8586244c8393007cf3d9622d77cfa03fd4f35065b": { + "omega": 0, + "issuerPk": "/LGZjmmcAMRisP7Rf454GM2QUKgj2aAyqE+iQo2PIEhcistFOlT+idtbLTceZAnQcwwPJDtTcNi+EnPQyscZOg==", + "delegatePk": "rinFUiKKCPPFY0ULEKn1SPRgLVmOS3jdTXDtrxK6VI1I11G3uBS1Olxi0mQSN3kf+B3hm/xHkuUDVNaSXNiBeQ==", + "cert": "3e7f30bb68c5bc4d23c2a730ac154a188a1fd45aac3f438efd380303171443d2ca4f50e5a1ff66b40ae3da64697f2599956ae06c21b73fa828b8c0dc9fb27302" + }, + "76c4d6c68c0ef81ae364411a84e52ce66089ed006ca29adfc0227901": { + "omega": 0, + "issuerPk": "9EE85tTLdSSR4T1Xoy6n9wr6jlbavCdfp9oQKusskO3DSSyNqRYS7QzYQ96j/WnphUey63082YkKijMfF9A4eA==", + "delegatePk": "dvyHDkXg8LFtb0K6Sitl8OGSEZPvfCVQYLDR6Au6t6/ROvlerMKQ8uri4fG7hQQzbHKtdKWgv94t+zuFJTQ1fw==", + "cert": "5ec0ed46ae7e575bdb089f1bceca3b2689b13a7162fe08578fe60ba64607fffaa507412a97652c3c81cc0ef93ff404cf809a628ae19faba1a035fca0505c1d04" + }, + "8cc6b89fec65cc83d34b7bab2e6494db631d8476a86625767dd0c2a0": { + "omega": 0, + "issuerPk": "Hr5S5PAxf9HSB4FzmtZzaFcXrNrctrI5XUrDrnCkOUTX6rhbtOMkXU3sWVDOvU6LNSSr3/Ws2+iCYZIr7LmTWg==", + "delegatePk": "FaLH2b5H/XS31YRnm98N6fP4Etx6m+GbniVAXMwOp8KhYXPKBJBsX/EjIy3pSkvRBhGCjsycB0yrDxWMi5ZsIQ==", + "cert": "10f06304cceb42071605ebba67b308c7568e5e6fe0d773c58f7e8c13bc8d8a340f70a4fd5e1b4a1c1db1de5c7646802bbc929d6c82d7adb8a77cb6ad77eac50a" + }, + "e90060fdc085ac9f63cdb3b32ba1d84e0f7eb98561687b213b4c8770": { + "omega": 0, + "issuerPk": "B2R+VXzy3c8bxncdOpQ2Z/tblxRNQO8AXQ0OsJDQvZYnLeGQcLD78kyYLpi3nfuS4SfnLar23NV4yiEVwaw+Yw==", + "delegatePk": "nACHGIBacymrKwn07iW/a5ZKJCPZ2cKQqeXw3ivR7WOYVUuufWhZlCoUTZ7rtBqoDaexblUQwkC7hA7AmNA3FA==", + "cert": "b5440daa05f7fae557df46e4f1b7c5802b86f465daad1137e315abf6e72f1c877207276abb8dcba86e18e42d39b34c2f0fa82ba2919944cdc8e2e5264baa450b" + } + }, + "startTime": 1666656000, + "nonAvvmBalances": { + "FHnt4NL7yPXjpZtYj1YUiX9QYYUZGXDT9gA2PJXQFkTSMx3EgawXK5BUrCHdhe2": "0", + "FHnt4NL7yPXk7D87qAWEmfnL7wSQ9AzBU2mjZt3eM48NSCbygxgzAU6vCGiRZEW": "0", + "FHnt4NL7yPXpazQsTdJ3Gp1twQUo4N5rrgGbRNSzchjchPiApc1k4CvqDMcdd7H": "0", + "FHnt4NL7yPXtNo1wLCLZyGTMfAvB14h8onafiYkM7B69ZwvGgXeUyQWfi7FPrif": "0", + "FHnt4NL7yPXtmi4mAjD43V3NB3shDs1gCuHNcMLPsRWjaw1b2yRV2xad8S8V6aq": "0", + "FHnt4NL7yPXvDWHa8bVs73UEUdJd64VxWXSFNqetECtYfTd9TtJguJ14Lu3feth": "30000000000000000", + "FHnt4NL7yPXvNSRpCYydjRr7koQCrsTtkovk5uYMimgqMJX2DyrEEBqiXaTd8rG": "0", + "FHnt4NL7yPY9rTvdsCeyRnsbzp4bN7XdmAZeU5PzA1qR2asYmN6CsdxJw4YoDjG": "0" + }, + "blockVersionData": { + "scriptVersion": 0, + "slotDuration": "20000", + "maxBlockSize": "2000000", + "maxHeaderSize": "2000000", + "maxTxSize": "4096", + "maxProposalSize": "700", + "mpcThd": "20000000000000", + "heavyDelThd": "300000000000", + "updateVoteThd": "1000000000000", + "updateProposalThd": "100000000000000", + "updateImplicit": "10000", + "softforkRule": { + "initThd": "900000000000000", + "minThd": "600000000000000", + "thdDecrement": "50000000000000" + }, + "txFeePolicy": { + "summand": "155381000000000", + "multiplier": "43946000000" + }, + "unlockStakeEpoch": "18446744073709551615" + }, + "protocolConsts": { "k": 432, "protocolMagic": 2 }, + "avvmDistr": {} +} diff --git a/conway.json b/conway.json new file mode 100644 index 00000000..cad84abd --- /dev/null +++ b/conway.json @@ -0,0 +1,297 @@ +{ + "poolVotingThresholds": { + "committeeNormal": 0.51, + "committeeNoConfidence": 0.51, + "hardForkInitiation": 0.51, + "motionNoConfidence": 0.51, + "ppSecurityGroup": 0.51 + }, + "dRepVotingThresholds": { + "motionNoConfidence": 0.67, + "committeeNormal": 0.67, + "committeeNoConfidence": 0.6, + "updateToConstitution": 0.75, + "hardForkInitiation": 0.6, + "ppNetworkGroup": 0.67, + "ppEconomicGroup": 0.67, + "ppTechnicalGroup": 0.67, + "ppGovGroup": 0.75, + "treasuryWithdrawal": 0.67 + }, + "committeeMinSize": 0, + "committeeMaxTermLength": 365, + "govActionLifetime": 30, + "govActionDeposit": 100000000000, + "dRepDeposit": 500000000, + "dRepActivity": 20, + "minFeeRefScriptCostPerByte": 15, + "plutusV3CostModel": [ + 100788, + 420, + 1, + 1, + 1000, + 173, + 0, + 1, + 1000, + 59957, + 4, + 1, + 11183, + 32, + 201305, + 8356, + 4, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 100, + 100, + 16000, + 100, + 94375, + 32, + 132994, + 32, + 61462, + 4, + 72010, + 178, + 0, + 1, + 22151, + 32, + 91189, + 769, + 4, + 2, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 1000, + 42921, + 4, + 2, + 24548, + 29498, + 38, + 1, + 898148, + 27279, + 1, + 51775, + 558, + 1, + 39184, + 1000, + 60594, + 1, + 141895, + 32, + 83150, + 32, + 15299, + 32, + 76049, + 1, + 13169, + 4, + 22100, + 10, + 28999, + 74, + 1, + 28999, + 74, + 1, + 43285, + 552, + 1, + 44749, + 541, + 1, + 33852, + 32, + 68246, + 32, + 72362, + 32, + 7243, + 32, + 7391, + 32, + 11546, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 90434, + 519, + 0, + 1, + 74433, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 955506, + 213312, + 0, + 2, + 270652, + 22588, + 4, + 1457325, + 64566, + 4, + 20467, + 1, + 4, + 0, + 141992, + 32, + 100788, + 420, + 1, + 1, + 81663, + 32, + 59498, + 32, + 20142, + 32, + 24588, + 32, + 20744, + 32, + 25933, + 32, + 24623, + 32, + 43053543, + 10, + 53384111, + 14333, + 10, + 43574283, + 26308, + 10, + 16000, + 100, + 16000, + 100, + 962335, + 18, + 2780678, + 6, + 442008, + 1, + 52538055, + 3756, + 18, + 267929, + 18, + 76433006, + 8868, + 18, + 52948122, + 18, + 1995836, + 36, + 3227919, + 12, + 901022, + 1, + 166917843, + 4307, + 36, + 284546, + 36, + 158221314, + 26549, + 36, + 74698472, + 36, + 333849714, + 1, + 254006273, + 72, + 2174038, + 72, + 2261318, + 64571, + 4, + 207616, + 8310, + 4, + 1293828, + 28716, + 63, + 0, + 1, + 1006041, + 43623, + 251, + 0, + 1 + ], + "constitution": { + "anchor": { + "dataHash": "ca41a91f399259bcefe57f9858e91f6d00e1a38d6d9c63d4052914ea7bd70cb2", + "url": "ipfs://bafkreifnwj6zpu3ixa4siz2lndqybyc5wnnt3jkwyutci4e2tmbnj3xrdm" + }, + "script": "fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64" + }, + "committee": { + "members": { + "scriptHash-ff9babf23fef3f54ec29132c07a8e23807d7b395b143ecd8ff79f4c7": 1000 + }, + "threshold": { + "numerator": 2, + "denominator": 3 + } + } +} \ No newline at end of file diff --git a/crates/trp/src/compiler.rs b/crates/trp/src/compiler.rs index 129addc7..6a5c2d32 100644 --- a/crates/trp/src/compiler.rs +++ b/crates/trp/src/compiler.rs @@ -70,6 +70,7 @@ pub fn load_compiler( pparams, tx3_cardano::Config { extra_fees: config.extra_fees, + tip_slot: tip_slot.as_ref().map(|p| p.slot()), }, ); diff --git a/dolos.toml b/dolos.toml new file mode 100644 index 00000000..d871f098 --- /dev/null +++ b/dolos.toml @@ -0,0 +1,60 @@ +[upstream] +peer_address = "preview-node.world.dev.cardano.org:30002" +network_magic = 2 +is_testnet = true + +[storage] +version = "v1" +path = "data" +max_wal_history = 25920 +max_chain_history = 86400 + +[genesis] +byron_path = "byron.json" +shelley_path = "shelley.json" +alonzo_path = "alonzo.json" +conway_path = "conway.json" +force_protocol = 6 + +[sync] +pull_batch_size = 100 +sync_limit = "NoLimit" + +[submit] + +[serve.grpc] +listen_address = "[::]:50051" +permissive_cors = true + +[serve.minibf] +listen_address = "[::]:3000" +permissive_cors = true + +[serve.trp] +listen_address = "[::]:8164" +max_optimize_rounds = 10 +permissive_cors = true + +[mithril] +aggregator = "https://aggregator.pre-release-preview.api.mithril.network/aggregator" +genesis_key = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d" +ancillary_key = "5b3138392c3139322c3231362c3135302c3131342c3231362c3233372c3231302c34352c31382c32312c3139362c3230382c3234362c3134362c322c3235322c3234332c3235312c3139372c32382c3135372c3230342c3134352c33302c31342c3232382c3136382c3132392c38332c3133362c33365d" + +[chain] +type = "cardano" + +[chain.track] +account_state = true +asset_state = true +pool_state = true +epoch_state = true +drep_state = true +tx_logs = true + +[logging] +max_level = "INFO" +include_tokio = false +include_pallas = false +include_grpc = false +include_trp = false +include_minibf = false diff --git a/dolos2.toml b/dolos2.toml new file mode 100644 index 00000000..4ca3839e --- /dev/null +++ b/dolos2.toml @@ -0,0 +1,44 @@ +[upstream] +peer_address = "preprod-node.world.dev.cardano.org:30000" +network_magic = 1 +is_testnet = true + +[storage] +version = "v1" +path = "data" +max_wal_history = 129600 +max_chain_history = 86400 + +[genesis] +byron_path = "byron.json" +shelley_path = "shelley.json" +alonzo_path = "alonzo.json" +conway_path = "conway.json" + +[sync] +pull_batch_size = 100 +sync_limit = "NoLimit" + +[submit] + +[serve.grpc] +listen_address = "[::]:50051" +permissive_cors = true + +[serve.trp] +listen_address = "[::]:8164" +max_optimize_rounds = 100 +permissive_cors = true + +[mithril] +aggregator = "https://aggregator.release-preprod.api.mithril.network/aggregator" +genesis_key = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d" +ancillary_key = "5b3138392c3139322c3231362c3135302c3131342c3231362c3233372c3231302c34352c31382c32312c3139362c3230382c3234362c3134362c322c3235322c3234332c3235312c3139372c32382c3135372c3230342c3134352c33302c31342c3232382c3136382c3132392c38332c3133362c33365d" + +[logging] +max_level = "INFO" +include_tokio = false +include_pallas = false +include_grpc = false +include_trp = false +include_minibf = false diff --git a/githoney_test.diff b/githoney_test.diff new file mode 100644 index 00000000..1e345eed --- /dev/null +++ b/githoney_test.diff @@ -0,0 +1,334 @@ +diff --git a/Cargo.lock b/Cargo.lock +index b650199..41b9f39 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -5060,8 +5060,6 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] + name = "tx3-cardano" + version = "0.11.4" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "ca5f14e3e1b68b1bff81d58c891604a3087f34be70c2a2ad58a8605b6f15ed82" + dependencies = [ + "hex", + "pallas 1.0.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -5075,8 +5073,6 @@ dependencies = [ + [[package]] + name = "tx3-lang" + version = "0.11.4" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "7607218726810f53079b50a63ff4b5e25a8ccf53a82a80d7b6cc1815feec7a65" + dependencies = [ + "bincode 2.0.1", + "hex", +@@ -5091,8 +5087,6 @@ dependencies = [ + [[package]] + name = "tx3-resolver" + version = "0.11.4" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "654a0598f575d665145dc711443082683d66a0fc8a4673e68dbc1f314d87d028" + dependencies = [ + "hex", + "thiserror 2.0.12", +@@ -5103,8 +5097,6 @@ dependencies = [ + [[package]] + name = "tx3-sdk" + version = "0.8.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "8e249299616f099372b45ff1605900671697547bd6691ca154f0aa36dc665cbc" + dependencies = [ + "base64 0.22.1", + "bech32 0.11.0", +diff --git a/crates/trp/Cargo.toml b/crates/trp/Cargo.toml +index bf5b468..98b0ff5 100644 +--- a/crates/trp/Cargo.toml ++++ b/crates/trp/Cargo.toml +@@ -24,20 +24,27 @@ jsonrpsee = { version = "0.24.9", features = ["server"] } + opentelemetry = "0.30.0" + opentelemetry_sdk = "0.30.0" + +-tx3-lang = "0.11.4" +-tx3-cardano = "0.11.4" +-tx3-resolver = "0.11.4" ++# tx3-lang = "0.11.4" ++# tx3-cardano = "0.11.4" ++# tx3-resolver = "0.11.4" + + # tx3-lang = { path = "../../../../tx3-lang/tx3/crates/tx3-lang" } + # tx3-cardano = { path = "../../../../tx3-lang/tx3/crates/tx3-cardano" } + # tx3-resolver = { path = "../../../../tx3-lang/tx3/crates/tx3-resolver" } + ++tx3-lang = { path = "/home/sbobbiesi/Documents/TX3/tx3/crates/tx3-lang" } ++tx3-cardano = { path = "/home/sbobbiesi/Documents/TX3/tx3/crates/tx3-cardano" } ++tx3-resolver = { path = "/home/sbobbiesi/Documents/TX3/tx3/crates/tx3-resolver" } ++ + # tx3-lang = { git = "https://github.com/tx3-lang/tx3.git" } + # tx3-cardano = { git = "https://github.com/tx3-lang/tx3.git" } + # tx3-resolver = { git = "https://github.com/tx3-lang/tx3.git" } ++# tx3-sdk = { version = "^0" } + +-tx3-sdk = { version = "^0" } + # tx3-sdk = { path = "../../../../tx3-lang/rust-sdk/sdk" } ++# tx3-sdk = { version = "0.4.0" } ++ ++tx3-sdk = { path = "/home/sbobbiesi/Documents/TX3/rust-sdk/sdk" } + # tx3-sdk = { git = "https://github.com/tx3-lang/rust-sdk.git" } + + [dev-dependencies] +diff --git a/crates/trp/src/mapping.rs b/crates/trp/src/mapping.rs +index 7ca35ef..32e4b69 100644 +--- a/crates/trp/src/mapping.rs ++++ b/crates/trp/src/mapping.rs +@@ -77,9 +77,9 @@ fn map_array(x: &[PlutusData]) -> Expression { + } + + fn map_map(x: &KeyValuePairs) -> Expression { +- Expression::List( ++ Expression::Map( + x.iter() +- .map(|(k, v)| Expression::List(vec![map_datum(k), map_datum(v)])) ++ .map(|(k, v)| (map_datum(k), map_datum(v))) + .collect(), + ) + } +diff --git a/crates/trp/src/methods.rs b/crates/trp/src/methods.rs +index 23ed6f3..9fe771d 100644 +--- a/crates/trp/src/methods.rs ++++ b/crates/trp/src/methods.rs +@@ -193,7 +193,7 @@ mod tests { + const SUBJECT_PROTOCOL: &str = r#" + party Sender; + party Receiver; +- ++ + tx swap(quantity: Int) { + input source { + from: Sender, +@@ -286,4 +286,228 @@ mod tests { + + assert_eq!(err.code(), ErrorCode::InvalidParams.code()); + } ++ ++ fn setup_gh_test_context() -> Arc> { ++ let delta = dolos_testing::make_custom_utxo_delta( ++ 1, ++ dolos_testing::TestAddress::everyone(), ++ 2..4, ++ |x: &dolos_testing::TestAddress| { ++ dolos_testing::utxo_with_random_amount(x, 4_000_000..5_000_000) ++ }, ++ ); ++ ++ let domain = ToyDomain::new(Some(delta), None); ++ ++ Arc::new(Context { ++ domain, ++ config: Arc::new(Config { ++ max_optimize_rounds: 3, ++ extra_fees: None, ++ ++ // next are dummy, not used ++ listen_address: "[::]:1234".parse().unwrap(), ++ permissive_cors: None, ++ }), ++ metrics: Metrics::default(), ++ }) ++ } ++ ++ const GH_DEPLOY_PROTOCOL: &str = r#" ++ party GitHoneyAddr; ++ party Script; ++ ++ type CardanoAddress { ++ payment_credential: CardanoCredential, ++ staking_credential: OptionAddressCardanoCredential, ++ } ++ type SettingsDatum { ++ githoney_address: CardanoAddress, ++ bounty_creation_fee: Int, ++ bounty_reward_fee: Int, ++ } ++ ++ type CardanoCredential { ++ VerificationKey { ++ VerificationKey: Bytes, ++ }, ++ Script { ++ Script: Bytes, ++ }, ++ } ++ ++ type StakeCredWrapper { ++ Inline { ++ VerificationKey: CardanoCredential, ++ }, ++ Pointer { ++ slotNumber: Int, ++ transactionIndex: Int, ++ certificateIndex: Int, ++ }, ++ } ++ ++ type OptionAddressCardanoCredential { ++ Some { ++ stakeCredetial: StakeCredWrapper, ++ }, ++ None, ++ } ++ ++ tx deploy( ++ bountyCreationFee: Int, ++ bountyRewardFee: Int, ++ githoneyPaymentCredential: Bytes, ++ githoneyScript: Bytes, ++ githoneyStakingCredential: Bytes, ++ scriptVersion: Int, ++ settingsMintingPolicy: Bytes, ++ settingsMintingVersion: Int, ++ settingsPolicyId: Bytes, ++ settingsTokenName: Bytes, ++ utxoRef: UtxoRef, ++ ) { ++ ++ input githoney_wallet { ++ ref: utxoRef, ++ } ++ ++ collateral { ++ from: GitHoneyAddr, ++ min_amount: Ada(5000000), ++ } ++ ++ mint { ++ amount: AnyAsset(settingsPolicyId, settingsTokenName, 1), ++ redeemer: (), ++ } ++ ++ output settings_utxo { ++ to: Script, ++ ref_script: { script: githoneyScript, version: scriptVersion, }, ++ amount: min_utxo(settings_utxo) + AnyAsset(settingsPolicyId, settingsTokenName, 1), ++ datum: SettingsDatum { ++ githoney_address: CardanoAddress { ++ payment_credential: CardanoCredential::VerificationKey { ++ VerificationKey: githoneyPaymentCredential, ++ }, ++ staking_credential: OptionAddressCardanoCredential::Some { ++ stakeCredetial: StakeCredWrapper::Inline { ++ VerificationKey: CardanoCredential::VerificationKey { ++ VerificationKey: githoneyStakingCredential, ++ }, ++ }, ++ }, ++ }, ++ bounty_creation_fee: bountyCreationFee, ++ bounty_reward_fee: bountyRewardFee, ++ }, ++ } ++ ++ output change { ++ to: GitHoneyAddr, ++ amount: githoney_wallet - fees - min_utxo(settings_utxo), ++ } ++ ++ cardano::plutus_witness { ++ version: settingsMintingVersion, ++ script: settingsMintingPolicy, ++ } ++ } ++ "#; ++ ++ async fn attempt_resolve_gh_deploy( ++ args: &serde_json::Value, ++ ) -> Result { ++ let protocol = tx3_lang::Protocol::from_string(GH_DEPLOY_PROTOCOL.to_owned()) ++ .load() ++ .unwrap(); ++ ++ let tx = protocol.new_tx("deploy").unwrap(); ++ ++ let ir = tx.apply().unwrap().ir_bytes(); ++ ++ let req = json!({ ++ "tir": { ++ "version": "v1alpha8", ++ "bytecode": hex::encode(ir), ++ "encoding": "hex" ++ }, ++ "args": args ++ }) ++ .to_string(); ++ ++ let params = Params::new(Some(req.as_str())); ++ ++ let context = setup_gh_test_context(); ++ ++ let resolved = trp_resolve(params, context.clone()).await?; ++ ++ Ok(resolved) ++ } ++ ++ #[tokio::test] ++ async fn test_resolve_gh_deploy_happy_path() { ++ let args = json!({ ++ "script": "addr_test1wqzf7xsfldf4pz0am80e3d9sjaw3pq0e4lpddav66tuuyzq0f0flt", ++ "githoneyaddr": "addr_test1qqzq2j55hh2ml3h08skfgg04lhh7n7epv2ycn90ntr6ys7zrxalmeg3lyamyahkfwdv6fylkyxj0stj8xpplusva7w7s40czuq", ++ "githoneypaymentcredential": "04054a94bdd5bfc6ef3c2c9421f5fdefe9fb2162898995f358f44878", ++ "githoneystakingcredential": "43377fbca23f27764edec97359a493f621a4f82e473043fe419df3bd", ++ "bountycreationfee": 2000000, ++ "bountyrewardfee": 500, ++ "settingsmintingpolicy": "59075b010100332229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a4888888888cc896600264653001300b00198059806000cdc3a4001300b0024888966002600460166ea800e26644b30013370e0029000c528c660026e1d200299198008009bac3012300f375400844b30010018a508acc004cdd7980998081baa30130010188a51899801001180a000a01a404523012301330130019ba54800122223233225980099b8748010c050dd500144c96600200313322598009807180b9baa0038992cc00400602913259800800c4c9660020030168992cc00400602f01780bc4cc89660020030198992cc00400603501a80d44c9660026048007159800980b180f9baa0078992cc00400603913259800800c4c96600200301e8992cc0040062b300130280028cc00400e264b3001301b0018992cc00400604313259800800c566002605600513259800980f000c4c9660020030248992cc0040062b3001302e0028cc004006027025405102540ad025812c09604a8178c0b000502a18141baa0028acc004c068006264b300100181244c966002003025812c09626644b3001001813c4c96600200302881440a226644b300100181544c96600200302b815c0ae264b3001303500380d40b10321bad001815a06a303200140c06eb4004c0c400a0508190c0bc00502d1bad001302e002812a05e302c00140a860506ea800a046812902518131baa0018112050811408a04502240b060520028138c094dd50014566002602e00315980098129baa0028074081026408102220443023375400301f403901f409501f80fc07e03e8148c0980050241813001407603b01d80ea04e3024001408860406ea801e03680ea0368108dd6800c0690241810800a03e375a00260400050174084603c00280e0c07800a02b01580ac05501f180e000a03430183754007013405444464b300130100018992cc00400600713259800800c01200900480244c9660026042007006802a03c375c0028108c07800501c180d1baa0048acc004c030006264b3001001801c4c9660020030048024012009132598009810801c01a00a80f0dd7000a042301e001407060346ea801200480b9017180c1baa003159800acc00400a29462a660289212969735f6d696e74696e675f6f6e6c795f6f6e655f73657474696e675f746f6b656e203f2046616c73650014a0809a2b300159800803c528c54cc05124011b69735f6f75747265665f696e5f696e70757473203f2046616c73650014a0809a2b3001300832598009804980b1baa0018a40011375a6034602e6ea8005014192cc004c024c058dd5000c530103d87a8000899198008009bab301b3018375400444b30010018a6103d87a8000899192cc004cdc8a450b73657474696e67734e4654000018acc004cdc7a4410b73657474696e67734e465400001898051980e980d80125eb82298103d87a80004061133004004301f00340606eb8c064004c07000501a20283233001001375660346036602e6ea8014896600200314c103d87a8000899192cc004cdc8807000c56600266e3c0380062601266038603400497ae08a60103d87a8000405d133004004301e003405c6eb8c060004c06c0050194528c54cc0512412269735f73657474696e675f746f6b656e5f696e5f6f7574707574203f2046616c73650014a0809a294101345282026808c046023011406c6030602a6ea800a2a6602692012f65787065637420496e6c696e65446174756d28646174756d29203d207363726970745f6f75747075742e646174756d00164048600660266ea8004c014018c8c966002601460266ea8006264b30013375e6030602a6ea80040722003153301349011161646472657373206d6973736d6174636800164048602e60286ea80062a6602492012c65787065637420536f6d65286f757470757429203d206f757470757473207c3e206c6973742e6174286174290016404530010019bac300330133754011480010011112cc00400a298103d87a80008acc004c02c006260086602e603000497ae08cc00400e6032005337000029000a006404880b08058dd7180798061baa003375a601e6020602064b3001001804c4c96600260240051001805201e375860200028070c8cc004004dd59808180898089808980898069baa0022259800800c52f5c113233223322330020020012259800800c400e2646602c6e9ccc058dd48029980b18098009980b180a000a5eb80cc00c00cc060008c0580050141bab3011003375c601c0026600600660260046022002807a2c80486016002600c6ea8032293454cc01124011856616c696461746f722072657475726e65642066616c73650013656400c2a66004920122657870656374205b696e666f5d203d2074782e6d696e74207c3e20666c617474656e001615330024912d657870656374205f73657474696e67735f646174756d3a2053657474696e6773446174756d203d20646174756d0016260127d8799f5820d1b9de0e40d4b24cc9eceb3e9c6facd1a021096754c8f9b959a8919fca4b3e3e01ff004c0129d8799fd87a9f581c049f1a09fb535089fdd9df98b4b0975d1081f9afc2d6f59ad2f9c208ffd87a80ff0001", ++ "settingspolicyid": "7fb24b2713a4ec77eaa49bc8cafe4092b4be19672a82528ba899a2d8", ++ "settingstokenname": "73657474696e67734e4654", ++ "githoneyscript": "5922fb0101003229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae0024888888888a60022a660069212c6578706563742073657474696e67735f646174756d3a2053657474696e6773446174756d203d20646174756d00168a99801a4928657870656374205b7265665f696e7075745d203d2074782e7265666572656e63655f696e7075747300168a99801a492c65787065637420676974686f6e65795f646174756d3a20476974686f6e6579446174756d203d20646174756d00168a99801a492765787065637420496e6c696e65446174756d28646174756d293a20446174756d203d206461746100168a99801a4922657870656374205b696e666f5d203d2074782e6d696e74207c3e20666c617474656e00168a99801a4940657870656374205b696e7075745d203d0a20202020696e707574730a2020202020207c3e206c6973742e66696c7465722869735f7363726970745f7574786f2900168a99801a4991657870656374205b5061697228626f756e74795f69645f6e616d652c2031295d203d0a2020202020202f2f20657870656374206f6e6c79206f6e6520626f756e747920746f6b656e2069640a2020202020207363726970745f696e7075742e76616c7565207c3e20746f6b656e7328626f756e74795f69645f706f6c69637929207c3e20646963742e746f5f706169727300168a99801a492372656465656d65723a20476974686f6e6579436f6e747261637452656465656d6572730016488888889660033001300d3754027230113012301230123012301230120019b874800246022602460246024003370e90014dd2a40012301130120019180898091809000cdc3a40092301130123012301230123012301230120019119198008008019119801800980100148c044c048c048c048c048c04800644b30010018a4d13259800800c5268992cc004cdc81bae30103014003375c60200031330040043301300130150028a99807a481326b65797320696e206173736f63696174697665206c697374206172656e277420696e20617363656e64696e67206f726465720016403860260028088c04c005010496600200314a314a0807a444646600200200844b3001001880244ca60026eb8c0480066eb4c04c00666006006602e0048020c0540050134888c8cc004004010896600200310048994c004dd71809000cdd59809800ccc00c00cc05c009004180a800a026918089809180918091809000cdc3a40029111111111111111114c004c08c04a6044025222232330010010052259800800c4cc09ccdd81ba9005374c00897adef6c608994c004dd71812800cdd59813000cc0a80092225980099b9000900389981599bb037520126e980200162b30013371e01200713259800980d98149baa00189981619bb03752014605a60546ea800400a2004813a6002013008801200e89981599bb037520066e98008cc018018005026204c1814000a04c911192cc004c050006264b3001001801c4c9660020030048024012009132598009815001c01a00a8138dd7000a0543027001409460466ea80122b300130120018992cc00400600713259800800c01200900480244c9660026054007006802a04e375c0028150c09c00502518119baa0048012040408060426ea800e44646600200200644b30010018a60103d87a8000899192cc004cdc8802800c56600266e3c014006260266604e604a00497ae08a60103d87a80004089133004004302900340886eb8c08c004c098005024488966002602600314bd6f7b63044c8c8cc0040052f5bded8c044b300100189981399bb0375200c6e9800d2f5bded8c113298009bae30250019bab302600198150012444b30013372001400713302b337606ea4028dd3003802c56600266e3c02800e26605666ec0dd48051ba600700189981599bb037520066e98008cc018018005026204c1814000a04c32330010014bd6f7b630112cc00400626604c66ec0dd48021ba80034bd6f7b63044ca60026eb8c0900066eb4c09400660520049112cc004cdc8004001c4cc0a8cdd81ba9008375000e00b15980099b8f00800389981519bb037520106ea001c00626605466ec0dd48019ba80023300600600140948128604e002812901f49660026022603e6ea80062942294501d48896600200514a11329800992cc004c054c08cdd5000c4dd6981218139bab3027302437540031480010211813000cdd798131813800cdd5801a444b30010018acc004c00801a26600a0069000452820468992cc004cdd79813000a610140008acc004cc018010dd6981398151bab3027001898019ba6302b0028a5040911598009980300224001130030078a5040908120c0a40050270ca60020030049119813801198139ba60014bd7020022225980080144cc005300103d87a80004bd6f7b63044ca60026eb8c0940066eacc09800660540069112cc004cdc8a441000038acc004cdc7a44100003899802980b998159ba60024bd70000c4cc015300103d87a8000006409919800803c006446600e0046605a66ec0dd48029ba6004001401c813060500048132294229422941027488c966002602260426ea8006266e24dd6981298111baa0010028a50407c604860426ea8c038c084dd500148888c8cc0040040148966002003133027337606ea4014dd400225eb7bdb1822653001375c604a003375a604c003302a00248896600266e4002400e26605666ec0dd48049ba80080058acc004cdc7804801c4c966002603660526ea800626605866ec0dd4805181698151baa0010028801204e9800804c022004803a26605666ec0dd48019ba8002330060060014098813060500028132600c00d29800800d2f5c122298008014006444660506e9ccc0a0dd4803198141ba900333028375000497ae000140208022444b30010028a6103d87a80008acc004c04c0062602066048604a00497ae08cc00400e604c005337000029000a006407c8119222222222222298009817806cc0bcc0c003644453001004801c00a4453001003800c009004201e9112cc004c080c0b8dd5001c4c9660020030028992cc004006264b300100180244c966002003159800981b801466002007132598009812800c4c9660020030078992cc0040062b3001303a0028992cc004c0a0006264b300100180544c966002003159800981e80146600200300c805a02e805a074805c02e01700b40f8607600281c8c0dcdd50014566002604c00313259800800c02a264b3001001805c02e0171332259800800c036264b3001001807403a01d1332259800800c042264b3001001808c046023132598009822001c04e0248208dd6800c0450441820800a07e375a002608000500e4104607c00281e0dd6800981e801402d03e181d800a0723037375400500940d081a0c0d4dd5000c02103740220110088042076303800140d860686ea800a2b300130230018acc004c0d0dd5001401e00c81aa00c818903118191baa001802a022802a068802c01600b00540e0606a0028198c0d400a007003801c00d0361819800a062302f375400700140b12223259800980f98179baa0018a40011375a606660606ea800502d192cc004c07cc0bcdd5000c530103d87a8000899198008009bab30343031375400444b30010018a6103d87a8000899192cc004cdc8803000c56600266e3c018006260446606c606800497ae08a60103d87a800040c5133004004303800340c46eb8c0c8004c0d4005033205a3300c00300294c005220100a44100800a0129192cc00400604b1325980098198014400604c8180dd61818800a05e300337566020605a6ea80066002002911111114c004c0ccdd5003c8c8cc004004008896600200314bd6f7b63044ca60026eb8c0dc0066eacc0e00066600600660780049112cc00400a2a66072920124657870656374205061697228702c205b5f2c202e2e5d206173207829203d20696e6e657200168cc004006007323200432330010010042259800800c5268992cc0040062b30013004375a607e6084005149a2a6607a92011f76616c756520646f65736e2774207361746973667920707265646963617465001640f1133225980099b90375c60800046eb8c1000062b30013006375a60820051330050053304300130450038a9981fa491f76616c756520646f65736e2774207361746973667920707265646963617465001640f9153303f491276b65797320696e207061697273206172656e277420696e20617363656e64696e67206f72646572001640f8608400460840028200c10800503f14c004c0b400694294503948894cc0f12401234475706c696361746520706f6c69637920696e20746865206173736574206c6973742e0016403481e0607400281c24464b3001001818c4c9660026078005159800cc004c09e60026eacc094c0e0dd51812981c1baa001801d2210b73657474696e67734e46540040214a14a281aa2a6606c9213f54686572652073686f756c642062652065786163746c79206f6e652073657474696e6773204e465420696e20746865207265666572656e636520696e70757400168992cc0040062b300130243038375400313259800800c0ca264b3001303f0028acc0040062b3001302c303a375400313259800800c0de264b30010018992cc00400607313259800800c0ea07503a899912cc00400607913259800800c0f607b03d8992cc004c11c00e330010078804c0f901440f90441bad00181ea08e304400141086eb4004c10c00a0748220c10400503f182080140e207103881c2084303f00140f460766ea800606c81c206d03681b40d904040cd03c181e800a0763039375400303140d9031818c0c606281f0c090c0e0dd51812981c1baa00140d503240e4607400281c0dd61811981b1baa002911919800800801112cc0040062946264664466446600400400244b30010018801c4ca60026eb8c0f40066eb4c0f80066600600660840049112cc004cdc44c0040360110034044005159800800c5284528207c8acc0040062946294103e207c1820000a07c375660760066eb8c0e0004cc00c00cc0f4008c0ec00503949660020031598009810181a1baa0018992cc00400605d13259800981d80145660020031598009814181b1baa0018992cc00400606313259800800c4c9660020030338992cc004006264b300100181ac4c96600200313259800800c0de264b300100181c40e20711332259800800c0ea264b300100181dc0ee0771332259800800c0f6264b30010018992cc004c1180062b30013371290021822800c0fe26644b3001001820c4c9660020030428992cc004c13800e330010128cc00404226644b3001303d0018992cc00400608d13259800800c56600260a400519800800c01208e80fa08e827a08f047823c11d0531828000a09c304c3754021159800981d800c56600260986ea80420050454135045412482484cc0cc00489660020051016899192cc00400608f047823c11e26644b3001001824c4cc0e4dd5800912cc00400a2600e60ac0111323259800800c13609b04d826c4cc896600200304f827c13e264600c60b600e6eb400609e82d8dd7000982a00120b230520013055002414d049824c1250551bae001304e002414c6098002609e0048268c124dd5007410d01b410d028410d04b1bab001821410a0848270c12c005049181a98228009825001a08681fa08e375400303e81f40fa07c8250c11c0050451bad001304600281da08e304400141086eb4004c10c00a0708220c10400503f182080140da06d03681b2084303f00140f4607e00503481a40d20688200c0f400503b181e80140ca065032819207c303b00140e4606e6ea800606081a206103081840c103c40bd038181c800a06e3035375400302d40c902d816c0b605a81d24444b300130290018802466002009003991900118080009981d19bb037520046ea00052f5bded8c122232598009811000c530103d87a8000898151981f1ba60014bd7020729800801401600922232598009818000c530103d87a800089816998209ba80014bd70207833700002004809900a206a911192cc004c0a4c0dcdd5000c4c96600266ebcc0f0c0e4dd5000802440062a6606e92011161646472657373206d6973736d61746368001640d8607660706ea80062a6606c92012c65787065637420536f6d65286f757470757429203d206f757470757473207c3e206c6973742e617428617429001640d4660080060029111111192cc004c0ac0222646644b3001013899912cc004c0c80062b30013041375402b00281aa0848acc004c0c00062b30013041375402b00281aa0848acc004c0b00062b30013041375402b00281aa0848acc004cdc3a400c00315980098209baa01580140d5042456600266e1d20080018acc004c104dd500ac00a06a821206a81f103e207c40f881f05660026060607c6ea80062646644b30013031304137540051323259800800c0e6264b300130490028992cc004c0d4dd6982300144c966002607000313259800acc0066002606e608e6ea8c0c0c120dd5003d28528a08a8a518a9982324811b69735f646174756d5f6e6f745f6d6572676564203f2046616c73650014a0822a2b30015980099baf007301030343048375400314a315330464911969735f646174756d5f7468655f73616d65203f2046616c73650014a0822a2b30015980099810981918241baa028375a605660906ea801e29462a6608c9211d69735f74785f6265666f72655f646561646c696e65203f2046616c73650014a0822a2b300159800998069bab3035304837540026eacc0d4c120dd5004c528c54cc1192412369735f76616c75655f6772617465725f7468616e5f6265666f7265203f2046616c73650014a0822a2b3001337126466002002603e6eacc0d8c124dd5001112cc0040062900044cdc02400466004004609c0028259201e8a518a9982324811e6172655f706f6c69636965735f6c6573735f7468616e203f2046616c73650014a0822a29410454528208a8a50411514a0822a60026eb0c0ccc11cdd5013cc128c11cdd50045200040351332259800981c001c4c966002b3001325980099baf0013232303b3304f30500023304f30500013304f3039304d375400660a260a200260a000260966ea802a26006606e60966ea800629410481809181b18251baa0018a518a998242491a69735f6e65775f646174756d5f76616c6964203f2046616c73650014a0823a2b300159800cc004dd5981b98251baa0019ba6330033756606e60946ea802cc06520809bee029119b87002001409114a3153304849011b69735f7574786f5f76616c75655f76616c6964203f2046616c73650014a0823a2b30015980099811981a18251baa02a375a605a60946ea802629462a660909211d69735f74785f6265666f72655f646561646c696e65203f2046616c73650014a0823a2b300130253036304a375401314a31533048490121636f6e7472696275746f725f69736e745f61737369676e6564203f2046616c73650014a0823a29410474528208e8a50411d30013758606a60926ea80a6609860926ea802a9000201e899912cc004c0d801626644b300159800cc004c0f0c130dd5181a98269baa00ca50a51412914a3153304b49011b69735f646174756d5f6e6f745f6d6572676564203f2046616c73650014a082522b300159800998019bac3004304d375405a60a0609a6ea803229462a660969211a69735f7369676e65645f62795f61646d696e203f2046616c73650014a082522b30015980099baf30153039304d375400464646464646080660a860aa00a660a860aa008660a860aa006660a860aa004660a860aa002660a930014a34c103d87a8000a60103d8798000413c60ac60ac00260aa00260a800260a600260a4002609a6ea803229462a660969211a69735f6e65775f646174756d5f76616c6964203f2046616c73650014a082522b300159800cc004dd5981d18269baa0029828000c88cdc3801000a04e8a518a99825a491b69735f7574786f5f76616c75655f76616c6964203f2046616c73650014a082522b30015980099813181b98269baa02d375a6060609a6ea803229462a660969211d69735f74785f6265666f72655f646561646c696e65203f2046616c73650014a082522b3001598009802981c98269baa00c8a518a99825a491f636f6e7472696275746f725f69735f61737369676e6564203f2046616c73650014a082522b3001598009980b1bab303a304d3755300137586072609a6ea80b66074609a6ea803290022026301c482026fb80a29462a6609692012169735f6d61696e7461696e65725f6d696e6164615f70616964203f2046616c73650014a082522b30013301637566074609a6eaa60026eb0c0e4c134dd5016cc140c134dd51980b816824d2002404c6eacc140c14400629462a660969211a69735f7265776172645f6665655f70616964203f2046616c73650014a08252294104a452820948a50412914a08252294104a452820948a50412930013758606e60966ea80ae609c60966ea80329000202232323304f30500013304f305030510014bd704c004cc014dd5981c98261baa00d301b483fed770166609c6e98cc0166002015007a40048140c06d20809bee023304e4c0101a0004bd70488a60020050019112cc004cdc780300844006264660aa6e98cc030dd5982b0014c00401e009337020060028178cc154dd3198061bab305630570029800803c01200281792f5c066e0ccdc1001003a4141380282790342060375a607660966ea802a2b30013370e9003002c4c8cc8966002b30019800981e98269baa3036304e375401b4a14a2825a29462a660989211b69735f646174756d5f6e6f745f6d6572676564203f2046616c73650014a0825a2b300159800998021bac3005304e375405c60a2609c6ea803629462a660989211a69735f7369676e65645f62795f61646d696e203f2046616c73650014a0825a2b300159800992cc004c100c138dd5000c566002b30013301837566078609e6eaa60026eb0c0ecc13cdd5017cc148c13cdd5000d20024054603c90404df7014528c54cc13524012069735f636f6e7472696275746f725f7061795f76616c6964203f2046616c73650014a082622b30010028a518a99826a4811f69735f6d61696e7461696e65725f7061795f76616c6964203f2046616c73650014a08262294104c456600200514a3153304d49011f69735f6d61696e7461696e65725f7061795f76616c6964203f2046616c73650014a0826104c181d18271baa00d8a518a998262491a6172655f7061796d656e74735f76616c6964203f2046616c73650014a0825a2b30015980098181bad305130520028acc004cdc79bae3051002009899b8f375c60a200601914a0825a294104b4528c54cc13124012069735f626f756e74795f69645f746f6b656e5f6275726e74203f2046616c73650014a0825a294104b452820968a50412c60a00026602a6eacc0e4c130dd54c004dd6181c18261baa02c981c98261baa00ba40008090c05cdd5981f18261baa00b301902b8992cc004c0f4c12cdd5000c4c8c966002b3001303d304d3754606c609c6ea803629462a6609892114646174756d2e6d6572676564203f2046616c73650014a0825a2b300159800acc004c0c0dd698289829000c56600266e3cdd71828800804c4cdc79bae305100200c8a50412d14a0825a29462a660989212069735f626f756e74795f69645f746f6b656e5f6275726e74203f2046616c73650014a0825a2b30013301737566076609c6eaa60026eb0c0e8c138dd50174c144c138dd5001d20004051300137566076609c6ea803e019009a400280aa29462a6609892012069735f636f6e7472696275746f725f7061795f76616c6964203f2046616c73650014a0825a294104b452820963051001301a02c8a9982524813c65787065637420536f6d6528636f6e7472696275746f725f6164647265737329203d20646174756d2e636f6e7472696275746f725f6164647265737300164124606e60966ea802904820902304d304e304e304e304e304e304e304e304e0012259800981e18251baa0018991919800800802112cc00400629422b30013371e6eb8c14400400e294626600400460a4002825904f1bae304e304b375400315330494912d65787065637420566572696669636174696f6e4b657928766b29203d20766572696669636174696f6e5f6b657900164120823088ca60020030038012002222598008014400626530010049828801e6002005375c60980033756609a0032223259800981b800c530103d87a80008981f998299ba60014bd70209c329800800c00e00480088896600200510018994c00401260b000798008014dd71829800cdd6982a000c888c966002609200314c103d87a8000898231982d1ba80014bd7020aa337000040028161004182b00120a840b08020c13c00904d12cc004c0e4c11cdd5000c528c528208a4110608a6ea806a0768218dd71822000c0e90461823800a08a3259800981998219baa0018a5eb7bdb18226eacc11cc110dd5000a082330203756606060866ea8010004dd7182298211baa0028a99820249496578706563742053637269707428626f756e74795f69645f706f6c69637929203d207363726970745f696e7075742e616464726573732e7061796d656e745f63726564656e7469616c001640fc608660806ea8c10cc100dd5000982198201baa002302c303f375464b300100181b44c966002608a005100181ba0843043001410464660020026eb0c10cc100dd5010112cc004006297ae0899912cc00566002606460846ea8c118c10cdd5182318219baa30303043375400514a314a0820226608a0046600800800313300400400141006088002608a00282122a6607a92011a65787065637420536f6d6528646174756d29203d20646174756d001640f0607c6ea804e067033819c0cd044182000098201820800981e1baa00f8acc004c0b4022264653001375c6082003375a60826084003375c6082607c6ea80466eb8c1040092222598009812001c528c4c8cc8966002b3001337126eb4c0c8c114dd5000cc004dd5981918229baa98009bac30313045375404b3048304537540034800900b522100a44100405514a315330434911c69735f6372656174696f6e5f6665655f70616964203f2046616c73650014a082122b300159800981a0034528c54cc10d24012b69735f6d696e74696e675f6f6e6c795f6f6e655f626f756e74795f69645f746f6b656e203f2046616c73650014a082122b300159800acc00566002b3001303430443754605a608a6ea800a2942330014a14a14a282110424528c54cc10d2411d646174756d2e6d6572676564203d3d2046616c7365203f2046616c73650014a082122b3001598009980f181798229baa025375a6050608a6ea800a29462a660869214069735f74785f6265666f72655f646561646c696e652874782e76616c69646974795f72616e67652c20646174756d2e646561646c696e6529203f2046616c73650014a082122b3001598009810181898229baa0028a518a99821a492a69735f6e6f6e6528646174756d2e636f6e7472696275746f725f6164647265737329203f2046616c73650014a082122b30013370e6eb4c0d4c114dd50011bad30313045375400314a315330434912d646174756d2e626f756e74795f7265776172645f666565203d3d207265776172645f666565203f2046616c73650014a082122941042452820848a50410914a3153304349011376616c69645f646174756d203f2046616c73650014a082122b300159800998051bab30323045375400730013014482026fb80a009007a4004806229462a6608692011376616c69645f76616c7565203f2046616c73650014a082122b3001980098081bab303730453754005374d300137566064608a6ea800e009007a400280624466e1c00800501f4528c54cc10d2411576616c69645f6465706f736974203f2046616c73650014a082122941042452820848a50410914a08210c02cc0bcc10cdd50009980681181fcc004dd6181718211baa02298181982219ba548008cc110dd4800a5eb80cc111300103d87a80004bd7052000402081f8608200260140391640e481c88966002b3001330060020018a518a9981da48118677265617465725f6f725f657175616c203f2046616c73650014a081d22b30019800cc00400a6e980064466e1c008005017528528a0748a518a9981da481156172655f646966666572656e74203f2046616c73650014a081d2294103a045268a99805a491856616c696461746f722072657475726e65642066616c7365001365640282611e581c7fb24b2713a4ec77eaa49bc8cafe4092b4be19672a82528ba899a2d80001", ++ "scriptversion": 3, ++ "settingsmintingversion": 3, ++ "utxoref": "d1b9de0e40d4b24cc9eceb3e9c6facd1a021096754c8f9b959a8919fca4b3e3e#1", ++ }); ++ ++ let resolved = attempt_resolve_gh_deploy(&args).await.unwrap(); ++ ++ let tx = hex::decode(resolved["tx"].as_str().unwrap()).unwrap(); ++ ++ let _ = pallas::ledger::traverse::MultiEraTx::decode(&tx).unwrap(); ++ } ++ ++ #[tokio::test] ++ async fn test_resolve_gh_deploy_missing_args() { ++ let args = json!({}); ++ ++ let resolved = attempt_resolve_gh_deploy(&args).await; ++ ++ let err = resolved.unwrap_err(); ++ ++ dbg!(&err); ++ ++ assert_eq!(err.code(), Error::CODE_MISSING_TX_ARG); ++ } ++ ++ #[tokio::test] ++ async fn test_resolve_gh_deploy_invalid_args() { ++ let args = json!({ ++ "script": "", ++ "githoneyaddr": "", ++ "githoneypaymentcredential": "", ++ "githoneystakingcredential": "", ++ "bountycreationfee": 2000000, ++ "bountyrewardfee": 500, ++ "settingsmintingpolicy": "", ++ "settingspolicyid": "", ++ "settingstokenname": "settingsNFT", ++ "githoneyscript": "", ++ "scriptversion": 3, ++ "settingsmintingversion": 3, ++ "utxoref": "", ++ }); ++ ++ let resolved = attempt_resolve_gh_deploy(&args).await; ++ ++ let err = resolved.unwrap_err(); ++ ++ dbg!(&err); ++ ++ assert_eq!(err.code(), ErrorCode::InvalidParams.code()); ++ } + } diff --git a/shelley.json b/shelley.json new file mode 100644 index 00000000..20abba3f --- /dev/null +++ b/shelley.json @@ -0,0 +1,68 @@ +{ + "activeSlotsCoeff": 0.05, + "epochLength": 86400, + "genDelegs": { + "12b0f443d02861948a0fce9541916b014e8402984c7b83ad70a834ce": { + "delegate": "7c54a168c731f2f44ced620f3cca7c2bd90731cab223d5167aa994e6", + "vrf": "62d546a35e1be66a2b06e29558ef33f4222f1c466adbb59b52d800964d4e60ec" + }, + "3df542796a64e399b60c74acfbdb5afa1e114532fa36b46d6368ef3a": { + "delegate": "c44bc2f3cc7e98c0f227aa399e4035c33c0d775a0985875fff488e20", + "vrf": "4f9d334decadff6eba258b2df8ae1f02580a2628bce47ae7d957e1acd3f42a3c" + }, + "93fd5083ff20e7ab5570948831730073143bea5a5d5539852ed45889": { + "delegate": "82a02922f10105566b70366b07c758c8134fa91b3d8ae697dfa5e8e0", + "vrf": "8a57e94a9b4c65ec575f35d41edb1df399fa30fdf10775389f5d1ef670ca3f9f" + }, + "a86cab3ea72eabb2e8aafbbf4abbd2ba5bdfd04eea26a39b126a78e4": { + "delegate": "10257f6d3bae913514bdc96c9170b3166bf6838cca95736b0e418426", + "vrf": "1b54aad6b013145a0fc74bb5c2aa368ebaf3999e88637d78e09706d0cc29874a" + }, + "b799804a28885bd49c0e1b99d8b3b26de0fac17a5cf651ecf0c872f0": { + "delegate": "ebe606e22d932d51be2c1ce87e7d7e4c9a7d1f7df4a5535c29e23d22", + "vrf": "b3fc06a1f8ee69ff23185d9af453503be8b15b2652e1f9fb7c3ded6797a2d6f9" + }, + "d125812d6ab973a2c152a0525b7fd32d36ff13555a427966a9cac9b1": { + "delegate": "e302198135fb5b00bfe0b9b5623426f7cf03179ab7ba75f945d5b79b", + "vrf": "b45ca2ed95f92248fa0322ce1fc9f815a5a5aa2f21f1adc2c42c4dccfc7ba631" + }, + "ef27651990a26449a40767d5e06cdef1670a3f3ff4b951d385b51787": { + "delegate": "0e0b11e80d958732e587585d30978d683a061831d1b753878f549d05", + "vrf": "b860ec844f6cd476c4fabb4aa1ca72d5c74d82f3835aed3c9515a35b6e048719" + } + }, + "initialFunds": {}, + "maxKESEvolutions": 62, + "maxLovelaceSupply": 45000000000000000, + "networkId": "Testnet", + "networkMagic": 2, + "protocolParams": { + "protocolVersion": { + "minor": 0, + "major": 6 + }, + "decentralisationParam": 1, + "eMax": 18, + "extraEntropy": { + "tag": "NeutralNonce" + }, + "maxTxSize": 16384, + "maxBlockBodySize": 65536, + "maxBlockHeaderSize": 1100, + "minFeeA": 44, + "minFeeB": 155381, + "minUTxOValue": 1000000, + "poolDeposit": 500000000, + "minPoolCost": 340000000, + "keyDeposit": 2000000, + "nOpt": 150, + "rho": 0.003, + "tau": 0.20, + "a0": 0.3 + }, + "securityParam": 432, + "slotLength": 1, + "slotsPerKESPeriod": 129600, + "systemStart": "2022-10-25T00:00:00Z", + "updateQuorum": 5 +} From b764bea2c52c25eb053ba8410c274b9e99b2c623 Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Mon, 8 Sep 2025 15:16:57 -0300 Subject: [PATCH 02/11] fix(utxos): implement get_tip method to retrieve current slot from state cursor --- crates/trp/src/compiler.rs | 1 - crates/trp/src/utxos.rs | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/trp/src/compiler.rs b/crates/trp/src/compiler.rs index 6a5c2d32..129addc7 100644 --- a/crates/trp/src/compiler.rs +++ b/crates/trp/src/compiler.rs @@ -70,7 +70,6 @@ pub fn load_compiler( pparams, tx3_cardano::Config { extra_fees: config.extra_fees, - tip_slot: tip_slot.as_ref().map(|p| p.slot()), }, ); diff --git a/crates/trp/src/utxos.rs b/crates/trp/src/utxos.rs index 94697851..b37bb56d 100644 --- a/crates/trp/src/utxos.rs +++ b/crates/trp/src/utxos.rs @@ -75,4 +75,9 @@ impl UtxoStore for UtxoStoreAdapter { Ok(utxos) } + + async fn get_tip(&self) -> Result { + let cursor = self.state().cursor().map_err(Error::from)?; + Ok(cursor.unwrap().slot()) + } } From b142902eac2e6056d318a4975734fa4f48012d98 Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Tue, 9 Sep 2025 16:07:34 -0300 Subject: [PATCH 03/11] fix(compiler): add tip resolution in load_compiler and update error handling --- crates/trp/src/compiler.rs | 12 +++++++++++- crates/trp/src/error.rs | 5 +++++ crates/trp/src/methods.rs | 2 +- crates/trp/src/utxos.rs | 5 ----- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/crates/trp/src/compiler.rs b/crates/trp/src/compiler.rs index 129addc7..bb120089 100644 --- a/crates/trp/src/compiler.rs +++ b/crates/trp/src/compiler.rs @@ -59,18 +59,28 @@ fn build_pparams(domain: &D) -> Result { Ok(out) } - pub fn load_compiler( domain: &D, config: &Config, ) -> Result { let pparams = build_pparams::(domain)?; + let cursor = ledger.cursor()?.ok_or(Error::TipNotResolved)?; + + let tip = match cursor { + ChainPoint::Specific(slot, hash) => tx3_cardano::ChainTip { + slot, + hash: hash.to_vec(), + }, + ChainPoint::Origin => return Err(Error::TipNotResolved), + }; + let compiler = tx3_cardano::Compiler::new( pparams, tx3_cardano::Config { extra_fees: config.extra_fees, }, + tip, ); Ok(compiler) diff --git a/crates/trp/src/error.rs b/crates/trp/src/error.rs index b7cfb7e2..7121bec4 100644 --- a/crates/trp/src/error.rs +++ b/crates/trp/src/error.rs @@ -52,6 +52,9 @@ pub enum Error { #[error("tx script returned failure")] TxScriptFailure(Vec), + + #[error("failed to resolve tip slot/hash")] + TipNotResolved, } trait IntoErrorData { @@ -128,6 +131,7 @@ impl Error { pub const CODE_MISSING_TX_ARG: i32 = -32001; pub const CODE_INPUT_NOT_RESOLVED: i32 = -32002; pub const CODE_TX_SCRIPT_FAILURE: i32 = -32003; + pub const CODE_TIP_NOT_RESOLVED: i32 = -32004; pub fn code(&self) -> i32 { match self { @@ -149,6 +153,7 @@ impl Error { Error::MissingTxArg { .. } => Self::CODE_MISSING_TX_ARG, Error::InputNotResolved(_, _, _) => Self::CODE_INPUT_NOT_RESOLVED, Error::TxScriptFailure(_) => Self::CODE_TX_SCRIPT_FAILURE, + Error::TipNotResolved => Self::CODE_TIP_NOT_RESOLVED, } } diff --git a/crates/trp/src/methods.rs b/crates/trp/src/methods.rs index ed6d048d..10036cd7 100644 --- a/crates/trp/src/methods.rs +++ b/crates/trp/src/methods.rs @@ -191,7 +191,7 @@ mod tests { const SUBJECT_PROTOCOL: &str = r#" party Sender; party Receiver; - + tx swap(quantity: Int) { input source { from: Sender, diff --git a/crates/trp/src/utxos.rs b/crates/trp/src/utxos.rs index b37bb56d..94697851 100644 --- a/crates/trp/src/utxos.rs +++ b/crates/trp/src/utxos.rs @@ -75,9 +75,4 @@ impl UtxoStore for UtxoStoreAdapter { Ok(utxos) } - - async fn get_tip(&self) -> Result { - let cursor = self.state().cursor().map_err(Error::from)?; - Ok(cursor.unwrap().slot()) - } } From eae953c1717da5e78f145f837c3c9a4fad6d20e1 Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Thu, 11 Sep 2025 12:15:21 -0300 Subject: [PATCH 04/11] fix(compiler): change ChainTip to ChainPoint in load_compiler function --- crates/trp/src/compiler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/trp/src/compiler.rs b/crates/trp/src/compiler.rs index bb120089..5e170f11 100644 --- a/crates/trp/src/compiler.rs +++ b/crates/trp/src/compiler.rs @@ -68,7 +68,7 @@ pub fn load_compiler( let cursor = ledger.cursor()?.ok_or(Error::TipNotResolved)?; let tip = match cursor { - ChainPoint::Specific(slot, hash) => tx3_cardano::ChainTip { + ChainPoint::Specific(slot, hash) => tx3_cardano::ChainPoint { slot, hash: hash.to_vec(), }, From f48b793bcb62b57acb3cc11dfc474927c5f48d72 Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Mon, 15 Sep 2025 14:37:03 -0300 Subject: [PATCH 05/11] fix(compiler): include timestamp in ChainPoint creation --- crates/trp/src/compiler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/trp/src/compiler.rs b/crates/trp/src/compiler.rs index 5e170f11..e474d2f2 100644 --- a/crates/trp/src/compiler.rs +++ b/crates/trp/src/compiler.rs @@ -1,7 +1,7 @@ use pallas::ledger::primitives::conway::CostModels; use std::collections::HashMap; -use dolos_core::{Domain, Genesis, StateStore as _}; +use dolos_core::{ChainPoint, Domain, Genesis, StateStore as _}; use crate::{Config, Error}; From 3714e1ced1cfdaeca2f9225272575be091da690d Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Mon, 15 Sep 2025 15:09:58 -0300 Subject: [PATCH 06/11] add hash to tip --- crates/trp/src/compiler.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/crates/trp/src/compiler.rs b/crates/trp/src/compiler.rs index e474d2f2..7029dacb 100644 --- a/crates/trp/src/compiler.rs +++ b/crates/trp/src/compiler.rs @@ -1,7 +1,7 @@ use pallas::ledger::primitives::conway::CostModels; use std::collections::HashMap; -use dolos_core::{ChainPoint, Domain, Genesis, StateStore as _}; +use dolos_core::{Domain, Genesis, StateStore as _}; use crate::{Config, Error}; @@ -65,14 +65,18 @@ pub fn load_compiler( ) -> Result { let pparams = build_pparams::(domain)?; - let cursor = ledger.cursor()?.ok_or(Error::TipNotResolved)?; + let cursor = domain.state().read_cursor()?.ok_or(Error::TipNotResolved)?; + let slot = cursor.slot(); + let hash = cursor.hash().map(|h| h.to_vec()).unwrap_or_default(); - let tip = match cursor { - ChainPoint::Specific(slot, hash) => tx3_cardano::ChainPoint { - slot, - hash: hash.to_vec(), - }, - ChainPoint::Origin => return Err(Error::TipNotResolved), + let chain_summary = + dolos_cardano::load_era_summary(domain).map_err(|_| Error::TipNotResolved)?; + let timestamp = chain_summary.slot_time(slot) as u128 * 1000; + + let tip = tx3_cardano::ChainPoint { + slot, + hash, + timestamp, }; let compiler = tx3_cardano::Compiler::new( From 667dbf3b46f145238fac160590604a2eca72a77b Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Mon, 29 Sep 2025 14:32:39 -0300 Subject: [PATCH 07/11] chore: remove deprecated JSON --- .gitignore | 1 + alonzo.json | 196 ---------------------------------- byron.json | 91 ---------------- conway.json | 297 ---------------------------------------------------- dolos.toml | 60 ----------- dolos2.toml | 44 -------- 6 files changed, 1 insertion(+), 688 deletions(-) delete mode 100644 alonzo.json delete mode 100644 byron.json delete mode 100644 conway.json delete mode 100644 dolos.toml delete mode 100644 dolos2.toml diff --git a/.gitignore b/.gitignore index 6aec506e..0ca79c58 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ tmp benches /data +/snapshot diff --git a/alonzo.json b/alonzo.json deleted file mode 100644 index 3621f2d6..00000000 --- a/alonzo.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "lovelacePerUTxOWord": 34482, - "executionPrices": { - "prSteps": - { - "numerator" : 721, - "denominator" : 10000000 - }, - "prMem": - { - "numerator" : 577, - "denominator" : 10000 - } - }, - "maxTxExUnits": { - "exUnitsMem": 10000000, - "exUnitsSteps": 10000000000 - }, - "maxBlockExUnits": { - "exUnitsMem": 50000000, - "exUnitsSteps": 40000000000 - }, - "maxValueSize": 5000, - "collateralPercentage": 150, - "maxCollateralInputs": 3, - "costModels": { - "PlutusV1": { - "sha2_256-memory-arguments": 4, - "equalsString-cpu-arguments-constant": 1000, - "cekDelayCost-exBudgetMemory": 100, - "lessThanEqualsByteString-cpu-arguments-intercept": 103599, - "divideInteger-memory-arguments-minimum": 1, - "appendByteString-cpu-arguments-slope": 621, - "blake2b-cpu-arguments-slope": 29175, - "iData-cpu-arguments": 150000, - "encodeUtf8-cpu-arguments-slope": 1000, - "unBData-cpu-arguments": 150000, - "multiplyInteger-cpu-arguments-intercept": 61516, - "cekConstCost-exBudgetMemory": 100, - "nullList-cpu-arguments": 150000, - "equalsString-cpu-arguments-intercept": 150000, - "trace-cpu-arguments": 150000, - "mkNilData-memory-arguments": 32, - "lengthOfByteString-cpu-arguments": 150000, - "cekBuiltinCost-exBudgetCPU": 29773, - "bData-cpu-arguments": 150000, - "subtractInteger-cpu-arguments-slope": 0, - "unIData-cpu-arguments": 150000, - "consByteString-memory-arguments-intercept": 0, - "divideInteger-memory-arguments-slope": 1, - "divideInteger-cpu-arguments-model-arguments-slope": 118, - "listData-cpu-arguments": 150000, - "headList-cpu-arguments": 150000, - "chooseData-memory-arguments": 32, - "equalsInteger-cpu-arguments-intercept": 136542, - "sha3_256-cpu-arguments-slope": 82363, - "sliceByteString-cpu-arguments-slope": 5000, - "unMapData-cpu-arguments": 150000, - "lessThanInteger-cpu-arguments-intercept": 179690, - "mkCons-cpu-arguments": 150000, - "appendString-memory-arguments-intercept": 0, - "modInteger-cpu-arguments-model-arguments-slope": 118, - "ifThenElse-cpu-arguments": 1, - "mkNilPairData-cpu-arguments": 150000, - "lessThanEqualsInteger-cpu-arguments-intercept": 145276, - "addInteger-memory-arguments-slope": 1, - "chooseList-memory-arguments": 32, - "constrData-memory-arguments": 32, - "decodeUtf8-cpu-arguments-intercept": 150000, - "equalsData-memory-arguments": 1, - "subtractInteger-memory-arguments-slope": 1, - "appendByteString-memory-arguments-intercept": 0, - "lengthOfByteString-memory-arguments": 4, - "headList-memory-arguments": 32, - "listData-memory-arguments": 32, - "consByteString-cpu-arguments-intercept": 150000, - "unIData-memory-arguments": 32, - "remainderInteger-memory-arguments-minimum": 1, - "bData-memory-arguments": 32, - "lessThanByteString-cpu-arguments-slope": 248, - "encodeUtf8-memory-arguments-intercept": 0, - "cekStartupCost-exBudgetCPU": 100, - "multiplyInteger-memory-arguments-intercept": 0, - "unListData-memory-arguments": 32, - "remainderInteger-cpu-arguments-model-arguments-slope": 118, - "cekVarCost-exBudgetCPU": 29773, - "remainderInteger-memory-arguments-slope": 1, - "cekForceCost-exBudgetCPU": 29773, - "sha2_256-cpu-arguments-slope": 29175, - "equalsInteger-memory-arguments": 1, - "indexByteString-memory-arguments": 1, - "addInteger-memory-arguments-intercept": 1, - "chooseUnit-cpu-arguments": 150000, - "sndPair-cpu-arguments": 150000, - "cekLamCost-exBudgetCPU": 29773, - "fstPair-cpu-arguments": 150000, - "quotientInteger-memory-arguments-minimum": 1, - "decodeUtf8-cpu-arguments-slope": 1000, - "lessThanInteger-memory-arguments": 1, - "lessThanEqualsInteger-cpu-arguments-slope": 1366, - "fstPair-memory-arguments": 32, - "modInteger-memory-arguments-intercept": 0, - "unConstrData-cpu-arguments": 150000, - "lessThanEqualsInteger-memory-arguments": 1, - "chooseUnit-memory-arguments": 32, - "sndPair-memory-arguments": 32, - "addInteger-cpu-arguments-intercept": 197209, - "decodeUtf8-memory-arguments-slope": 8, - "equalsData-cpu-arguments-intercept": 150000, - "mapData-cpu-arguments": 150000, - "mkPairData-cpu-arguments": 150000, - "quotientInteger-cpu-arguments-constant": 148000, - "consByteString-memory-arguments-slope": 1, - "cekVarCost-exBudgetMemory": 100, - "indexByteString-cpu-arguments": 150000, - "unListData-cpu-arguments": 150000, - "equalsInteger-cpu-arguments-slope": 1326, - "cekStartupCost-exBudgetMemory": 100, - "subtractInteger-cpu-arguments-intercept": 197209, - "divideInteger-cpu-arguments-model-arguments-intercept": 425507, - "divideInteger-memory-arguments-intercept": 0, - "cekForceCost-exBudgetMemory": 100, - "blake2b-cpu-arguments-intercept": 2477736, - "remainderInteger-cpu-arguments-constant": 148000, - "tailList-cpu-arguments": 150000, - "encodeUtf8-cpu-arguments-intercept": 150000, - "equalsString-cpu-arguments-slope": 1000, - "lessThanByteString-memory-arguments": 1, - "multiplyInteger-cpu-arguments-slope": 11218, - "appendByteString-cpu-arguments-intercept": 396231, - "lessThanEqualsByteString-cpu-arguments-slope": 248, - "modInteger-memory-arguments-slope": 1, - "addInteger-cpu-arguments-slope": 0, - "equalsData-cpu-arguments-slope": 10000, - "decodeUtf8-memory-arguments-intercept": 0, - "chooseList-cpu-arguments": 150000, - "constrData-cpu-arguments": 150000, - "equalsByteString-memory-arguments": 1, - "cekApplyCost-exBudgetCPU": 29773, - "quotientInteger-memory-arguments-slope": 1, - "verifySignature-cpu-arguments-intercept": 3345831, - "unMapData-memory-arguments": 32, - "mkCons-memory-arguments": 32, - "sliceByteString-memory-arguments-slope": 1, - "sha3_256-memory-arguments": 4, - "ifThenElse-memory-arguments": 1, - "mkNilPairData-memory-arguments": 32, - "equalsByteString-cpu-arguments-slope": 247, - "appendString-cpu-arguments-intercept": 150000, - "quotientInteger-cpu-arguments-model-arguments-slope": 118, - "cekApplyCost-exBudgetMemory": 100, - "equalsString-memory-arguments": 1, - "multiplyInteger-memory-arguments-slope": 1, - "cekBuiltinCost-exBudgetMemory": 100, - "remainderInteger-memory-arguments-intercept": 0, - "sha2_256-cpu-arguments-intercept": 2477736, - "remainderInteger-cpu-arguments-model-arguments-intercept": 425507, - "lessThanEqualsByteString-memory-arguments": 1, - "tailList-memory-arguments": 32, - "mkNilData-cpu-arguments": 150000, - "chooseData-cpu-arguments": 150000, - "unBData-memory-arguments": 32, - "blake2b-memory-arguments": 4, - "iData-memory-arguments": 32, - "nullList-memory-arguments": 32, - "cekDelayCost-exBudgetCPU": 29773, - "subtractInteger-memory-arguments-intercept": 1, - "lessThanByteString-cpu-arguments-intercept": 103599, - "consByteString-cpu-arguments-slope": 1000, - "appendByteString-memory-arguments-slope": 1, - "trace-memory-arguments": 32, - "divideInteger-cpu-arguments-constant": 148000, - "cekConstCost-exBudgetCPU": 29773, - "encodeUtf8-memory-arguments-slope": 8, - "quotientInteger-cpu-arguments-model-arguments-intercept": 425507, - "mapData-memory-arguments": 32, - "appendString-cpu-arguments-slope": 1000, - "modInteger-cpu-arguments-constant": 148000, - "verifySignature-cpu-arguments-slope": 1, - "unConstrData-memory-arguments": 32, - "quotientInteger-memory-arguments-intercept": 0, - "equalsByteString-cpu-arguments-constant": 150000, - "sliceByteString-memory-arguments-intercept": 0, - "mkPairData-memory-arguments": 32, - "equalsByteString-cpu-arguments-intercept": 112536, - "appendString-memory-arguments-slope": 1, - "lessThanInteger-cpu-arguments-slope": 497, - "modInteger-cpu-arguments-model-arguments-intercept": 425507, - "modInteger-memory-arguments-minimum": 1, - "sha3_256-cpu-arguments-intercept": 0, - "verifySignature-memory-arguments": 1, - "cekLamCost-exBudgetMemory": 100, - "sliceByteString-cpu-arguments-intercept": 150000 - } - } -} \ No newline at end of file diff --git a/byron.json b/byron.json deleted file mode 100644 index 62363764..00000000 --- a/byron.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "bootStakeholders": { - "021e737009040bf7f1e7b1bcc148f29d748d4a6b561902c95e4a9f36": 1, - "0bc82ced9544980b9ffe7f64b1538bbda6804a5cc32c8035485e184b": 1, - "18ed9844deef98cf9ba8b39791dede0538d2d2fa79bf67ef37dcc826": 1, - "66cfa84ad0ee5ca8586244c8393007cf3d9622d77cfa03fd4f35065b": 1, - "76c4d6c68c0ef81ae364411a84e52ce66089ed006ca29adfc0227901": 1, - "8cc6b89fec65cc83d34b7bab2e6494db631d8476a86625767dd0c2a0": 1, - "e90060fdc085ac9f63cdb3b32ba1d84e0f7eb98561687b213b4c8770": 1 - }, - "heavyDelegation": { - "021e737009040bf7f1e7b1bcc148f29d748d4a6b561902c95e4a9f36": { - "omega": 0, - "issuerPk": "6hSFCotivD08t02n43RMiaF9LzwtYVrFMu/WX6ShfEsxfdXFL5Y6c+DwHSZOCywU0RJz5er2icIO03UytC9NTg==", - "delegatePk": "JEnSVQTPGriTx1+lAMkKhCNsMBDNPGw+NiEvNPh4ui6IdvxrO+WkQPTy5U865XB4VFvi/zb7d+H1bilnztQNBg==", - "cert": "558952d17442e8cc73f0c7dd606e329b38ed2ec0c1f83fe2567d28b21ef2223d2d23640cd0531f75832b50e519631c48643fcfaa7168851645dce07b90d87f0e" - }, - "0bc82ced9544980b9ffe7f64b1538bbda6804a5cc32c8035485e184b": { - "omega": 0, - "issuerPk": "MJ7IskKU8GKk0Eeg3zhfSOK1DDVXOMHD2V/zhEpODUtL9YB0Y7sXnbZfg3+Df05hskP5Jz+dZvdC6DH/dP9jmQ==", - "delegatePk": "hwO7NJL7LfAk5e/QG61FKcdORoK60tvprE3063Muh4EQKrWA6l7t23B2GziK8D0hRO0j5W1Gzpn8WW69XLIlKA==", - "cert": "2bccf50d0c3cbb03dd29cfba817e8ba615db3d7722b41b264ad08722e548cfe83d069b29d13e490823d7519ecdd9940ea49573f6027056c4bd58da1adf75020e" - }, - "18ed9844deef98cf9ba8b39791dede0538d2d2fa79bf67ef37dcc826": { - "omega": 0, - "issuerPk": "pXbW4Jak8maeuWiosvrurykKnqDSHswUjroonSDS3fTnWS+BKe+vjT4zZJNKhQ33KbagiHVJ5CJUNggfsCtG2g==", - "delegatePk": "rbJAZp3kWCUvp8dnLR6qsgpGU+qKAFow4NHYKWiKCkfm1qFCFONob50N1IbNWCGWAhg38ZPTvBazTasjsfj6yQ==", - "cert": "89e1638e31fd3d402cecb897ba773d8c2c11c2d3cff2462b266e21461539b1a4fe8fb528e159b9af473799b51e49aa5b5816a88f10c484aa7cef7ad12850830a" - }, - "66cfa84ad0ee5ca8586244c8393007cf3d9622d77cfa03fd4f35065b": { - "omega": 0, - "issuerPk": "/LGZjmmcAMRisP7Rf454GM2QUKgj2aAyqE+iQo2PIEhcistFOlT+idtbLTceZAnQcwwPJDtTcNi+EnPQyscZOg==", - "delegatePk": "rinFUiKKCPPFY0ULEKn1SPRgLVmOS3jdTXDtrxK6VI1I11G3uBS1Olxi0mQSN3kf+B3hm/xHkuUDVNaSXNiBeQ==", - "cert": "3e7f30bb68c5bc4d23c2a730ac154a188a1fd45aac3f438efd380303171443d2ca4f50e5a1ff66b40ae3da64697f2599956ae06c21b73fa828b8c0dc9fb27302" - }, - "76c4d6c68c0ef81ae364411a84e52ce66089ed006ca29adfc0227901": { - "omega": 0, - "issuerPk": "9EE85tTLdSSR4T1Xoy6n9wr6jlbavCdfp9oQKusskO3DSSyNqRYS7QzYQ96j/WnphUey63082YkKijMfF9A4eA==", - "delegatePk": "dvyHDkXg8LFtb0K6Sitl8OGSEZPvfCVQYLDR6Au6t6/ROvlerMKQ8uri4fG7hQQzbHKtdKWgv94t+zuFJTQ1fw==", - "cert": "5ec0ed46ae7e575bdb089f1bceca3b2689b13a7162fe08578fe60ba64607fffaa507412a97652c3c81cc0ef93ff404cf809a628ae19faba1a035fca0505c1d04" - }, - "8cc6b89fec65cc83d34b7bab2e6494db631d8476a86625767dd0c2a0": { - "omega": 0, - "issuerPk": "Hr5S5PAxf9HSB4FzmtZzaFcXrNrctrI5XUrDrnCkOUTX6rhbtOMkXU3sWVDOvU6LNSSr3/Ws2+iCYZIr7LmTWg==", - "delegatePk": "FaLH2b5H/XS31YRnm98N6fP4Etx6m+GbniVAXMwOp8KhYXPKBJBsX/EjIy3pSkvRBhGCjsycB0yrDxWMi5ZsIQ==", - "cert": "10f06304cceb42071605ebba67b308c7568e5e6fe0d773c58f7e8c13bc8d8a340f70a4fd5e1b4a1c1db1de5c7646802bbc929d6c82d7adb8a77cb6ad77eac50a" - }, - "e90060fdc085ac9f63cdb3b32ba1d84e0f7eb98561687b213b4c8770": { - "omega": 0, - "issuerPk": "B2R+VXzy3c8bxncdOpQ2Z/tblxRNQO8AXQ0OsJDQvZYnLeGQcLD78kyYLpi3nfuS4SfnLar23NV4yiEVwaw+Yw==", - "delegatePk": "nACHGIBacymrKwn07iW/a5ZKJCPZ2cKQqeXw3ivR7WOYVUuufWhZlCoUTZ7rtBqoDaexblUQwkC7hA7AmNA3FA==", - "cert": "b5440daa05f7fae557df46e4f1b7c5802b86f465daad1137e315abf6e72f1c877207276abb8dcba86e18e42d39b34c2f0fa82ba2919944cdc8e2e5264baa450b" - } - }, - "startTime": 1666656000, - "nonAvvmBalances": { - "FHnt4NL7yPXjpZtYj1YUiX9QYYUZGXDT9gA2PJXQFkTSMx3EgawXK5BUrCHdhe2": "0", - "FHnt4NL7yPXk7D87qAWEmfnL7wSQ9AzBU2mjZt3eM48NSCbygxgzAU6vCGiRZEW": "0", - "FHnt4NL7yPXpazQsTdJ3Gp1twQUo4N5rrgGbRNSzchjchPiApc1k4CvqDMcdd7H": "0", - "FHnt4NL7yPXtNo1wLCLZyGTMfAvB14h8onafiYkM7B69ZwvGgXeUyQWfi7FPrif": "0", - "FHnt4NL7yPXtmi4mAjD43V3NB3shDs1gCuHNcMLPsRWjaw1b2yRV2xad8S8V6aq": "0", - "FHnt4NL7yPXvDWHa8bVs73UEUdJd64VxWXSFNqetECtYfTd9TtJguJ14Lu3feth": "30000000000000000", - "FHnt4NL7yPXvNSRpCYydjRr7koQCrsTtkovk5uYMimgqMJX2DyrEEBqiXaTd8rG": "0", - "FHnt4NL7yPY9rTvdsCeyRnsbzp4bN7XdmAZeU5PzA1qR2asYmN6CsdxJw4YoDjG": "0" - }, - "blockVersionData": { - "scriptVersion": 0, - "slotDuration": "20000", - "maxBlockSize": "2000000", - "maxHeaderSize": "2000000", - "maxTxSize": "4096", - "maxProposalSize": "700", - "mpcThd": "20000000000000", - "heavyDelThd": "300000000000", - "updateVoteThd": "1000000000000", - "updateProposalThd": "100000000000000", - "updateImplicit": "10000", - "softforkRule": { - "initThd": "900000000000000", - "minThd": "600000000000000", - "thdDecrement": "50000000000000" - }, - "txFeePolicy": { - "summand": "155381000000000", - "multiplier": "43946000000" - }, - "unlockStakeEpoch": "18446744073709551615" - }, - "protocolConsts": { "k": 432, "protocolMagic": 2 }, - "avvmDistr": {} -} diff --git a/conway.json b/conway.json deleted file mode 100644 index cad84abd..00000000 --- a/conway.json +++ /dev/null @@ -1,297 +0,0 @@ -{ - "poolVotingThresholds": { - "committeeNormal": 0.51, - "committeeNoConfidence": 0.51, - "hardForkInitiation": 0.51, - "motionNoConfidence": 0.51, - "ppSecurityGroup": 0.51 - }, - "dRepVotingThresholds": { - "motionNoConfidence": 0.67, - "committeeNormal": 0.67, - "committeeNoConfidence": 0.6, - "updateToConstitution": 0.75, - "hardForkInitiation": 0.6, - "ppNetworkGroup": 0.67, - "ppEconomicGroup": 0.67, - "ppTechnicalGroup": 0.67, - "ppGovGroup": 0.75, - "treasuryWithdrawal": 0.67 - }, - "committeeMinSize": 0, - "committeeMaxTermLength": 365, - "govActionLifetime": 30, - "govActionDeposit": 100000000000, - "dRepDeposit": 500000000, - "dRepActivity": 20, - "minFeeRefScriptCostPerByte": 15, - "plutusV3CostModel": [ - 100788, - 420, - 1, - 1, - 1000, - 173, - 0, - 1, - 1000, - 59957, - 4, - 1, - 11183, - 32, - 201305, - 8356, - 4, - 16000, - 100, - 16000, - 100, - 16000, - 100, - 16000, - 100, - 16000, - 100, - 16000, - 100, - 100, - 100, - 16000, - 100, - 94375, - 32, - 132994, - 32, - 61462, - 4, - 72010, - 178, - 0, - 1, - 22151, - 32, - 91189, - 769, - 4, - 2, - 85848, - 123203, - 7305, - -900, - 1716, - 549, - 57, - 85848, - 0, - 1, - 1, - 1000, - 42921, - 4, - 2, - 24548, - 29498, - 38, - 1, - 898148, - 27279, - 1, - 51775, - 558, - 1, - 39184, - 1000, - 60594, - 1, - 141895, - 32, - 83150, - 32, - 15299, - 32, - 76049, - 1, - 13169, - 4, - 22100, - 10, - 28999, - 74, - 1, - 28999, - 74, - 1, - 43285, - 552, - 1, - 44749, - 541, - 1, - 33852, - 32, - 68246, - 32, - 72362, - 32, - 7243, - 32, - 7391, - 32, - 11546, - 32, - 85848, - 123203, - 7305, - -900, - 1716, - 549, - 57, - 85848, - 0, - 1, - 90434, - 519, - 0, - 1, - 74433, - 32, - 85848, - 123203, - 7305, - -900, - 1716, - 549, - 57, - 85848, - 0, - 1, - 1, - 85848, - 123203, - 7305, - -900, - 1716, - 549, - 57, - 85848, - 0, - 1, - 955506, - 213312, - 0, - 2, - 270652, - 22588, - 4, - 1457325, - 64566, - 4, - 20467, - 1, - 4, - 0, - 141992, - 32, - 100788, - 420, - 1, - 1, - 81663, - 32, - 59498, - 32, - 20142, - 32, - 24588, - 32, - 20744, - 32, - 25933, - 32, - 24623, - 32, - 43053543, - 10, - 53384111, - 14333, - 10, - 43574283, - 26308, - 10, - 16000, - 100, - 16000, - 100, - 962335, - 18, - 2780678, - 6, - 442008, - 1, - 52538055, - 3756, - 18, - 267929, - 18, - 76433006, - 8868, - 18, - 52948122, - 18, - 1995836, - 36, - 3227919, - 12, - 901022, - 1, - 166917843, - 4307, - 36, - 284546, - 36, - 158221314, - 26549, - 36, - 74698472, - 36, - 333849714, - 1, - 254006273, - 72, - 2174038, - 72, - 2261318, - 64571, - 4, - 207616, - 8310, - 4, - 1293828, - 28716, - 63, - 0, - 1, - 1006041, - 43623, - 251, - 0, - 1 - ], - "constitution": { - "anchor": { - "dataHash": "ca41a91f399259bcefe57f9858e91f6d00e1a38d6d9c63d4052914ea7bd70cb2", - "url": "ipfs://bafkreifnwj6zpu3ixa4siz2lndqybyc5wnnt3jkwyutci4e2tmbnj3xrdm" - }, - "script": "fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64" - }, - "committee": { - "members": { - "scriptHash-ff9babf23fef3f54ec29132c07a8e23807d7b395b143ecd8ff79f4c7": 1000 - }, - "threshold": { - "numerator": 2, - "denominator": 3 - } - } -} \ No newline at end of file diff --git a/dolos.toml b/dolos.toml deleted file mode 100644 index d871f098..00000000 --- a/dolos.toml +++ /dev/null @@ -1,60 +0,0 @@ -[upstream] -peer_address = "preview-node.world.dev.cardano.org:30002" -network_magic = 2 -is_testnet = true - -[storage] -version = "v1" -path = "data" -max_wal_history = 25920 -max_chain_history = 86400 - -[genesis] -byron_path = "byron.json" -shelley_path = "shelley.json" -alonzo_path = "alonzo.json" -conway_path = "conway.json" -force_protocol = 6 - -[sync] -pull_batch_size = 100 -sync_limit = "NoLimit" - -[submit] - -[serve.grpc] -listen_address = "[::]:50051" -permissive_cors = true - -[serve.minibf] -listen_address = "[::]:3000" -permissive_cors = true - -[serve.trp] -listen_address = "[::]:8164" -max_optimize_rounds = 10 -permissive_cors = true - -[mithril] -aggregator = "https://aggregator.pre-release-preview.api.mithril.network/aggregator" -genesis_key = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d" -ancillary_key = "5b3138392c3139322c3231362c3135302c3131342c3231362c3233372c3231302c34352c31382c32312c3139362c3230382c3234362c3134362c322c3235322c3234332c3235312c3139372c32382c3135372c3230342c3134352c33302c31342c3232382c3136382c3132392c38332c3133362c33365d" - -[chain] -type = "cardano" - -[chain.track] -account_state = true -asset_state = true -pool_state = true -epoch_state = true -drep_state = true -tx_logs = true - -[logging] -max_level = "INFO" -include_tokio = false -include_pallas = false -include_grpc = false -include_trp = false -include_minibf = false diff --git a/dolos2.toml b/dolos2.toml deleted file mode 100644 index 4ca3839e..00000000 --- a/dolos2.toml +++ /dev/null @@ -1,44 +0,0 @@ -[upstream] -peer_address = "preprod-node.world.dev.cardano.org:30000" -network_magic = 1 -is_testnet = true - -[storage] -version = "v1" -path = "data" -max_wal_history = 129600 -max_chain_history = 86400 - -[genesis] -byron_path = "byron.json" -shelley_path = "shelley.json" -alonzo_path = "alonzo.json" -conway_path = "conway.json" - -[sync] -pull_batch_size = 100 -sync_limit = "NoLimit" - -[submit] - -[serve.grpc] -listen_address = "[::]:50051" -permissive_cors = true - -[serve.trp] -listen_address = "[::]:8164" -max_optimize_rounds = 100 -permissive_cors = true - -[mithril] -aggregator = "https://aggregator.release-preprod.api.mithril.network/aggregator" -genesis_key = "5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d" -ancillary_key = "5b3138392c3139322c3231362c3135302c3131342c3231362c3233372c3231302c34352c31382c32312c3139362c3230382c3234362c3134362c322c3235322c3234332c3235312c3139372c32382c3135372c3230342c3134352c33302c31342c3232382c3136382c3132392c38332c3133362c33365d" - -[logging] -max_level = "INFO" -include_tokio = false -include_pallas = false -include_grpc = false -include_trp = false -include_minibf = false From 6cbe3a5d95567dff4c6a617f4c15c7dfdbfdf29a Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Mon, 29 Sep 2025 14:33:42 -0300 Subject: [PATCH 08/11] Remove shelley.json configuration file --- githoney_test.diff | 334 --------------------------------------------- shelley.json | 68 --------- 2 files changed, 402 deletions(-) delete mode 100644 githoney_test.diff delete mode 100644 shelley.json diff --git a/githoney_test.diff b/githoney_test.diff deleted file mode 100644 index 1e345eed..00000000 --- a/githoney_test.diff +++ /dev/null @@ -1,334 +0,0 @@ -diff --git a/Cargo.lock b/Cargo.lock -index b650199..41b9f39 100644 ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -5060,8 +5060,6 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] - name = "tx3-cardano" - version = "0.11.4" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "ca5f14e3e1b68b1bff81d58c891604a3087f34be70c2a2ad58a8605b6f15ed82" - dependencies = [ - "hex", - "pallas 1.0.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", -@@ -5075,8 +5073,6 @@ dependencies = [ - [[package]] - name = "tx3-lang" - version = "0.11.4" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "7607218726810f53079b50a63ff4b5e25a8ccf53a82a80d7b6cc1815feec7a65" - dependencies = [ - "bincode 2.0.1", - "hex", -@@ -5091,8 +5087,6 @@ dependencies = [ - [[package]] - name = "tx3-resolver" - version = "0.11.4" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "654a0598f575d665145dc711443082683d66a0fc8a4673e68dbc1f314d87d028" - dependencies = [ - "hex", - "thiserror 2.0.12", -@@ -5103,8 +5097,6 @@ dependencies = [ - [[package]] - name = "tx3-sdk" - version = "0.8.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "8e249299616f099372b45ff1605900671697547bd6691ca154f0aa36dc665cbc" - dependencies = [ - "base64 0.22.1", - "bech32 0.11.0", -diff --git a/crates/trp/Cargo.toml b/crates/trp/Cargo.toml -index bf5b468..98b0ff5 100644 ---- a/crates/trp/Cargo.toml -+++ b/crates/trp/Cargo.toml -@@ -24,20 +24,27 @@ jsonrpsee = { version = "0.24.9", features = ["server"] } - opentelemetry = "0.30.0" - opentelemetry_sdk = "0.30.0" - --tx3-lang = "0.11.4" --tx3-cardano = "0.11.4" --tx3-resolver = "0.11.4" -+# tx3-lang = "0.11.4" -+# tx3-cardano = "0.11.4" -+# tx3-resolver = "0.11.4" - - # tx3-lang = { path = "../../../../tx3-lang/tx3/crates/tx3-lang" } - # tx3-cardano = { path = "../../../../tx3-lang/tx3/crates/tx3-cardano" } - # tx3-resolver = { path = "../../../../tx3-lang/tx3/crates/tx3-resolver" } - -+tx3-lang = { path = "/home/sbobbiesi/Documents/TX3/tx3/crates/tx3-lang" } -+tx3-cardano = { path = "/home/sbobbiesi/Documents/TX3/tx3/crates/tx3-cardano" } -+tx3-resolver = { path = "/home/sbobbiesi/Documents/TX3/tx3/crates/tx3-resolver" } -+ - # tx3-lang = { git = "https://github.com/tx3-lang/tx3.git" } - # tx3-cardano = { git = "https://github.com/tx3-lang/tx3.git" } - # tx3-resolver = { git = "https://github.com/tx3-lang/tx3.git" } -+# tx3-sdk = { version = "^0" } - --tx3-sdk = { version = "^0" } - # tx3-sdk = { path = "../../../../tx3-lang/rust-sdk/sdk" } -+# tx3-sdk = { version = "0.4.0" } -+ -+tx3-sdk = { path = "/home/sbobbiesi/Documents/TX3/rust-sdk/sdk" } - # tx3-sdk = { git = "https://github.com/tx3-lang/rust-sdk.git" } - - [dev-dependencies] -diff --git a/crates/trp/src/mapping.rs b/crates/trp/src/mapping.rs -index 7ca35ef..32e4b69 100644 ---- a/crates/trp/src/mapping.rs -+++ b/crates/trp/src/mapping.rs -@@ -77,9 +77,9 @@ fn map_array(x: &[PlutusData]) -> Expression { - } - - fn map_map(x: &KeyValuePairs) -> Expression { -- Expression::List( -+ Expression::Map( - x.iter() -- .map(|(k, v)| Expression::List(vec![map_datum(k), map_datum(v)])) -+ .map(|(k, v)| (map_datum(k), map_datum(v))) - .collect(), - ) - } -diff --git a/crates/trp/src/methods.rs b/crates/trp/src/methods.rs -index 23ed6f3..9fe771d 100644 ---- a/crates/trp/src/methods.rs -+++ b/crates/trp/src/methods.rs -@@ -193,7 +193,7 @@ mod tests { - const SUBJECT_PROTOCOL: &str = r#" - party Sender; - party Receiver; -- -+ - tx swap(quantity: Int) { - input source { - from: Sender, -@@ -286,4 +286,228 @@ mod tests { - - assert_eq!(err.code(), ErrorCode::InvalidParams.code()); - } -+ -+ fn setup_gh_test_context() -> Arc> { -+ let delta = dolos_testing::make_custom_utxo_delta( -+ 1, -+ dolos_testing::TestAddress::everyone(), -+ 2..4, -+ |x: &dolos_testing::TestAddress| { -+ dolos_testing::utxo_with_random_amount(x, 4_000_000..5_000_000) -+ }, -+ ); -+ -+ let domain = ToyDomain::new(Some(delta), None); -+ -+ Arc::new(Context { -+ domain, -+ config: Arc::new(Config { -+ max_optimize_rounds: 3, -+ extra_fees: None, -+ -+ // next are dummy, not used -+ listen_address: "[::]:1234".parse().unwrap(), -+ permissive_cors: None, -+ }), -+ metrics: Metrics::default(), -+ }) -+ } -+ -+ const GH_DEPLOY_PROTOCOL: &str = r#" -+ party GitHoneyAddr; -+ party Script; -+ -+ type CardanoAddress { -+ payment_credential: CardanoCredential, -+ staking_credential: OptionAddressCardanoCredential, -+ } -+ type SettingsDatum { -+ githoney_address: CardanoAddress, -+ bounty_creation_fee: Int, -+ bounty_reward_fee: Int, -+ } -+ -+ type CardanoCredential { -+ VerificationKey { -+ VerificationKey: Bytes, -+ }, -+ Script { -+ Script: Bytes, -+ }, -+ } -+ -+ type StakeCredWrapper { -+ Inline { -+ VerificationKey: CardanoCredential, -+ }, -+ Pointer { -+ slotNumber: Int, -+ transactionIndex: Int, -+ certificateIndex: Int, -+ }, -+ } -+ -+ type OptionAddressCardanoCredential { -+ Some { -+ stakeCredetial: StakeCredWrapper, -+ }, -+ None, -+ } -+ -+ tx deploy( -+ bountyCreationFee: Int, -+ bountyRewardFee: Int, -+ githoneyPaymentCredential: Bytes, -+ githoneyScript: Bytes, -+ githoneyStakingCredential: Bytes, -+ scriptVersion: Int, -+ settingsMintingPolicy: Bytes, -+ settingsMintingVersion: Int, -+ settingsPolicyId: Bytes, -+ settingsTokenName: Bytes, -+ utxoRef: UtxoRef, -+ ) { -+ -+ input githoney_wallet { -+ ref: utxoRef, -+ } -+ -+ collateral { -+ from: GitHoneyAddr, -+ min_amount: Ada(5000000), -+ } -+ -+ mint { -+ amount: AnyAsset(settingsPolicyId, settingsTokenName, 1), -+ redeemer: (), -+ } -+ -+ output settings_utxo { -+ to: Script, -+ ref_script: { script: githoneyScript, version: scriptVersion, }, -+ amount: min_utxo(settings_utxo) + AnyAsset(settingsPolicyId, settingsTokenName, 1), -+ datum: SettingsDatum { -+ githoney_address: CardanoAddress { -+ payment_credential: CardanoCredential::VerificationKey { -+ VerificationKey: githoneyPaymentCredential, -+ }, -+ staking_credential: OptionAddressCardanoCredential::Some { -+ stakeCredetial: StakeCredWrapper::Inline { -+ VerificationKey: CardanoCredential::VerificationKey { -+ VerificationKey: githoneyStakingCredential, -+ }, -+ }, -+ }, -+ }, -+ bounty_creation_fee: bountyCreationFee, -+ bounty_reward_fee: bountyRewardFee, -+ }, -+ } -+ -+ output change { -+ to: GitHoneyAddr, -+ amount: githoney_wallet - fees - min_utxo(settings_utxo), -+ } -+ -+ cardano::plutus_witness { -+ version: settingsMintingVersion, -+ script: settingsMintingPolicy, -+ } -+ } -+ "#; -+ -+ async fn attempt_resolve_gh_deploy( -+ args: &serde_json::Value, -+ ) -> Result { -+ let protocol = tx3_lang::Protocol::from_string(GH_DEPLOY_PROTOCOL.to_owned()) -+ .load() -+ .unwrap(); -+ -+ let tx = protocol.new_tx("deploy").unwrap(); -+ -+ let ir = tx.apply().unwrap().ir_bytes(); -+ -+ let req = json!({ -+ "tir": { -+ "version": "v1alpha8", -+ "bytecode": hex::encode(ir), -+ "encoding": "hex" -+ }, -+ "args": args -+ }) -+ .to_string(); -+ -+ let params = Params::new(Some(req.as_str())); -+ -+ let context = setup_gh_test_context(); -+ -+ let resolved = trp_resolve(params, context.clone()).await?; -+ -+ Ok(resolved) -+ } -+ -+ #[tokio::test] -+ async fn test_resolve_gh_deploy_happy_path() { -+ let args = json!({ -+ "script": "addr_test1wqzf7xsfldf4pz0am80e3d9sjaw3pq0e4lpddav66tuuyzq0f0flt", -+ "githoneyaddr": "addr_test1qqzq2j55hh2ml3h08skfgg04lhh7n7epv2ycn90ntr6ys7zrxalmeg3lyamyahkfwdv6fylkyxj0stj8xpplusva7w7s40czuq", -+ "githoneypaymentcredential": "04054a94bdd5bfc6ef3c2c9421f5fdefe9fb2162898995f358f44878", -+ "githoneystakingcredential": "43377fbca23f27764edec97359a493f621a4f82e473043fe419df3bd", -+ "bountycreationfee": 2000000, -+ "bountyrewardfee": 500, -+ "settingsmintingpolicy": "59075b010100332229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a4888888888cc896600264653001300b00198059806000cdc3a4001300b0024888966002600460166ea800e26644b30013370e0029000c528c660026e1d200299198008009bac3012300f375400844b30010018a508acc004cdd7980998081baa30130010188a51899801001180a000a01a404523012301330130019ba54800122223233225980099b8748010c050dd500144c96600200313322598009807180b9baa0038992cc00400602913259800800c4c9660020030168992cc00400602f01780bc4cc89660020030198992cc00400603501a80d44c9660026048007159800980b180f9baa0078992cc00400603913259800800c4c96600200301e8992cc0040062b300130280028cc00400e264b3001301b0018992cc00400604313259800800c566002605600513259800980f000c4c9660020030248992cc0040062b3001302e0028cc004006027025405102540ad025812c09604a8178c0b000502a18141baa0028acc004c068006264b300100181244c966002003025812c09626644b3001001813c4c96600200302881440a226644b300100181544c96600200302b815c0ae264b3001303500380d40b10321bad001815a06a303200140c06eb4004c0c400a0508190c0bc00502d1bad001302e002812a05e302c00140a860506ea800a046812902518131baa0018112050811408a04502240b060520028138c094dd50014566002602e00315980098129baa0028074081026408102220443023375400301f403901f409501f80fc07e03e8148c0980050241813001407603b01d80ea04e3024001408860406ea801e03680ea0368108dd6800c0690241810800a03e375a00260400050174084603c00280e0c07800a02b01580ac05501f180e000a03430183754007013405444464b300130100018992cc00400600713259800800c01200900480244c9660026042007006802a03c375c0028108c07800501c180d1baa0048acc004c030006264b3001001801c4c9660020030048024012009132598009810801c01a00a80f0dd7000a042301e001407060346ea801200480b9017180c1baa003159800acc00400a29462a660289212969735f6d696e74696e675f6f6e6c795f6f6e655f73657474696e675f746f6b656e203f2046616c73650014a0809a2b300159800803c528c54cc05124011b69735f6f75747265665f696e5f696e70757473203f2046616c73650014a0809a2b3001300832598009804980b1baa0018a40011375a6034602e6ea8005014192cc004c024c058dd5000c530103d87a8000899198008009bab301b3018375400444b30010018a6103d87a8000899192cc004cdc8a450b73657474696e67734e4654000018acc004cdc7a4410b73657474696e67734e465400001898051980e980d80125eb82298103d87a80004061133004004301f00340606eb8c064004c07000501a20283233001001375660346036602e6ea8014896600200314c103d87a8000899192cc004cdc8807000c56600266e3c0380062601266038603400497ae08a60103d87a8000405d133004004301e003405c6eb8c060004c06c0050194528c54cc0512412269735f73657474696e675f746f6b656e5f696e5f6f7574707574203f2046616c73650014a0809a294101345282026808c046023011406c6030602a6ea800a2a6602692012f65787065637420496e6c696e65446174756d28646174756d29203d207363726970745f6f75747075742e646174756d00164048600660266ea8004c014018c8c966002601460266ea8006264b30013375e6030602a6ea80040722003153301349011161646472657373206d6973736d6174636800164048602e60286ea80062a6602492012c65787065637420536f6d65286f757470757429203d206f757470757473207c3e206c6973742e6174286174290016404530010019bac300330133754011480010011112cc00400a298103d87a80008acc004c02c006260086602e603000497ae08cc00400e6032005337000029000a006404880b08058dd7180798061baa003375a601e6020602064b3001001804c4c96600260240051001805201e375860200028070c8cc004004dd59808180898089808980898069baa0022259800800c52f5c113233223322330020020012259800800c400e2646602c6e9ccc058dd48029980b18098009980b180a000a5eb80cc00c00cc060008c0580050141bab3011003375c601c0026600600660260046022002807a2c80486016002600c6ea8032293454cc01124011856616c696461746f722072657475726e65642066616c73650013656400c2a66004920122657870656374205b696e666f5d203d2074782e6d696e74207c3e20666c617474656e001615330024912d657870656374205f73657474696e67735f646174756d3a2053657474696e6773446174756d203d20646174756d0016260127d8799f5820d1b9de0e40d4b24cc9eceb3e9c6facd1a021096754c8f9b959a8919fca4b3e3e01ff004c0129d8799fd87a9f581c049f1a09fb535089fdd9df98b4b0975d1081f9afc2d6f59ad2f9c208ffd87a80ff0001", -+ "settingspolicyid": "7fb24b2713a4ec77eaa49bc8cafe4092b4be19672a82528ba899a2d8", -+ "settingstokenname": "73657474696e67734e4654", -+ "githoneyscript": "5922fb0101003229800aba4aba2aba1aba0aab9faab9eaab9dab9cab9a9bae0024888888888a60022a660069212c6578706563742073657474696e67735f646174756d3a2053657474696e6773446174756d203d20646174756d00168a99801a4928657870656374205b7265665f696e7075745d203d2074782e7265666572656e63655f696e7075747300168a99801a492c65787065637420676974686f6e65795f646174756d3a20476974686f6e6579446174756d203d20646174756d00168a99801a492765787065637420496e6c696e65446174756d28646174756d293a20446174756d203d206461746100168a99801a4922657870656374205b696e666f5d203d2074782e6d696e74207c3e20666c617474656e00168a99801a4940657870656374205b696e7075745d203d0a20202020696e707574730a2020202020207c3e206c6973742e66696c7465722869735f7363726970745f7574786f2900168a99801a4991657870656374205b5061697228626f756e74795f69645f6e616d652c2031295d203d0a2020202020202f2f20657870656374206f6e6c79206f6e6520626f756e747920746f6b656e2069640a2020202020207363726970745f696e7075742e76616c7565207c3e20746f6b656e7328626f756e74795f69645f706f6c69637929207c3e20646963742e746f5f706169727300168a99801a492372656465656d65723a20476974686f6e6579436f6e747261637452656465656d6572730016488888889660033001300d3754027230113012301230123012301230120019b874800246022602460246024003370e90014dd2a40012301130120019180898091809000cdc3a40092301130123012301230123012301230120019119198008008019119801800980100148c044c048c048c048c048c04800644b30010018a4d13259800800c5268992cc004cdc81bae30103014003375c60200031330040043301300130150028a99807a481326b65797320696e206173736f63696174697665206c697374206172656e277420696e20617363656e64696e67206f726465720016403860260028088c04c005010496600200314a314a0807a444646600200200844b3001001880244ca60026eb8c0480066eb4c04c00666006006602e0048020c0540050134888c8cc004004010896600200310048994c004dd71809000cdd59809800ccc00c00cc05c009004180a800a026918089809180918091809000cdc3a40029111111111111111114c004c08c04a6044025222232330010010052259800800c4cc09ccdd81ba9005374c00897adef6c608994c004dd71812800cdd59813000cc0a80092225980099b9000900389981599bb037520126e980200162b30013371e01200713259800980d98149baa00189981619bb03752014605a60546ea800400a2004813a6002013008801200e89981599bb037520066e98008cc018018005026204c1814000a04c911192cc004c050006264b3001001801c4c9660020030048024012009132598009815001c01a00a8138dd7000a0543027001409460466ea80122b300130120018992cc00400600713259800800c01200900480244c9660026054007006802a04e375c0028150c09c00502518119baa0048012040408060426ea800e44646600200200644b30010018a60103d87a8000899192cc004cdc8802800c56600266e3c014006260266604e604a00497ae08a60103d87a80004089133004004302900340886eb8c08c004c098005024488966002602600314bd6f7b63044c8c8cc0040052f5bded8c044b300100189981399bb0375200c6e9800d2f5bded8c113298009bae30250019bab302600198150012444b30013372001400713302b337606ea4028dd3003802c56600266e3c02800e26605666ec0dd48051ba600700189981599bb037520066e98008cc018018005026204c1814000a04c32330010014bd6f7b630112cc00400626604c66ec0dd48021ba80034bd6f7b63044ca60026eb8c0900066eb4c09400660520049112cc004cdc8004001c4cc0a8cdd81ba9008375000e00b15980099b8f00800389981519bb037520106ea001c00626605466ec0dd48019ba80023300600600140948128604e002812901f49660026022603e6ea80062942294501d48896600200514a11329800992cc004c054c08cdd5000c4dd6981218139bab3027302437540031480010211813000cdd798131813800cdd5801a444b30010018acc004c00801a26600a0069000452820468992cc004cdd79813000a610140008acc004cc018010dd6981398151bab3027001898019ba6302b0028a5040911598009980300224001130030078a5040908120c0a40050270ca60020030049119813801198139ba60014bd7020022225980080144cc005300103d87a80004bd6f7b63044ca60026eb8c0940066eacc09800660540069112cc004cdc8a441000038acc004cdc7a44100003899802980b998159ba60024bd70000c4cc015300103d87a8000006409919800803c006446600e0046605a66ec0dd48029ba6004001401c813060500048132294229422941027488c966002602260426ea8006266e24dd6981298111baa0010028a50407c604860426ea8c038c084dd500148888c8cc0040040148966002003133027337606ea4014dd400225eb7bdb1822653001375c604a003375a604c003302a00248896600266e4002400e26605666ec0dd48049ba80080058acc004cdc7804801c4c966002603660526ea800626605866ec0dd4805181698151baa0010028801204e9800804c022004803a26605666ec0dd48019ba8002330060060014098813060500028132600c00d29800800d2f5c122298008014006444660506e9ccc0a0dd4803198141ba900333028375000497ae000140208022444b30010028a6103d87a80008acc004c04c0062602066048604a00497ae08cc00400e604c005337000029000a006407c8119222222222222298009817806cc0bcc0c003644453001004801c00a4453001003800c009004201e9112cc004c080c0b8dd5001c4c9660020030028992cc004006264b300100180244c966002003159800981b801466002007132598009812800c4c9660020030078992cc0040062b3001303a0028992cc004c0a0006264b300100180544c966002003159800981e80146600200300c805a02e805a074805c02e01700b40f8607600281c8c0dcdd50014566002604c00313259800800c02a264b3001001805c02e0171332259800800c036264b3001001807403a01d1332259800800c042264b3001001808c046023132598009822001c04e0248208dd6800c0450441820800a07e375a002608000500e4104607c00281e0dd6800981e801402d03e181d800a0723037375400500940d081a0c0d4dd5000c02103740220110088042076303800140d860686ea800a2b300130230018acc004c0d0dd5001401e00c81aa00c818903118191baa001802a022802a068802c01600b00540e0606a0028198c0d400a007003801c00d0361819800a062302f375400700140b12223259800980f98179baa0018a40011375a606660606ea800502d192cc004c07cc0bcdd5000c530103d87a8000899198008009bab30343031375400444b30010018a6103d87a8000899192cc004cdc8803000c56600266e3c018006260446606c606800497ae08a60103d87a800040c5133004004303800340c46eb8c0c8004c0d4005033205a3300c00300294c005220100a44100800a0129192cc00400604b1325980098198014400604c8180dd61818800a05e300337566020605a6ea80066002002911111114c004c0ccdd5003c8c8cc004004008896600200314bd6f7b63044ca60026eb8c0dc0066eacc0e00066600600660780049112cc00400a2a66072920124657870656374205061697228702c205b5f2c202e2e5d206173207829203d20696e6e657200168cc004006007323200432330010010042259800800c5268992cc0040062b30013004375a607e6084005149a2a6607a92011f76616c756520646f65736e2774207361746973667920707265646963617465001640f1133225980099b90375c60800046eb8c1000062b30013006375a60820051330050053304300130450038a9981fa491f76616c756520646f65736e2774207361746973667920707265646963617465001640f9153303f491276b65797320696e207061697273206172656e277420696e20617363656e64696e67206f72646572001640f8608400460840028200c10800503f14c004c0b400694294503948894cc0f12401234475706c696361746520706f6c69637920696e20746865206173736574206c6973742e0016403481e0607400281c24464b3001001818c4c9660026078005159800cc004c09e60026eacc094c0e0dd51812981c1baa001801d2210b73657474696e67734e46540040214a14a281aa2a6606c9213f54686572652073686f756c642062652065786163746c79206f6e652073657474696e6773204e465420696e20746865207265666572656e636520696e70757400168992cc0040062b300130243038375400313259800800c0ca264b3001303f0028acc0040062b3001302c303a375400313259800800c0de264b30010018992cc00400607313259800800c0ea07503a899912cc00400607913259800800c0f607b03d8992cc004c11c00e330010078804c0f901440f90441bad00181ea08e304400141086eb4004c10c00a0748220c10400503f182080140e207103881c2084303f00140f460766ea800606c81c206d03681b40d904040cd03c181e800a0763039375400303140d9031818c0c606281f0c090c0e0dd51812981c1baa00140d503240e4607400281c0dd61811981b1baa002911919800800801112cc0040062946264664466446600400400244b30010018801c4ca60026eb8c0f40066eb4c0f80066600600660840049112cc004cdc44c0040360110034044005159800800c5284528207c8acc0040062946294103e207c1820000a07c375660760066eb8c0e0004cc00c00cc0f4008c0ec00503949660020031598009810181a1baa0018992cc00400605d13259800981d80145660020031598009814181b1baa0018992cc00400606313259800800c4c9660020030338992cc004006264b300100181ac4c96600200313259800800c0de264b300100181c40e20711332259800800c0ea264b300100181dc0ee0771332259800800c0f6264b30010018992cc004c1180062b30013371290021822800c0fe26644b3001001820c4c9660020030428992cc004c13800e330010128cc00404226644b3001303d0018992cc00400608d13259800800c56600260a400519800800c01208e80fa08e827a08f047823c11d0531828000a09c304c3754021159800981d800c56600260986ea80420050454135045412482484cc0cc00489660020051016899192cc00400608f047823c11e26644b3001001824c4cc0e4dd5800912cc00400a2600e60ac0111323259800800c13609b04d826c4cc896600200304f827c13e264600c60b600e6eb400609e82d8dd7000982a00120b230520013055002414d049824c1250551bae001304e002414c6098002609e0048268c124dd5007410d01b410d028410d04b1bab001821410a0848270c12c005049181a98228009825001a08681fa08e375400303e81f40fa07c8250c11c0050451bad001304600281da08e304400141086eb4004c10c00a0708220c10400503f182080140da06d03681b2084303f00140f4607e00503481a40d20688200c0f400503b181e80140ca065032819207c303b00140e4606e6ea800606081a206103081840c103c40bd038181c800a06e3035375400302d40c902d816c0b605a81d24444b300130290018802466002009003991900118080009981d19bb037520046ea00052f5bded8c122232598009811000c530103d87a8000898151981f1ba60014bd7020729800801401600922232598009818000c530103d87a800089816998209ba80014bd70207833700002004809900a206a911192cc004c0a4c0dcdd5000c4c96600266ebcc0f0c0e4dd5000802440062a6606e92011161646472657373206d6973736d61746368001640d8607660706ea80062a6606c92012c65787065637420536f6d65286f757470757429203d206f757470757473207c3e206c6973742e617428617429001640d4660080060029111111192cc004c0ac0222646644b3001013899912cc004c0c80062b30013041375402b00281aa0848acc004c0c00062b30013041375402b00281aa0848acc004c0b00062b30013041375402b00281aa0848acc004cdc3a400c00315980098209baa01580140d5042456600266e1d20080018acc004c104dd500ac00a06a821206a81f103e207c40f881f05660026060607c6ea80062646644b30013031304137540051323259800800c0e6264b300130490028992cc004c0d4dd6982300144c966002607000313259800acc0066002606e608e6ea8c0c0c120dd5003d28528a08a8a518a9982324811b69735f646174756d5f6e6f745f6d6572676564203f2046616c73650014a0822a2b30015980099baf007301030343048375400314a315330464911969735f646174756d5f7468655f73616d65203f2046616c73650014a0822a2b30015980099810981918241baa028375a605660906ea801e29462a6608c9211d69735f74785f6265666f72655f646561646c696e65203f2046616c73650014a0822a2b300159800998069bab3035304837540026eacc0d4c120dd5004c528c54cc1192412369735f76616c75655f6772617465725f7468616e5f6265666f7265203f2046616c73650014a0822a2b3001337126466002002603e6eacc0d8c124dd5001112cc0040062900044cdc02400466004004609c0028259201e8a518a9982324811e6172655f706f6c69636965735f6c6573735f7468616e203f2046616c73650014a0822a29410454528208a8a50411514a0822a60026eb0c0ccc11cdd5013cc128c11cdd50045200040351332259800981c001c4c966002b3001325980099baf0013232303b3304f30500023304f30500013304f3039304d375400660a260a200260a000260966ea802a26006606e60966ea800629410481809181b18251baa0018a518a998242491a69735f6e65775f646174756d5f76616c6964203f2046616c73650014a0823a2b300159800cc004dd5981b98251baa0019ba6330033756606e60946ea802cc06520809bee029119b87002001409114a3153304849011b69735f7574786f5f76616c75655f76616c6964203f2046616c73650014a0823a2b30015980099811981a18251baa02a375a605a60946ea802629462a660909211d69735f74785f6265666f72655f646561646c696e65203f2046616c73650014a0823a2b300130253036304a375401314a31533048490121636f6e7472696275746f725f69736e745f61737369676e6564203f2046616c73650014a0823a29410474528208e8a50411d30013758606a60926ea80a6609860926ea802a9000201e899912cc004c0d801626644b300159800cc004c0f0c130dd5181a98269baa00ca50a51412914a3153304b49011b69735f646174756d5f6e6f745f6d6572676564203f2046616c73650014a082522b300159800998019bac3004304d375405a60a0609a6ea803229462a660969211a69735f7369676e65645f62795f61646d696e203f2046616c73650014a082522b30015980099baf30153039304d375400464646464646080660a860aa00a660a860aa008660a860aa006660a860aa004660a860aa002660a930014a34c103d87a8000a60103d8798000413c60ac60ac00260aa00260a800260a600260a4002609a6ea803229462a660969211a69735f6e65775f646174756d5f76616c6964203f2046616c73650014a082522b300159800cc004dd5981d18269baa0029828000c88cdc3801000a04e8a518a99825a491b69735f7574786f5f76616c75655f76616c6964203f2046616c73650014a082522b30015980099813181b98269baa02d375a6060609a6ea803229462a660969211d69735f74785f6265666f72655f646561646c696e65203f2046616c73650014a082522b3001598009802981c98269baa00c8a518a99825a491f636f6e7472696275746f725f69735f61737369676e6564203f2046616c73650014a082522b3001598009980b1bab303a304d3755300137586072609a6ea80b66074609a6ea803290022026301c482026fb80a29462a6609692012169735f6d61696e7461696e65725f6d696e6164615f70616964203f2046616c73650014a082522b30013301637566074609a6eaa60026eb0c0e4c134dd5016cc140c134dd51980b816824d2002404c6eacc140c14400629462a660969211a69735f7265776172645f6665655f70616964203f2046616c73650014a08252294104a452820948a50412914a08252294104a452820948a50412930013758606e60966ea80ae609c60966ea80329000202232323304f30500013304f305030510014bd704c004cc014dd5981c98261baa00d301b483fed770166609c6e98cc0166002015007a40048140c06d20809bee023304e4c0101a0004bd70488a60020050019112cc004cdc780300844006264660aa6e98cc030dd5982b0014c00401e009337020060028178cc154dd3198061bab305630570029800803c01200281792f5c066e0ccdc1001003a4141380282790342060375a607660966ea802a2b30013370e9003002c4c8cc8966002b30019800981e98269baa3036304e375401b4a14a2825a29462a660989211b69735f646174756d5f6e6f745f6d6572676564203f2046616c73650014a0825a2b300159800998021bac3005304e375405c60a2609c6ea803629462a660989211a69735f7369676e65645f62795f61646d696e203f2046616c73650014a0825a2b300159800992cc004c100c138dd5000c566002b30013301837566078609e6eaa60026eb0c0ecc13cdd5017cc148c13cdd5000d20024054603c90404df7014528c54cc13524012069735f636f6e7472696275746f725f7061795f76616c6964203f2046616c73650014a082622b30010028a518a99826a4811f69735f6d61696e7461696e65725f7061795f76616c6964203f2046616c73650014a08262294104c456600200514a3153304d49011f69735f6d61696e7461696e65725f7061795f76616c6964203f2046616c73650014a0826104c181d18271baa00d8a518a998262491a6172655f7061796d656e74735f76616c6964203f2046616c73650014a0825a2b30015980098181bad305130520028acc004cdc79bae3051002009899b8f375c60a200601914a0825a294104b4528c54cc13124012069735f626f756e74795f69645f746f6b656e5f6275726e74203f2046616c73650014a0825a294104b452820968a50412c60a00026602a6eacc0e4c130dd54c004dd6181c18261baa02c981c98261baa00ba40008090c05cdd5981f18261baa00b301902b8992cc004c0f4c12cdd5000c4c8c966002b3001303d304d3754606c609c6ea803629462a6609892114646174756d2e6d6572676564203f2046616c73650014a0825a2b300159800acc004c0c0dd698289829000c56600266e3cdd71828800804c4cdc79bae305100200c8a50412d14a0825a29462a660989212069735f626f756e74795f69645f746f6b656e5f6275726e74203f2046616c73650014a0825a2b30013301737566076609c6eaa60026eb0c0e8c138dd50174c144c138dd5001d20004051300137566076609c6ea803e019009a400280aa29462a6609892012069735f636f6e7472696275746f725f7061795f76616c6964203f2046616c73650014a0825a294104b452820963051001301a02c8a9982524813c65787065637420536f6d6528636f6e7472696275746f725f6164647265737329203d20646174756d2e636f6e7472696275746f725f6164647265737300164124606e60966ea802904820902304d304e304e304e304e304e304e304e304e0012259800981e18251baa0018991919800800802112cc00400629422b30013371e6eb8c14400400e294626600400460a4002825904f1bae304e304b375400315330494912d65787065637420566572696669636174696f6e4b657928766b29203d20766572696669636174696f6e5f6b657900164120823088ca60020030038012002222598008014400626530010049828801e6002005375c60980033756609a0032223259800981b800c530103d87a80008981f998299ba60014bd70209c329800800c00e00480088896600200510018994c00401260b000798008014dd71829800cdd6982a000c888c966002609200314c103d87a8000898231982d1ba80014bd7020aa337000040028161004182b00120a840b08020c13c00904d12cc004c0e4c11cdd5000c528c528208a4110608a6ea806a0768218dd71822000c0e90461823800a08a3259800981998219baa0018a5eb7bdb18226eacc11cc110dd5000a082330203756606060866ea8010004dd7182298211baa0028a99820249496578706563742053637269707428626f756e74795f69645f706f6c69637929203d207363726970745f696e7075742e616464726573732e7061796d656e745f63726564656e7469616c001640fc608660806ea8c10cc100dd5000982198201baa002302c303f375464b300100181b44c966002608a005100181ba0843043001410464660020026eb0c10cc100dd5010112cc004006297ae0899912cc00566002606460846ea8c118c10cdd5182318219baa30303043375400514a314a0820226608a0046600800800313300400400141006088002608a00282122a6607a92011a65787065637420536f6d6528646174756d29203d20646174756d001640f0607c6ea804e067033819c0cd044182000098201820800981e1baa00f8acc004c0b4022264653001375c6082003375a60826084003375c6082607c6ea80466eb8c1040092222598009812001c528c4c8cc8966002b3001337126eb4c0c8c114dd5000cc004dd5981918229baa98009bac30313045375404b3048304537540034800900b522100a44100405514a315330434911c69735f6372656174696f6e5f6665655f70616964203f2046616c73650014a082122b300159800981a0034528c54cc10d24012b69735f6d696e74696e675f6f6e6c795f6f6e655f626f756e74795f69645f746f6b656e203f2046616c73650014a082122b300159800acc00566002b3001303430443754605a608a6ea800a2942330014a14a14a282110424528c54cc10d2411d646174756d2e6d6572676564203d3d2046616c7365203f2046616c73650014a082122b3001598009980f181798229baa025375a6050608a6ea800a29462a660869214069735f74785f6265666f72655f646561646c696e652874782e76616c69646974795f72616e67652c20646174756d2e646561646c696e6529203f2046616c73650014a082122b3001598009810181898229baa0028a518a99821a492a69735f6e6f6e6528646174756d2e636f6e7472696275746f725f6164647265737329203f2046616c73650014a082122b30013370e6eb4c0d4c114dd50011bad30313045375400314a315330434912d646174756d2e626f756e74795f7265776172645f666565203d3d207265776172645f666565203f2046616c73650014a082122941042452820848a50410914a3153304349011376616c69645f646174756d203f2046616c73650014a082122b300159800998051bab30323045375400730013014482026fb80a009007a4004806229462a6608692011376616c69645f76616c7565203f2046616c73650014a082122b3001980098081bab303730453754005374d300137566064608a6ea800e009007a400280624466e1c00800501f4528c54cc10d2411576616c69645f6465706f736974203f2046616c73650014a082122941042452820848a50410914a08210c02cc0bcc10cdd50009980681181fcc004dd6181718211baa02298181982219ba548008cc110dd4800a5eb80cc111300103d87a80004bd7052000402081f8608200260140391640e481c88966002b3001330060020018a518a9981da48118677265617465725f6f725f657175616c203f2046616c73650014a081d22b30019800cc00400a6e980064466e1c008005017528528a0748a518a9981da481156172655f646966666572656e74203f2046616c73650014a081d2294103a045268a99805a491856616c696461746f722072657475726e65642066616c7365001365640282611e581c7fb24b2713a4ec77eaa49bc8cafe4092b4be19672a82528ba899a2d80001", -+ "scriptversion": 3, -+ "settingsmintingversion": 3, -+ "utxoref": "d1b9de0e40d4b24cc9eceb3e9c6facd1a021096754c8f9b959a8919fca4b3e3e#1", -+ }); -+ -+ let resolved = attempt_resolve_gh_deploy(&args).await.unwrap(); -+ -+ let tx = hex::decode(resolved["tx"].as_str().unwrap()).unwrap(); -+ -+ let _ = pallas::ledger::traverse::MultiEraTx::decode(&tx).unwrap(); -+ } -+ -+ #[tokio::test] -+ async fn test_resolve_gh_deploy_missing_args() { -+ let args = json!({}); -+ -+ let resolved = attempt_resolve_gh_deploy(&args).await; -+ -+ let err = resolved.unwrap_err(); -+ -+ dbg!(&err); -+ -+ assert_eq!(err.code(), Error::CODE_MISSING_TX_ARG); -+ } -+ -+ #[tokio::test] -+ async fn test_resolve_gh_deploy_invalid_args() { -+ let args = json!({ -+ "script": "", -+ "githoneyaddr": "", -+ "githoneypaymentcredential": "", -+ "githoneystakingcredential": "", -+ "bountycreationfee": 2000000, -+ "bountyrewardfee": 500, -+ "settingsmintingpolicy": "", -+ "settingspolicyid": "", -+ "settingstokenname": "settingsNFT", -+ "githoneyscript": "", -+ "scriptversion": 3, -+ "settingsmintingversion": 3, -+ "utxoref": "", -+ }); -+ -+ let resolved = attempt_resolve_gh_deploy(&args).await; -+ -+ let err = resolved.unwrap_err(); -+ -+ dbg!(&err); -+ -+ assert_eq!(err.code(), ErrorCode::InvalidParams.code()); -+ } - } diff --git a/shelley.json b/shelley.json deleted file mode 100644 index 20abba3f..00000000 --- a/shelley.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "activeSlotsCoeff": 0.05, - "epochLength": 86400, - "genDelegs": { - "12b0f443d02861948a0fce9541916b014e8402984c7b83ad70a834ce": { - "delegate": "7c54a168c731f2f44ced620f3cca7c2bd90731cab223d5167aa994e6", - "vrf": "62d546a35e1be66a2b06e29558ef33f4222f1c466adbb59b52d800964d4e60ec" - }, - "3df542796a64e399b60c74acfbdb5afa1e114532fa36b46d6368ef3a": { - "delegate": "c44bc2f3cc7e98c0f227aa399e4035c33c0d775a0985875fff488e20", - "vrf": "4f9d334decadff6eba258b2df8ae1f02580a2628bce47ae7d957e1acd3f42a3c" - }, - "93fd5083ff20e7ab5570948831730073143bea5a5d5539852ed45889": { - "delegate": "82a02922f10105566b70366b07c758c8134fa91b3d8ae697dfa5e8e0", - "vrf": "8a57e94a9b4c65ec575f35d41edb1df399fa30fdf10775389f5d1ef670ca3f9f" - }, - "a86cab3ea72eabb2e8aafbbf4abbd2ba5bdfd04eea26a39b126a78e4": { - "delegate": "10257f6d3bae913514bdc96c9170b3166bf6838cca95736b0e418426", - "vrf": "1b54aad6b013145a0fc74bb5c2aa368ebaf3999e88637d78e09706d0cc29874a" - }, - "b799804a28885bd49c0e1b99d8b3b26de0fac17a5cf651ecf0c872f0": { - "delegate": "ebe606e22d932d51be2c1ce87e7d7e4c9a7d1f7df4a5535c29e23d22", - "vrf": "b3fc06a1f8ee69ff23185d9af453503be8b15b2652e1f9fb7c3ded6797a2d6f9" - }, - "d125812d6ab973a2c152a0525b7fd32d36ff13555a427966a9cac9b1": { - "delegate": "e302198135fb5b00bfe0b9b5623426f7cf03179ab7ba75f945d5b79b", - "vrf": "b45ca2ed95f92248fa0322ce1fc9f815a5a5aa2f21f1adc2c42c4dccfc7ba631" - }, - "ef27651990a26449a40767d5e06cdef1670a3f3ff4b951d385b51787": { - "delegate": "0e0b11e80d958732e587585d30978d683a061831d1b753878f549d05", - "vrf": "b860ec844f6cd476c4fabb4aa1ca72d5c74d82f3835aed3c9515a35b6e048719" - } - }, - "initialFunds": {}, - "maxKESEvolutions": 62, - "maxLovelaceSupply": 45000000000000000, - "networkId": "Testnet", - "networkMagic": 2, - "protocolParams": { - "protocolVersion": { - "minor": 0, - "major": 6 - }, - "decentralisationParam": 1, - "eMax": 18, - "extraEntropy": { - "tag": "NeutralNonce" - }, - "maxTxSize": 16384, - "maxBlockBodySize": 65536, - "maxBlockHeaderSize": 1100, - "minFeeA": 44, - "minFeeB": 155381, - "minUTxOValue": 1000000, - "poolDeposit": 500000000, - "minPoolCost": 340000000, - "keyDeposit": 2000000, - "nOpt": 150, - "rho": 0.003, - "tau": 0.20, - "a0": 0.3 - }, - "securityParam": 432, - "slotLength": 1, - "slotsPerKESPeriod": 129600, - "systemStart": "2022-10-25T00:00:00Z", - "updateQuorum": 5 -} From a9a7c4a6d3556ae6b7e5d583f6052dc01ce1c215 Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Mon, 29 Sep 2025 14:40:45 -0300 Subject: [PATCH 09/11] fix(compiler): refactor state access in load_compiler function --- crates/trp/src/compiler.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/trp/src/compiler.rs b/crates/trp/src/compiler.rs index 7029dacb..2b221953 100644 --- a/crates/trp/src/compiler.rs +++ b/crates/trp/src/compiler.rs @@ -65,12 +65,13 @@ pub fn load_compiler( ) -> Result { let pparams = build_pparams::(domain)?; - let cursor = domain.state().read_cursor()?.ok_or(Error::TipNotResolved)?; + let state = domain.state(); + let cursor = state.read_cursor()?.ok_or(Error::TipNotResolved)?; let slot = cursor.slot(); let hash = cursor.hash().map(|h| h.to_vec()).unwrap_or_default(); let chain_summary = - dolos_cardano::load_era_summary(domain).map_err(|_| Error::TipNotResolved)?; + dolos_cardano::eras::load_era_summary::(&state).map_err(|_| Error::TipNotResolved)?; let timestamp = chain_summary.slot_time(slot) as u128 * 1000; let tip = tx3_cardano::ChainPoint { From e5ac5a8b4072d53572df5a514e354b5e407a9df3 Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Tue, 30 Sep 2025 14:33:42 -0300 Subject: [PATCH 10/11] fix: remove snapshot entry from .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0ca79c58..6aec506e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ tmp benches /data -/snapshot From efa9faee3f368370a853bca240a33e0473ae68f9 Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Thu, 6 Nov 2025 12:42:00 -0300 Subject: [PATCH 11/11] fix: add StateStore import in compiler module --- crates/trp/src/compiler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/trp/src/compiler.rs b/crates/trp/src/compiler.rs index 37585198..f487d4d9 100644 --- a/crates/trp/src/compiler.rs +++ b/crates/trp/src/compiler.rs @@ -1,7 +1,7 @@ use pallas::ledger::primitives::conway::CostModels; use std::collections::HashMap; -use dolos_core::{Domain, Genesis}; +use dolos_core::{Domain, Genesis, StateStore}; use crate::{Config, Error};