Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Benchmark Implementation Notes

**Scenario**: `factorial_naive_recursion`

**Submission ID**: `Scalus_0.17.0_Unisay_vanrossem`

## Implementation Details

- **Compiler**: `Scalus 0.17.0`
- **Implementation Approach**: `naive recursive`
- **Compilation Flags**: `Options.release.copy(targetProtocolVersion = MajorProtocolVersion.vanRossemPV)`
- **Track**: preview (`min_plutus_version = 1.60.0.0`)

## Performance Results

- See [metrics.json](metrics.json) for detailed performance measurements

## Source Code

- See [source/README.md](source/README.md) for source code and reproducibility instructions

## Notes

Same naive-recursive Scalus 0.17.0 source as the current-track `Scalus_0.17.0_Unisay/` submission, recompiled with the van Rossem target protocol version to enable `case-on-builtins` and batch-6 builtins. Invalid on mainnet until the van Rossem hard fork (Cardano protocol version 11) activates — projected late-June 2026.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
(program
1.1.0
[
(lam
a-0
[
(lam b-1 [ a-0 (lam c-2 [ [ b-1 b-1 ] c-2 ]) ])
(lam b-1 [ a-0 (lam c-2 [ [ b-1 b-1 ] c-2 ]) ])
]
)
(lam
d-3
(lam
e-4
(case
[ [ (builtin lessThanEqualsInteger) e-4 ] (con integer 0) ]
[
[ (builtin multiplyInteger) e-4 ]
[ d-3 [ [ (builtin subtractInteger) e-4 ] (con integer 1) ] ]
]
(con integer 1)
)
)
)
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compiler": {
"name": "Scalus",
"version": "0.17.0",
"commit_hash": "553d4d420166d87efad7220ce288e0961cfe17c0"
},
"compilation_config": {
"optimization_level": "Scalus",
"target": "uplc",
"flags": ["Scalus", "vanRossem"],
"min_plutus_version": "1.60.0.0"
},
"contributors": [
{
"name": "Unisay",
"organization": "Intersect MBO"
}
],
"submission": {
"date": "2026-05-06T12:00:00Z",
"source_available": true,
"source_repository": "https://github.com/Unisay/scalus-cape-submissions",
"source_commit_hash": "becb41d62cb2832001de1541ff2dcde0d3ac92c6",
"implementation_notes": "Preview submission targeting the van Rossem hard fork (Cardano protocol version 11, projected late-June 2026). Same naive-recursive Scalus 0.17.0 source as the corresponding current-track Scalus_0.17.0_Unisay/ submission, recompiled with `Options.release.copy(targetProtocolVersion = MajorProtocolVersion.vanRossemPV)`, which enables `case-on-builtins` and batch-6 builtins (e.g. `dropList`). Evaluated on `PlutusVM.makePlutusV3VM(MajorProtocolVersion.vanRossemPV)` against the same input as `cape-tests.json`. Invalid on mainnet until the hard fork activates; routed to the preview report via `min_plutus_version = 1.60.0.0`."
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"evaluations": [
{
"cpu_units": 347937,
"description": "Factorial of 0 should return 1 (mathematical definition)",
"execution_result": "success",
"memory_units": 2001,
"name": "factorial_0"
},
{
"cpu_units": 999935,
"description": "Factorial of 1 should return 1",
"execution_result": "success",
"memory_units": 4606,
"name": "factorial_1"
},
{
"cpu_units": 1651933,
"description": "Factorial of 2 should return 2",
"execution_result": "success",
"memory_units": 7211,
"name": "factorial_2"
},
{
"cpu_units": 2303931,
"description": "Factorial of 3 should return 6",
"execution_result": "success",
"memory_units": 9816,
"name": "factorial_3"
},
{
"cpu_units": 2955929,
"description": "Factorial of 4 should return 24",
"execution_result": "success",
"memory_units": 12421,
"name": "factorial_4"
},
{
"cpu_units": 3607927,
"description": "Factorial of 5 should return 120",
"execution_result": "success",
"memory_units": 15026,
"name": "factorial_5"
},
{
"cpu_units": 5563921,
"description": "Factorial of 8 should return 40320",
"execution_result": "success",
"memory_units": 22841,
"name": "factorial_8"
},
{
"cpu_units": 6867917,
"description": "Factorial of 10 should return 3628800 (original benchmark target)",
"execution_result": "success",
"memory_units": 28051,
"name": "factorial_10"
},
{
"cpu_units": 8171913,
"description": "Factorial of 12 should return 479001600",
"execution_result": "success",
"memory_units": 33261,
"name": "factorial_12"
},
{
"cpu_units": 347937,
"description": "Factorial of negative number should return 1 based on current implementation (n <= 0 case)",
"execution_result": "success",
"memory_units": 2001,
"name": "factorial_negative"
}
],
"execution_environment": {
"evaluator": "PlutusTx.Eval-1.52.0.0"
},
"measurements": {
"block_cpu_budget_pct": 0.0204297825,
"block_memory_budget_pct": 0.05364677419354839,
"cpu_units": {
"maximum": 8171913,
"median": 2629930,
"minimum": 347937,
"sum": 32819280,
"sum_negative": 0,
"sum_positive": 32819280
},
"execution_fee_lovelace": 10285,
"memory_units": {
"maximum": 33261,
"median": 11118,
"minimum": 2001,
"sum": 137235,
"sum_negative": 0,
"sum_positive": 137235
},
"reference_script_fee_lovelace": 690,
"script_size_bytes": 46,
"scripts_per_block": 1864,
"scripts_per_tx": 420,
"term_size": 41,
"total_fee_lovelace": 10975,
"tx_cpu_budget_pct": 0.08171913,
"tx_memory_budget_pct": 0.23757857142857144
},
"scenario": "factorial_naive_recursion",
"timestamp": "2026-05-06T13:50:26Z",
"version": "1.0.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Scalus Factorial Naive Recursion Implementation (vanRossem preview)

**Source Code**: [FactorialNaiveRecursion.scala](https://github.com/Unisay/scalus-cape-submissions/blob/becb41d62cb2832001de1541ff2dcde0d3ac92c6/src/factorial_naive_recursion/FactorialNaiveRecursion.scala)

**Repository**: <https://github.com/Unisay/scalus-cape-submissions>

**Commit**: `becb41d62cb2832001de1541ff2dcde0d3ac92c6`

**Path**: `src/factorial_naive_recursion/FactorialNaiveRecursion.scala`

The Scala source is identical to the current-track `Scalus_0.17.0_Unisay/` submission. The difference is in the compile command: this preview artifact is produced with `Options.release.copy(targetProtocolVersion = MajorProtocolVersion.vanRossemPV)`, which enables `case-on-builtins` and batch-6 builtins (e.g. `dropList`). The same `@main factorial_naive_recursion.compileFactorialNaiveRecursion` writes both the current-track and the vanRossem artifact in one run.

The output is invalid on mainnet until the van Rossem hard fork (Cardano protocol version 11) activates — projected late-June 2026.

## Reproducing the Compilation

1. Clone the repository:

```bash
git clone https://github.com/Unisay/scalus-cape-submissions
cd scalus-cape-submissions
```

2. Check out the specific commit:

```bash
git checkout becb41d62cb2832001de1541ff2dcde0d3ac92c6
```

3. Run the @main object:

```bash
sbt 'runMain factorial_naive_recursion.compileFactorialNaiveRecursion'
```

4. The compiled UPLC output should match `factorial.uplc` in this submission (it is written to `src/factorial_naive_recursion/factorial-vanrossem.uplc` upstream).

For detailed build instructions and environment setup, see the repository README.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Benchmark Implementation Notes

**Scenario**: `fibonacci_naive_recursion`

**Submission ID**: `Scalus_0.17.0_Unisay_vanrossem`

## Implementation Details

- **Compiler**: `Scalus 0.17.0`
- **Implementation Approach**: `naive recursive`
- **Compilation Flags**: `Options.release.copy(targetProtocolVersion = MajorProtocolVersion.vanRossemPV)`
- **Track**: preview (`min_plutus_version = 1.60.0.0`)

## Performance Results

- See [metrics.json](metrics.json) for detailed performance measurements

## Source Code

- See [source/README.md](source/README.md) for source code and reproducibility instructions

## Notes

Same naive-recursive Scalus 0.17.0 source as the current-track `Scalus_0.17.0_Unisay/` submission, recompiled with the van Rossem target protocol version to enable `case-on-builtins` and batch-6 builtins. Invalid on mainnet until the van Rossem hard fork (Cardano protocol version 11) activates — projected late-June 2026.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
(program
1.1.0
[
(lam
a-0
[
(lam b-1 [ a-0 (lam c-2 [ [ b-1 b-1 ] c-2 ]) ])
(lam b-1 [ a-0 (lam c-2 [ [ b-1 b-1 ] c-2 ]) ])
]
)
(lam
d-3
(lam
e-4
(case
[ [ (builtin lessThanEqualsInteger) e-4 ] (con integer 1) ]
(case
[ [ (builtin equalsInteger) e-4 ] (con integer 2) ]
[
[
(builtin addInteger)
[ d-3 [ [ (builtin subtractInteger) e-4 ] (con integer 1) ] ]
]
[ d-3 [ [ (builtin subtractInteger) e-4 ] (con integer 2) ] ]
]
(con integer 1)
)
e-4
)
)
)
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compiler": {
"name": "Scalus",
"version": "0.17.0",
"commit_hash": "553d4d420166d87efad7220ce288e0961cfe17c0"
},
"compilation_config": {
"optimization_level": "Scalus",
"target": "uplc",
"flags": ["Scalus", "vanRossem"],
"min_plutus_version": "1.60.0.0"
},
"contributors": [
{
"name": "Unisay",
"organization": "Intersect MBO"
}
],
"submission": {
"date": "2026-05-06T12:00:00Z",
"source_available": true,
"source_repository": "https://github.com/Unisay/scalus-cape-submissions",
"source_commit_hash": "becb41d62cb2832001de1541ff2dcde0d3ac92c6",
"implementation_notes": "Preview submission targeting the van Rossem hard fork (Cardano protocol version 11, projected late-June 2026). Same naive-recursive Scalus 0.17.0 source as the corresponding current-track Scalus_0.17.0_Unisay/ submission, recompiled with `Options.release.copy(targetProtocolVersion = MajorProtocolVersion.vanRossemPV)`, which enables `case-on-builtins` and batch-6 builtins (e.g. `dropList`). Evaluated on `PlutusVM.makePlutusV3VM(MajorProtocolVersion.vanRossemPV)` against the same input as `cape-tests.json`. Invalid on mainnet until the hard fork activates; routed to the preview report via `min_plutus_version = 1.60.0.0`."
}
}
Loading
Loading