Merge pull request #5692 from urbit/jb/upgrade-build

build: fix, upgrade dependencies
This commit is contained in:
Joe Bryan 2022-04-05 12:43:04 -04:00 committed by GitHub
commit 7cff021795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 196 additions and 109 deletions

View File

@ -41,8 +41,10 @@ on:
- 'pkg/ge-additions/**' - 'pkg/ge-additions/**'
- 'pkg/libaes_siv/**' - 'pkg/libaes_siv/**'
- 'pkg/urbit/**' - 'pkg/urbit/**'
- 'pkg/urcrypt/**'
- 'bin/**' - 'bin/**'
- 'nix/**' - 'nix/**'
- default.nix
pull_request: pull_request:
paths: paths:
- 'pkg/arvo/**' - 'pkg/arvo/**'
@ -51,8 +53,10 @@ on:
- 'pkg/ge-additions/**' - 'pkg/ge-additions/**'
- 'pkg/libaes_siv/**' - 'pkg/libaes_siv/**'
- 'pkg/urbit/**' - 'pkg/urbit/**'
- 'pkg/urcrypt/**'
- 'bin/**' - 'bin/**'
- 'nix/**' - 'nix/**'
- default.nix
jobs: jobs:
urbit: urbit:

View File

@ -3,7 +3,7 @@ name: release-docker
on: on:
release: null release: null
push: push:
tags: ['urbit-v*'] tags: 'urbit-v[0-9]+.[0-9]+'
jobs: jobs:
upload: upload:

View File

