Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Cuts the provider calls
MeshTxBuilder.complete()makes, and fixes two builds that could not complete at all.Contents
mesh-transaction(MeshTxBuilder):evaluateRedeemersskipsevaluateTxand the serialization before it when nothing is witnessed by a Plutus script. Before, it ran once per coin-selection cost estimate on every transaction, including plain ADA sends.selectUtxosFromUTxOs,inputForEvaluationUTxOs andchainTxoutputs.fetchUTxOsis called only for hashes still unknown.complete()retries it instead of failing with "Couldn't find value information".fetchCostModelsruns alongside the UTxO fetches instead of before them.scriptSize. Before,simpleScriptTxInReferencewithout a hash and size crashed withTypeError: Cannot read properties of undefined (reading 'find'). Native-script inputs given by reference only are now completed too.scriptRefwhen the fetcher does not returnscriptHash(e.g.ScalusEmulator).clone()shares the fetched UTxO cache instead of deep-copying it for every coin-selection callback.mesh-core-cst(OfflineEvaluatorScalus) andmesh-core-csl(OfflineEvaluator):evaluateTxcalls, since tx outputs never change, and distinct hashes are fetched in parallel. The builder calls the evaluator once per coin-selection round, so each round used to refetch every input, collateral and reference input.OfflineEvaluatorno longer appends resolved UTxOs to the caller'sadditionalUtxosarray.Provider calls, before → after
Measured with
ScalusEmulatorbehind a call-recording proxy (provider-calls.test.ts):evaluatorsetevaluateTx×1 (×1+k with extra selection rounds)chainTxoutput given as hash/indexfetchUTxOsfor an unsubmitted hash, then "Couldn't find value information"OfflineEvaluatorScalusfetchUTxOs×4OfflineEvaluator, same tx evaluated twicefetchUTxOs×10No public API changes. The protected
getUTxOInfo/queryAllTxInfokeep their signatures.Validation
mesh-transaction: 156 tests pass, including the newprovider-calls.test.ts.script-tx-fetcherandscript-tx-failfail to load under--experimental-vm-modulesonmaintoo, because they importdistthroughrequire. Both pass without the flag.mesh-core-cst(179 tests) andmesh-scalus-emulator(24 tests) pass.mesh-core-csl/test/offline-providers/evaluator.test.tsthe new fetch assertions pass. Four budget assertions in that file already fail onmain: expectedstepsdiffer after the cost-model update (e.g. 164980381 vs 164973765).