Skip to content

Commit 45cae06

Browse files
kozrosseffectfullymichaelpj
authored
SECP256k1 support (#4368)
* Initial core support for SECP256k1 verification * Add SECP256k1 builtins for plutus-tx * Ensure tests for SECP256k1 pass * Use upstream cardano-base again * Fix a semantic conflict, fix 'stack' * Use EvaluationResult instead of Identity for Emit tracing * Attempt to bump haskell.nix * Try bumping nixpkgs * Ensure everything builds with newer cardano-base * Schnorr verification builtin and tests * Rename old SECP builtin for clarity, add Schnorr builtin * Add note about sequencing, Emitter and EvaluationFailure * Aim at cardano-base master for Schnorr support * Ensure Windows can find libsecp256k1 * Fix parser * Remove unused import * Fix plugin * Fix extra * Fix Windows build issues, update to use new Emitter * Renumber builtins to avoid clashes * Ensure the SECP builtins are shown as available * Ensure plutus-tx-plugin names SECP builtins properly * Roll back deconstructorData2 golden test Co-authored-by: effectfully <effectfully@gmail.com> Co-authored-by: Michael Peyton Jones <michael.peyton-jones@iohk.io>
1 parent d8129e3 commit 45cae06

File tree

32 files changed

+1049
-390
lines changed

32 files changed

+1049
-390
lines changed

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ source-repository-package
4747
source-repository-package
4848
type: git
4949
location: https://github.com/input-output-hk/cardano-base
50-
tag: 0b1b5b37e305c4bb10791f843bc8c81686a0cba4
50+
tag: 1587462ac8b2e50af2691f5ad93d3c2aa4674ed1
5151
subdir:
5252
base-deriving-via
5353
binary

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/pkgs/haskell/haskell.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let
4343
inherit checkMaterialization;
4444
sha256map = {
4545
"https://github.com/Quid2/flat.git"."ee59880f47ab835dbd73bea0847dab7869fc20d8" = "1lrzknw765pz2j97nvv9ip3l1mcpf2zr4n56hwlz0rk7wq7ls4cm";
46-
"https://github.com/input-output-hk/cardano-base"."0b1b5b37e305c4bb10791f843bc8c81686a0cba4" = "1z98f3m4skmqy782dpcpd3y0k7hccdrz5yl1fjgjs524swh4vv56";
46+
"https://github.com/input-output-hk/cardano-base"."1587462ac8b2e50af2691f5ad93d3c2aa4674ed1" = "sha256-jrSDD2fXgHf4wo5THzfK/6tolvt8y9rNuJWYfBooqaQ=";
4747
"https://github.com/input-output-hk/cardano-crypto.git"."07397f0e50da97eaa0575d93bee7ac4b2b2576ec" = "06sdx5ndn2g722jhpicmg96vsrys89fl81k8290b3lr6b1b0w4m3";
4848
"https://github.com/input-output-hk/cardano-prelude"."fd773f7a58412131512b9f694ab95653ac430852" = "02jddik1yw0222wd6q0vv10f7y8rdgrlqaiy83ph002f9kjx7mh6";
4949
"https://github.com/input-output-hk/Win32-network"."3825d3abf75f83f406c1f7161883c438dac7277d" = "19wahfv726fa3mqajpqdqhnl9ica3xmf68i254q45iyjcpj1psqx";
@@ -86,6 +86,7 @@ let
8686
ln -s ${pkgs.buildPackages.gcc.cc}/x86_64-w64-mingw32/lib/libgcc_s_seh-1.dll $out/bin/libgcc_s_seh-1.dll
8787
ln -s ${pkgs.buildPackages.gcc.cc}/x86_64-w64-mingw32/lib/libstdc++-6.dll $out/bin/libstdc++-6.dll
8888
ln -s ${pkgs.windows.mcfgthreads}/bin/mcfgthread-12.dll $out/bin/mcfgthread-12.dll
89+
ln -s ${pkgs.secp256k1}/bin/libsecp256k1-0.dll $out/bin/libsecp256k1-0.dll
8990
'';
9091
in
9192
lib.mkIf (pkgs.stdenv.hostPlatform.isWindows) {

nix/pkgs/haskell/materialized-darwin/.plan.nix/cardano-crypto-class.nix

Lines changed: 20 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/pkgs/haskell/materialized-darwin/.plan.nix/cardano-crypto-tests.nix

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/pkgs/haskell/materialized-darwin/.plan.nix/plutus-core.nix

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/pkgs/haskell/materialized-darwin/.plan.nix/plutus-tx.nix

Lines changed: 47 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)