-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document and test the cost model file format
- Loading branch information
1 parent
250443a
commit 0498486
Showing
4 changed files
with
223 additions
and
182 deletions.
There are no files selected for viewing
This file contains 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
14 changes: 13 additions & 1 deletion
14
...-cli-golden/files/golden/errors/Cardano.CLI.Read.CostModelsError/CostModelsErrorEmpty.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
The decoded cost model was empty at: "some/file.txt" | ||
The decoded cost model was empty at: "some/file.txt" | ||
The expected format of the cost models file is | ||
{ | ||
"PlutusV1" : <costModel>, | ||
"PlutusV2" : <costModel>, | ||
"PlutusV3" : <costModel>, | ||
} | ||
where each of the three entries may be ommited, and a <cost model> is either an ordered list of parameter values like | ||
[205665, 812, 1, ...] | ||
or a map like | ||
{ "addInteger-cpu-arguments-intercept": 205665, "addInteger-cpu-arguments-slope": 812, "addInteger-memory-arguments-intercept": 1, ... } | ||
In both cases, the cost model must be complete, i.e. it must specify all parameters that are needed for the specific Plutus version. | ||
It's not specified what will happen if you provide more parameters than necessary. |
14 changes: 13 additions & 1 deletion
14
...golden/files/golden/errors/Cardano.CLI.Read.CostModelsError/CostModelsErrorJSONDecode.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
Error decoding JSON cost model at "some/file.txt": "some error" | ||
Error decoding JSON cost model at "some/file.txt": "some error" | ||
The expected format of the cost models file is | ||
{ | ||
"PlutusV1" : <costModel>, | ||
"PlutusV2" : <costModel>, | ||
"PlutusV3" : <costModel>, | ||
} | ||
where each of the three entries may be ommited, and a <cost model> is either an ordered list of parameter values like | ||
[205665, 812, 1, ...] | ||
or a map like | ||
{ "addInteger-cpu-arguments-intercept": 205665, "addInteger-cpu-arguments-slope": 812, "addInteger-memory-arguments-intercept": 1, ... } | ||
In both cases, the cost model must be complete, i.e. it must specify all parameters that are needed for the specific Plutus version. | ||
It's not specified what will happen if you provide more parameters than necessary. |
Oops, something went wrong.