update cost models to epoch 638 and fix npm audit findings - #838
Open
lisicky wants to merge 1 commit into
Open
Conversation
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.
Cost models — epoch 638
The epoch-638 hard fork extended all three cost model lists and changed a few values. Ours were
the pre-fork ones:
Taken from Koios (mainnet, epoch 647), cross-checked against its
cli_protocol_paramsendpointand against preprod — all three agree. Our previous values match mainnet epoch 637 exactly,
which confirms the ordering and encoding are unchanged; only the data moved. The transition is
sharp at 638 (637 = old, 638 = new).
transaction's
script_data_hashto prove the new values end-to-end — I checked several recentblocks and none contained a Plutus transaction. The evidence is four agreeing sources plus
precedent (V3 already grew 251 → 297 by on-chain update, which this repo tracked in Dec 2024),
not a direct on-chain check. If you have a post-638 tx with scripts, that would settle it.
Test expectations
Cost models feed the script data hash, so
script-integrity-hashexpectations move with them.Those values are snapshots of our own output — nothing in the file documented that, which makes
"regenerate them" look circular.
So this also adds two tests that verify the language-view encoding against vectors quoted
verbatim from the Conway CDDL, including PlutusV1's two quirks (indefinite-length list wrapped in
a bytestring, language id encoded twice). Those vectors are independent of our implementation and
match byte-for-byte. With the encoding pinned, a cost model update only moves the input data, and
the snapshots can be regenerated with confidence. The file now says so.
npm audit — 17 → 12
Fixed:
tar(critical) — arbitrary file overwrite via hardlink path traversal.7.2.0→^7.5.22in
scripts/mesh-cli, not a major bump.brace-expansion(high ×2) — via an override to^2.1.3.js-yaml,linkify-it,postcss(high) —npm audit fix, all dev-only.Note
package-lock.jsonwas regenerated, hence the large diff.What is left, and why it cannot be fixed here
Six of the remaining twelve are one defect wearing five extra hats:
undiciis patched only in ≥6.23/6.24/6.27 depending on the advisory, and the 5.x line ends at5.29.0 with no backport. Every
connect-node1.x release pinsundici@^5.x, so bumping within1.x changes nothing.
connect-node2.x drops undici entirely and would fix it — but@utxorpc/sdkpinsconnect-node: 1.4exactly, in every published version including the latest0.8.2, and its
1.0.0-alpha.1still asks for^1.3.0. Forcing 2.x past that pin means abreaking connect-rpc API change in a production path with no integration coverage, so it would
fail silently rather than in CI.
The unblocking order is upstream:
@utxorpc/sdk→@meshsdk/provider→ the bump here.The other six are four dev-only
@vercel/style-guideentries (fix is a major downgrade to0.1.0),
ip-addressbehind@cardano-sdk/core, andesbuild, whichtsuppins.