@ -109,7 +109,6 @@ let
urbit-debug = urbit.override { enableDebug = true; }; urbit-debug = urbit.override { enableDebug = true; };
urbit-tests = libLocal.testFakeShip { urbit-tests = libLocal.testFakeShip {
inherit herb;
inherit arvo; inherit arvo;
urbit = urbit-debug; urbit = urbit-debug;

View File

@ -1,6 +1,6 @@
{ lib, stdenvNoCC, cacert }: { lib, stdenvNoCC, curl }:
{ urbit, herb, arvo ? null, pill, ship, arguments ? [ "-l" ] }: { urbit, arvo ? null, pill, ship, arguments ? [ "-l" ] }:
let let
@ -10,16 +10,11 @@ let
in stdenvNoCC.mkDerivation { in stdenvNoCC.mkDerivation {
name = "fake-${ship}"; name = "fake-${ship}";
buildInputs = [ cacert urbit herb ]; buildInputs = [ curl urbit ];
phases = [ "buildPhase" "installPhase " ]; phases = [ "buildPhase" "installPhase " ];
buildPhase = '' buildPhase = ''
if ! [ -f "$SSL_CERT_FILE" ]; then
header "$SSL_CERT_FILE doesn't exist"
exit 1
fi
set -xeuo pipefail set -xeuo pipefail
urbit ${lib.concatStringsSep " " args} ./pier urbit ${lib.concatStringsSep " " args} ./pier
@ -34,13 +29,27 @@ in stdenvNoCC.mkDerivation {
trap cleanup EXIT trap cleanup EXIT
port=$(cat ./pier/.http.ports | grep loopback | tr -s ' ' '\n' | head -n 1)
lensd() {
curl -f -s \
--data "{\"source\":{\"dojo\":\"$1\"},\"sink\":{\"stdout\":null}}" \
"http://localhost:$port" | xargs printf %s | sed 's/\\n/\n/g'
}
lensa() {
curl -f -s \
--data "{\"source\":{\"dojo\":\"$2\"},\"sink\":{\"app\":\"$1\"}}" \
"http://localhost:$port" | xargs printf %s | sed 's/\\n/\n/g'
}
check () { check () {
[ 3 -eq "$(herb ./pier -d 3)" ] [ 3 -eq "$(lensd 3)" ]
} }
if check && sleep 10 && check; then if check && sleep 10 && check; then
header "boot success" header "boot success"
herb ./pier -p hood -d '+hood/exit' lensa hood '+hood/exit'
while [ -f ./pier/.vere.lock ]; do while [ -f ./pier/.vere.lock ]; do
echo "waiting for pier to shut down" echo "waiting for pier to shut down"
sleep 5 sleep 5
@ -48,8 +57,11 @@ in stdenvNoCC.mkDerivation {
else else
header "boot failure" header "boot failure"
kill $(< ./pier/.vere.lock) || true kill $(< ./pier/.vere.lock) || true
set +x
exit 1 exit 1
fi fi
set +x
''; '';
installPhase = '' installPhase = ''

View File

@ -1,16 +1,16 @@
{ lib, stdenvNoCC, cacert, python3, bootFakeShip }: { lib, stdenvNoCC, curl, python3, bootFakeShip }:
{ urbit, herb, arvo ? null, pill, ship ? "bus", arguments ? urbit.meta.arguments { urbit, arvo ? null, pill, ship ? "bus", arguments ? urbit.meta.arguments
, doCheck ? true }: , doCheck ? true }:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
name = "test-${ship}"; name = "test-${ship}";
src = bootFakeShip { inherit urbit herb arvo pill ship; }; src = bootFakeShip { inherit urbit arvo pill ship; };
phases = [ "unpackPhase" "buildPhase" "checkPhase" ]; phases = [ "unpackPhase" "buildPhase" "checkPhase" ];
buildInputs = [ cacert urbit herb python3 ]; buildInputs = [ curl python3 urbit ];
unpackPhase = '' unpackPhase = ''
cp -R $src ./pier cp -R $src ./pier
@ -26,6 +26,22 @@ stdenvNoCC.mkDerivation {
# See: https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959 # See: https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959
python3 -c $'import os\n[os.set_blocking(i, True) for i in range(3)]\n' python3 -c $'import os\n[os.set_blocking(i, True) for i in range(3)]\n'
port=$(cat ./pier/.http.ports | grep loopback | tr -s ' ' '\n' | head -n 1)
lensd() {
# -f elided, this can hit server-side timeouts
curl -s \
--data "{\"source\":{\"dojo\":\"$1\"},\"sink\":{\"stdout\":null}}" \
"http://localhost:$port" | xargs printf %s | sed 's/\\n/\n/g'
}
lensa() {
# -f elided, this can hit server-side timeouts
curl -s \
--data "{\"source\":{\"dojo\":\"$2\"},\"sink\":{\"app\":\"$1\"}}" \
"http://localhost:$port" | xargs printf %s | sed 's/\\n/\n/g'
}
tail -F urbit-output >&2 & tail -F urbit-output >&2 &
tailproc=$! tailproc=$!
@ -41,69 +57,69 @@ stdenvNoCC.mkDerivation {
# measure initial memory usage # measure initial memory usage
# #
herb ./pier -d '~& ~ ~& %init-mass-start ~' lensd '~& ~ ~& %init-mass-start ~'
herb ./pier -p hood -d '+hood/mass' lensa hood '+hood/mass'
herb ./pier -d '~& ~ ~& %init-mass-end ~' lensd '~& ~ ~& %init-mass-end ~'
# run the unit tests # run the unit tests
# #
herb ./pier -d '~& ~ ~& %test-unit-start ~' lensd '~& ~ ~& %test-unit-start ~'
herb ./pier -d '####-test %/tests ~' lensd '-test %/tests ~'
herb ./pier -d '~& ~ ~& %test-unit-end ~' lensd '~& ~ ~& %test-unit-end ~'
# use the :test app to build all agents, generators, and marks # use the :test app to build all agents, generators, and marks
# #
herb ./pier -p hood -d '+hood/start %test' lensa hood '+hood/start %test'
herb ./pier -d '~& ~ ~& %test-agents-start ~' lensd '~& ~ ~& %test-agents-start ~'
herb ./pier -p test -d '%agents' lensa test '%agents'
herb ./pier -d '~& ~ ~& %test-agents-end ~' lensd '~& ~ ~& %test-agents-end ~'
herb ./pier -d '~& ~ ~& %test-generators-start ~' lensd '~& ~ ~& %test-generators-start ~'
herb ./pier -p test -d '%generators' lensa test '%generators'
herb ./pier -d '~& ~ ~& %test-generators-end ~' lensd '~& ~ ~& %test-generators-end ~'
herb ./pier -d '~& ~ ~& %test-marks-start ~' lensd '~& ~ ~& %test-marks-start ~'
herb ./pier -p test -d '%marks' lensa test '%marks'
herb ./pier -d '~& ~ ~& %test-marks-end ~' lensd '~& ~ ~& %test-marks-end ~'
# measure memory usage post tests # measure memory usage post tests
# #
herb ./pier -d '~& ~ ~& %test-mass-start ~' lensd '~& ~ ~& %test-mass-start ~'
herb ./pier -p hood -d '+hood/mass' lensa hood '+hood/mass'
herb ./pier -d '~& ~ ~& %test-mass-end ~' lensd '~& ~ ~& %test-mass-end ~'
# defragment the loom # defragment the loom
# #
herb ./pier -d '~& ~ ~& %pack-start ~' lensd '~& ~ ~& %pack-start ~'
herb ./pier -p hood -d '+hood/pack' lensa hood '+hood/pack'
herb ./pier -d '~& ~ ~& %pack-end ~' lensd '~& ~ ~& %pack-end ~'
# reclaim space within arvo # reclaim space within arvo
# #
herb ./pier -d '~& ~ ~& %trim-start ~' lensd '~& ~ ~& %trim-start ~'
herb ./pier -p hood -d '+hood/trim' lensa hood '+hood/trim'
herb ./pier -d '~& ~ ~& %trim-end ~' lensd '~& ~ ~& %trim-end ~'
# measure memory usage pre |meld # measure memory usage pre |meld
# #
herb ./pier -d '~& ~ ~& %trim-mass-start ~' lensd '~& ~ ~& %trim-mass-start ~'
herb ./pier -p hood -d '+hood/mass' lensa hood '+hood/mass'
herb ./pier -d '~& ~ ~& %trim-mass-end ~' lensd '~& ~ ~& %trim-mass-end ~'
# globally deduplicate # globally deduplicate
# #
herb ./pier -d '~& ~ ~& %meld-start ~' lensd '~& ~ ~& %meld-start ~'
herb ./pier -p hood -d '+hood/meld' lensa hood '+hood/meld'
herb ./pier -d '~& ~ ~& %meld-end ~' lensd '~& ~ ~& %meld-end ~'
# measure memory usage post |meld # measure memory usage post |meld
# #
herb ./pier -d '~& ~ ~& %meld-mass-start ~' lensd '~& ~ ~& %meld-mass-start ~'
herb ./pier -p hood -d '+hood/mass' lensa hood '+hood/mass'
herb ./pier -d '~& ~ ~& %meld-mass-end ~' lensd '~& ~ ~& %meld-mass-end ~'
herb ./pier -p hood -d '+hood/exit' lensa hood '+hood/exit'
cleanup cleanup
@ -128,6 +144,8 @@ stdenvNoCC.mkDerivation {
mkdir -p $out mkdir -p $out
cp test-output-* $out/ cp test-output-* $out/
set +x
''; '';
checkPhase = '' checkPhase = ''
@ -168,6 +186,4 @@ stdenvNoCC.mkDerivation {
# Fix 'bind: operation not permitted' when nix.useSandbox = true on darwin. # Fix 'bind: operation not permitted' when nix.useSandbox = true on darwin.
# See https://github.com/NixOS/nix/blob/5f6840fbb49ae5b534423bd8a4360646ee93dbaf/src/libstore/build.cc#L2961 # See https://github.com/NixOS/nix/blob/5f6840fbb49ae5b534423bd8a4360646ee93dbaf/src/libstore/build.cc#L2961
__darwinAllowLocalNetworking = true; __darwinAllowLocalNetworking = true;
meta = { platforms = [ "x86_64-linux" ]; };
} }

View File

@ -1,4 +1,4 @@
{ lib, stdenvNoCC, fetchGitHubLFS, bootFakeShip, solid, urbit, arvo, herb { lib, stdenvNoCC, fetchGitHubLFS, bootFakeShip, solid, urbit, arvo, curl
, withRopsten ? false }: , withRopsten ? false }:
let let
@ -7,13 +7,13 @@ let
in { in {
build = import ./builder.nix { build = import ./builder.nix {
inherit stdenvNoCC urbit herb; inherit stdenvNoCC urbit curl;
name = "brass" + lib.optionalString withRopsten "-ropsten"; name = "brass" + lib.optionalString withRopsten "-ropsten";
builder = ./brass.sh; builder = ./brass.sh;
arvo = if withRopsten then arvo.ropsten else arvo; arvo = if withRopsten then arvo.ropsten else arvo;
pier = bootFakeShip { pier = bootFakeShip {
inherit urbit herb; inherit urbit;
pill = solid.lfs; pill = solid.lfs;
ship = "zod"; ship = "zod";

View File

@ -15,9 +15,26 @@ cleanup () {
trap cleanup EXIT trap cleanup EXIT
header "running herb +brass" header "running +brass"
herb ./pier -P brass.pill -d '+brass' port=$(cat ./pier/.http.ports | grep loopback | tr -s ' ' '\n' | head -n 1)
herb ./pier -p hood -d '+hood/exit'
lensa() {
# -f elided, this can hit server-side timeouts
curl -s \
--data "{\"source\":{\"dojo\":\"$2\"},\"sink\":{\"app\":\"$1\"}}" \
"http://localhost:$port" | xargs printf %s | sed 's/\\n/\n/g'
}
lensf() {
# -f elided, this can hit server-side timeouts
d=$(echo $1 | sed 's/\./\//g')
curl -sJO \
--data "{\"source\":{\"dojo\":\"$2\"},\"sink\":{\"output-pill\":\"$d\"}}" \
"http://localhost:$port"
}
lensf brass.pill '+brass'
lensa hood '+hood/exit'
stopNest stopNest

View File

@ -1,9 +1,9 @@
{ stdenvNoCC, urbit, arvo, herb, name, builder, pier }: { stdenvNoCC, urbit, arvo, curl, name, builder, pier }:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
name = "${name}.pill"; name = "${name}.pill";
src = pier; src = pier;
buildInputs = [ urbit herb ]; buildInputs = [ curl urbit ];
dontUnpack = true; dontUnpack = true;
buildPhase = builtins.readFile builder; buildPhase = builtins.readFile builder;

View File

@ -1,4 +1,4 @@
{ lib, stdenvNoCC, fetchGitHubLFS, bootFakeShip, solid, urbit, arvo, herb, xxd { lib, stdenvNoCC, fetchGitHubLFS, bootFakeShip, solid, urbit, arvo, curl, xxd
, withRopsten ? false }: , withRopsten ? false }:
let let
@ -7,13 +7,13 @@ let
in { in {
build = import ./builder.nix { build = import ./builder.nix {
inherit stdenvNoCC urbit herb; inherit stdenvNoCC urbit curl;
name = "ivory" + lib.optionalString withRopsten "-ropsten"; name = "ivory" + lib.optionalString withRopsten "-ropsten";
builder = ./ivory.sh; builder = ./ivory.sh;
arvo = if withRopsten then arvo.ropsten else arvo; arvo = if withRopsten then arvo.ropsten else arvo;
pier = bootFakeShip { pier = bootFakeShip {
inherit urbit herb; inherit urbit;
pill = solid.lfs; pill = solid.lfs;
ship = "zod"; ship = "zod";

View File

@ -15,9 +15,26 @@ cleanup () {
trap cleanup EXIT trap cleanup EXIT
header "running herb +ivory" header "running +ivory"
herb ./pier -P ivory.pill -d '+ivory' port=$(cat ./pier/.http.ports | grep loopback | tr -s ' ' '\n' | head -n 1)
herb ./pier -p hood -d '+hood/exit'
lensa() {
# -f elided, this can hit server-side timeouts
curl -s \
--data "{\"source\":{\"dojo\":\"$2\"},\"sink\":{\"app\":\"$1\"}}" \
"http://localhost:$port" | xargs printf %s | sed 's/\\n/\n/g'
}
lensf() {
# -f elided, this can hit server-side timeouts
d=$(echo $1 | sed 's/\./\//g')
curl -sJO \
--data "{\"source\":{\"dojo\":\"$2\"},\"sink\":{\"output-pill\":\"$d\"}}" \
"http://localhost:$port"
}
lensf ivory.pill '+ivory'
lensa hood '+hood/exit'
stopNest stopNest

View File

@ -1,4 +1,4 @@
{ stdenvNoCC, fetchGitHubLFS, bootFakeShip, solid, urbit, arvo, herb }: { stdenvNoCC, fetchGitHubLFS, bootFakeShip, solid, urbit, arvo, curl }:
let let
@ -8,12 +8,12 @@ in {
inherit lfs; inherit lfs;
build = import ./builder.nix { build = import ./builder.nix {
inherit stdenvNoCC urbit arvo herb; inherit stdenvNoCC urbit arvo curl;
name = "solid"; name = "solid";
builder = ./solid.sh; builder = ./solid.sh;
pier = bootFakeShip { pier = bootFakeShip {
inherit urbit herb; inherit urbit;
arvo = null; arvo = null;
pill = solid.lfs; pill = solid.lfs;

View File

@ -17,47 +17,68 @@ cleanup () {
trap cleanup EXIT trap cleanup EXIT
# Update pill strategy to ensure correct staging port=$(cat ./pier/.http.ports | grep loopback | tr -s ' ' '\n' | head -n 1)
herb ./pier -p hood -d "+hood/mount /=home="
until [ -d ./pier/home ]; do lensa() {
# -f elided, this can hit server-side timeouts
curl -s \
--data "{\"source\":{\"dojo\":\"$2\"},\"sink\":{\"app\":\"$1\"}}" \
"http://localhost:$port" | xargs printf %s | sed 's/\\n/\n/g'
}
lensf() {
# -f elided, this can hit server-side timeouts
d=$(echo $1 | sed 's/\./\//g')
curl -sJO \
--data "{\"source\":{\"dojo\":\"$2\"},\"sink\":{\"output-pill\":\"$d\"}}" \
"http://localhost:$port"
}
header "updating %base"
# Update pill strategy to ensure correct staging
lensa hood "+hood/mount /=base="
until [ -d ./pier/base ]; do
sleep 1 sleep 1
done done
# Update :lens, :dojo and dependencies # Update :lens, :dojo and dependencies
# FIXME: reduce this list # FIXME: reduce this list
cp $ARVO/app/lens.hoon ./pier/home/app/ cp $ARVO/app/lens.hoon ./pier/base/app/
cp $ARVO/app/dojo.hoon ./pier/home/app/ cp $ARVO/app/dojo.hoon ./pier/base/app/
cp $ARVO/lib/plume.hoon ./pier/home/lib/ cp $ARVO/lib/plume.hoon ./pier/base/lib/
cp $ARVO/lib/server.hoon ./pier/home/lib/ cp $ARVO/lib/server.hoon ./pier/base/lib/
cp $ARVO/lib/sole.hoon ./pier/home/lib/ cp $ARVO/lib/sole.hoon ./pier/base/lib/
cp $ARVO/lib/xray.hoon ./pier/home/lib/ cp $ARVO/lib/xray.hoon ./pier/base/lib/
cp $ARVO/lib/pprint.hoon ./pier/home/lib/ cp $ARVO/lib/pprint.hoon ./pier/base/lib/
mkdir -p ./pier/home/mar/lens/ mkdir -p ./pier/base/mar/lens/
cp $ARVO/mar/lens/* ./pier/home/mar/lens/ cp $ARVO/mar/lens/* ./pier/base/mar/lens/
cp $ARVO/sur/lens.hoon ./pier/home/sur/ cp $ARVO/sur/lens.hoon ./pier/base/sur/
cp $ARVO/sur/plum.hoon ./pier/home/sur/ cp $ARVO/sur/plum.hoon ./pier/base/sur/
cp $ARVO/sur/sole.hoon ./pier/home/sur/ cp $ARVO/sur/sole.hoon ./pier/base/sur/
cp $ARVO/sur/xray.hoon ./pier/home/sur/ cp $ARVO/sur/xray.hoon ./pier/base/sur/
# Update +solid and its dependencies # Update +solid and its dependencies
cp $ARVO/lib/pill.hoon ./pier/home/lib/ cp $ARVO/lib/pill.hoon ./pier/base/lib/
cp $ARVO/gen/solid.hoon ./pier/home/gen/ cp $ARVO/gen/solid.hoon ./pier/base/gen/
chmod -R u+rw ./pier/home/ chmod -R u+rw ./pier/base/
herb ./pier -p hood -d "+hood/commit %home" lensa hood "+hood/commit %base"
herb ./pier -p hood -d "+hood/unmount %home" lensa hood "+hood/unmount %base"
# FIXME: horrible hack to ensure the update is applied first # FIXME: horrible hack to ensure the update is applied first
sleep 10 sleep 10
header "updating %stage"
# Stage new desk for pill contents # Stage new desk for pill contents
herb ./pier -p hood -d '+hood/merge %stage our %home' lensa hood '+hood/merge %stage our %base'
herb ./pier -p hood -d "+hood/mount /=stage=" lensa hood "+hood/mount /=stage="
until [ -d ./pier/stage ]; do until [ -d ./pier/stage ]; do
sleep 1 sleep 1
@ -67,9 +88,12 @@ rm -rf ./pier/stage
cp -r $ARVO ./pier/stage cp -r $ARVO ./pier/stage
chmod -R u+rw ./pier/stage chmod -R u+rw ./pier/stage
herb ./pier -p hood -d "+hood/commit %stage" lensa hood "+hood/commit %stage"
herb ./pier -p hood -d "+hood/unmount %stage" lensa hood "+hood/unmount %stage"
herb ./pier -P solid.pill -d '+solid /=stage=/sys, =dub &'
herb ./pier -p hood -d '+hood/exit' header "running +solid"
lensf solid.pill '+solid /=stage=/sys, =dub &'
lensa hood '+hood/exit'
stopNest stopNest

View File

@ -16,7 +16,7 @@ let
# See https://github.com/urbit/urbit/issues/5561 # See https://github.com/urbit/urbit/issues/5561
oFlags = oFlags =
if stdenv.hostPlatform.system == "aarch64-darwin" if stdenv.isDarwin
then (if enableDebug then [ "-O0" "-g" ] else [ "-O3" ]) then (if enableDebug then [ "-O0" "-g" ] else [ "-O3" ])
else [ (if enableDebug then "-O0" else "-O3") "-g" ]; else [ (if enableDebug then "-O0" else "-O3") "-g" ];

View File

@ -43,10 +43,10 @@
"prepare": "./autogen.sh && ./configure --disable-shared --enable-benchmark=no --enable-exhaustive-tests=no --enable-experimental --enable-module-ecdh --enable-module-recovery --enable-module-schnorrsig --enable-tests=yes CFLAGS=-DSECP256K1_API=" "prepare": "./autogen.sh && ./configure --disable-shared --enable-benchmark=no --enable-exhaustive-tests=no --enable-experimental --enable-module-ecdh --enable-module-recovery --enable-module-schnorrsig --enable-tests=yes CFLAGS=-DSECP256K1_API="
}, },
"repo": "secp256k1", "repo": "secp256k1",
"rev": "7973576f6e3ab27d036a09397152b124d747f4ae", "rev": "5dcc6f8dbdb1850570919fc9942d22f728dbc0af",
"sha256": "0vjk55dv0mkph4k6bqgkykmxn05ngzvhc4rzjnvn33xzi8dzlvah", "sha256": "x9qG2S6tBSRseWaFIN9N2fRpY1vkv8idT3d3rfJnmaU",
"type": "tarball", "type": "tarball",
"url": "https://github.com/bitcoin-core/secp256k1/archive/7973576f6e3ab27d036a09397152b124d747f4ae.tar.gz", "url": "https://github.com/bitcoin-core/secp256k1/archive/5dcc6f8dbdb1850570919fc9942d22f728dbc0af.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}, },
"uv": { "uv": {

View File

@ -73,15 +73,15 @@
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}, },
"nixpkgs": { "nixpkgs": {
"branch": "nixos-21.11", "branch": "master",
"description": "Nix Packages collection", "description": "Nix Packages collection",
"homepage": "", "homepage": "",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "573095944e7c1d58d30fc679c81af63668b54056", "rev": "376d67e1cd05d5ac8a64a3f47f17b80fb6394792",
"sha256": "07s5cwhskqvy82b4rld9b14ljc0013pig23i3jx3l3f957rk95pg", "sha256": "1l4ai1dppwdbkkjbvnavsivr5kx00b3q8640pilpnifskfmfc8mp",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/573095944e7c1d58d30fc679c81af63668b54056.tar.gz", "url": "https://github.com/NixOS/nixpkgs/archive/376d67e1cd05d5ac8a64a3f47f17b80fb6394792.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}, },
"softfloat3": { "softfloat3": {

View File

@ -215,9 +215,7 @@ urcrypt_secp_schnorr_sign(urcrypt_secp_context* context,
if ( 1 != secp256k1_keypair_create(context->secp, &keypair, key) ) { if ( 1 != secp256k1_keypair_create(context->secp, &keypair, key) ) {
return -1; return -1;
} }
if ( 1 != secp256k1_schnorrsig_sign(context->secp, out_sig, msg, &keypair, if ( 1 != secp256k1_schnorrsig_sign(context->secp, out_sig, msg, &keypair, aux) ) {
secp256k1_nonce_function_bip340, aux) )
{
return -1; return -1;
} }
@ -240,7 +238,7 @@ urcrypt_secp_schnorr_veri(urcrypt_secp_context* context,
if ( 1 != secp256k1_xonly_pubkey_parse(context->secp, &pubkey, pub) ) { if ( 1 != secp256k1_xonly_pubkey_parse(context->secp, &pubkey, pub) ) {
return false; return false;
} }
if ( 1 != secp256k1_schnorrsig_verify(context->secp, sig, msg, &pubkey) ) { if ( 1 != secp256k1_schnorrsig_verify(context->secp, sig, msg, 32, &pubkey) ) {
return false; return false;
} }
return true; return true;