Skip to content

Commit c96600b

Browse files
authored
Enable BLS12-381 MSM builtins at PV11 (#7378)
1 parent fc78c36 commit c96600b

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
### Added
2+
3+
- The two BLS12-381 multi-scalar multiplication functions
4+
`bls12_381_G1_multiScalarMul` and `bls12_381_G2_multiScalarMul` will become
5+
available on the chain at Protocol Version 11 once a protocol parameter update
6+
has taken place to add the relevant cost model parameters.
7+

plutus-ledger-api/src/PlutusLedgerApi/Common/Versions.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,14 @@ batch5 =
215215
, Ripemd_160
216216
]
217217

218+
-- Add new builtins for release in PV11 here. Once PV11 has happened (by which
219+
-- time we should have replaced pv11PV by the real name), mark this as not to be
220+
-- changed and open a new batch.
218221
batch6 :: [DefaultFun]
219222
batch6 =
220223
[ ExpModInteger, DropList
221224
, LengthOfArray, ListToArray, IndexArray
225+
, Bls12_381_G1_multiScalarMul, Bls12_381_G2_multiScalarMul
222226
]
223227

224228
{-| Given a ledger language, return a map indicating which builtin functions were

plutus-ledger-api/testlib/PlutusLedgerApi/Test/V3/Data/EvaluationContext.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ clearBuiltinCostModel r = r
8888
, paramLengthOfArray = mempty
8989
, paramListToArray = mempty
9090
, paramIndexArray = mempty
91+
, paramBls12_381_G1_multiScalarMul = mempty
92+
, paramBls12_381_G2_multiScalarMul = mempty
9193
}
9294

9395

plutus-ledger-api/testlib/PlutusLedgerApi/Test/V3/EvaluationContext.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ clearBuiltinCostModel r = r
9595
, paramLengthOfArray = mempty
9696
, paramListToArray = mempty
9797
, paramIndexArray = mempty
98+
, paramBls12_381_G1_multiScalarMul = mempty
99+
, paramBls12_381_G2_multiScalarMul = mempty
98100
}
99101

100102

0 commit comments

Comments
 (0)