Skip to content

Commit

Permalink
SECP256k1 support (IntersectMBO#4368)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people committed Apr 25, 2022
1 parent b3b9278 commit edffc62
Show file tree
Hide file tree
Showing 32 changed files with 1,049 additions and 390 deletions.
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: 0b1b5b37e305c4bb10791f843bc8c81686a0cba4
tag: 1587462ac8b2e50af2691f5ad93d3c2aa4674ed1
subdir:
base-deriving-via
binary
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion nix/pkgs/haskell/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let
inherit checkMaterialization;
sha256map = {
"https://github.com/Quid2/flat.git"."ee59880f47ab835dbd73bea0847dab7869fc20d8" = "1lrzknw765pz2j97nvv9ip3l1mcpf2zr4n56hwlz0rk7wq7ls4cm";
"https://github.com/input-output-hk/cardano-base"."0b1b5b37e305c4bb10791f843bc8c81686a0cba4" = "1z98f3m4skmqy782dpcpd3y0k7hccdrz5yl1fjgjs524swh4vv56";
"https://github.com/input-output-hk/cardano-base"."1587462ac8b2e50af2691f5ad93d3c2aa4674ed1" = "sha256-jrSDD2fXgHf4wo5THzfK/6tolvt8y9rNuJWYfBooqaQ=";
"https://github.com/input-output-hk/cardano-crypto.git"."07397f0e50da97eaa0575d93bee7ac4b2b2576ec" = "06sdx5ndn2g722jhpicmg96vsrys89fl81k8290b3lr6b1b0w4m3";
"https://github.com/input-output-hk/cardano-prelude"."fd773f7a58412131512b9f694ab95653ac430852" = "02jddik1yw0222wd6q0vv10f7y8rdgrlqaiy83ph002f9kjx7mh6";
"https://github.com/input-output-hk/Win32-network"."3825d3abf75f83f406c1f7161883c438dac7277d" = "19wahfv726fa3mqajpqdqhnl9ica3xmf68i254q45iyjcpj1psqx";
Expand Down Expand Up @@ -86,6 +86,7 @@ let
ln -s ${pkgs.buildPackages.gcc.cc}/x86_64-w64-mingw32/lib/libgcc_s_seh-1.dll $out/bin/libgcc_s_seh-1.dll
ln -s ${pkgs.buildPackages.gcc.cc}/x86_64-w64-mingw32/lib/libstdc++-6.dll $out/bin/libstdc++-6.dll
ln -s ${pkgs.windows.mcfgthreads}/bin/mcfgthread-12.dll $out/bin/mcfgthread-12.dll
ln -s ${pkgs.secp256k1}/bin/libsecp256k1-0.dll $out/bin/libsecp256k1-0.dll
'';
in
lib.mkIf (pkgs.stdenv.hostPlatform.isWindows) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 47 additions & 46 deletions nix/pkgs/haskell/materialized-darwin/.plan.nix/plutus-tx.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit edffc62

Please sign in to comment.