UPLC-CAPE: Network profiles measure and report submissions per network
@Unisay がすでに取り組んでいます。
2026年11月25日 から。
評価
この issue はまだ評価されていません。
説明
CAPE measures every submission with the cost model built into the linked plutus-core (1.63) and passes no protocol version. A network profile makes the network explicit: a named set of data (protocol version, cost-model parameters and the other protocol parameters CAPE's numbers depend on) under which every measurement and every report page is computed. This issue makes the profile an entity of the domain model and of the report, and implements the design recorded in ADR 20260526, Refinement 5, "If a network gets ahead of mainnet".
Profile
A profile is data in the repository, one file per profile. A sketch of the type:
data NetworkProfile = NetworkProfile
{ profileName :: Text -- for example "mainnet-pv11", "preview"
, profileNetwork :: Network -- Mainnet | Preview
, profileStatus :: ProfileStatus -- Past | Current | Future
, profileProtocolVersion :: MajorProtocolVersion
, profileCostModelV3 :: [Int64] -- in on-chain order
, profileParameters :: ProtocolParameters -- prices, ref-script fee, tx limits
, profileSource :: ProfileSource -- OnChain EpochNo | Projected
, profileActiveFrom :: Maybe (EpochNo, Day) -- hard fork on this network; Nothing if not yet
}
ProtocolParameters is a new record for the values that are top-level constants in lib/Cape/Protocol/Parameters.hs today. A typical set is mainnet at its previous, current and next protocol version, plus Preview while it runs ahead of mainnet. A past or current profile copies its values from the chain at a named epoch. A future profile has no on-chain values yet, so it takes the parameters that plutus-core ships for its protocol version and is marked as projected.
Measurement
Every evaluation takes a profile, which replaces runCekDeBruijn defaultCekParametersForTesting in lib/Cape/PrettyResult.hs:
- Each script is decoded with
deserialiseScriptat the profile's protocol version. A builtin that the version does not allow is rejected here. - Validators run through
PlutusLedgerApi.V3.evaluateScriptCounting, with an evaluation context thatmkEvaluationContextbuilds from the profile's cost model. - Scenarios that return a value, such as
fibonacci, run on the CEK machine with machine parameters from the same profile. Before that, they need the UPLC version check that the ledger does separately (plcVersionsAvailableIn).
When a profile does not admit a submission, CAPE records the submission as not executable on that profile. This result is kept apart from a test that is expected to fail.
Report
Each profile gets its own report under its own URL (for example profiles/mainnet-pv11/): rankings, scenario pages and the evolution view, all computed from that profile's measurements. The current mainnet profile is the default. A submission appears in every profile that admits it, and each profile lists the submissions it does not admit. A submission keeps one artifact; only its cost changes from one profile to another.
A timeline page puts the profiles of each network in order: the protocol version, the epoch and date it took effect, and a link to its report. A visitor can follow how mainnet changed and see which profile was in force on a given date. A future profile sits at the end of its network's line, marked as projected.
Upgrades
A newer plutus-core keeps the behaviour of earlier protocol versions, so an upgrade should leave every profile's results and budgets unchanged. CI compares them per profile before and after the upgrade. This replaces the current rule that an evaluator upgrade re-measures every submission.
Open questions
- How
metrics.jsonstores results per profile, and how the schema change treats existing submissions. - How profile values are refreshed from the chain, and when a future profile becomes the current one.
- Whether aggregates compare profiles with each other or stay within one profile.
Out of scope: a different compiler per profile. The compiler decides what the program is, and the profile decides what it costs.
- 主要言語
- Untyped Plutus Core
- スター
- 12
- フォーク
- 10
- 平均マージ
- 2日 5時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
IntersectMBO/UPLC-CAPE のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
IntersectMBO/UPLC-CAPE#279 ·
-
UPLC-CAPE: ScriptContextBuilder: placeholder values the ledger never produces再び着手できるかも @Unisay が 30 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンUPLC-CAPE
IntersectMBO/UPLC-CAPE#273 · 担当者 1 名 ·
-
UPLC-CAPE: ScriptContextBuilder: build TxInfo in the ledger's order再び着手できるかも @Unisay が 30 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンUPLC-CAPE
IntersectMBO/UPLC-CAPE#271 · 担当者 1 名 ·
-
Add a programmable-tokens (CIP-113) benchmark scenario再び着手できるかも @Unisay が 152 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンUPLC-CAPE
IntersectMBO/UPLC-CAPE#228 · 担当者 1 名 ·
-
Add synthetic benchmark scenarios for common Value operations再び着手できるかも @Unisay が 152 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンUPLC-CAPE
IntersectMBO/UPLC-CAPE#227 · 担当者 1 名 ·