deploy: d16073695bbe70cddfee3ed89063b91bfd823d32

This commit is contained in:
LNSD 2022-08-26 21:42:34 +00:00
parent a1e6844588
commit fa965f83db
11 changed files with 51 additions and 10 deletions

View File

@ -2,7 +2,7 @@
# libtool - Provide generalized library-building support services.
# Generated automatically by config.status (libbacktrace) version-unused
# Libtool was configured on host fv-az196-571:
# Libtool was configured on host fv-az205-296:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,

View File

@ -150,10 +150,6 @@ jobs:
- name: Run tests
run: |
if [[ "${{ matrix.target.os }}" == "windows" ]]; then
# https://github.com/status-im/nimbus-eth2/issues/3121
export NIMFLAGS="-d:nimRawSetjmp"
fi
nim --version
nimble --version
nimble install -y --depsOnly

View File

@ -1,3 +1,5 @@
nimcache/
build/
nimble.develop
nimble.paths

4
vendor/nim-secp256k1/config.nims vendored Normal file
View File

@ -0,0 +1,4 @@
# begin Nimble config (version 1)
when fileExists("nimble.paths"):
include "nimble.paths"
# end Nimble config

5
vendor/nim-secp256k1/nim.cfg vendored Normal file
View File

@ -0,0 +1,5 @@
# Avoid some rare stack corruption while using exceptions with a SEH-enabled
# toolchain: https://github.com/status-im/nimbus-eth2/issues/3121
@if windows and not vcc:
--define:nimRawSetjmp
@end

25
vendor/nim-secp256k1/nimble.lock vendored Normal file
View File

@ -0,0 +1,25 @@
{
"version": 1,
"packages": {
"nimcrypto": {
"version": "0.5.4",
"vcsRevision": "a5742a9a214ac33f91615f3862c7b099aec43b00",
"url": "https://github.com/cheatfate/nimcrypto",
"downloadMethod": "git",
"dependencies": [],
"checksums": {
"sha1": "f76c87707cd4e96355b8bb6ef27e7f8b0aac1e08"
}
},
"stew": {
"version": "0.1.0",
"vcsRevision": "cdb1f213d073fd2ecbdaf35a866417657da9294c",
"url": "https://github.com/status-im/nim-stew",
"downloadMethod": "git",
"dependencies": [],
"checksums": {
"sha1": "3dd9e4ec78d906b59b6f9bcf74f5f8fa6b5c24fe"
}
}
}
}

View File

@ -12,7 +12,7 @@
import
strformat, typetraits,
stew/[byteutils, objects, results, ctops],
./secp256k1_abi
./secp256k1/abi
from nimcrypto/utils import burnMem
@ -21,7 +21,7 @@ export results
# Implementation notes
#
# The goal of this wrapper is to create a thin layer on top of the API presented
# in secp256k1_abi, exploiting some of its regulatities to make it slightly more
# in secp256k1/abi, exploiting some of its regulatities to make it slightly more
# convenient to use from Nim
#
# * Types like keys and signatures are guaranteed to hold valid values which
@ -372,6 +372,9 @@ func fromRaw*(T: type SkRecoverableSignature, data: openArray[byte]): SkResult[T
static(&"secp: recoverable signature must be {SkRawRecoverableSignatureSize} bytes"))
let recid = cint(data[64])
if recid < 0 or recid > 3:
return err("secp: recoverable signature's recid must be >= 0 and <= 3")
var sig {.noinit.}: secp256k1_ecdsa_recoverable_signature
if secp256k1_ecdsa_recoverable_signature_parse_compact(
secp256k1_context_no_precomp, addr sig, data.ptr0, recid) != 1:

View File

@ -5,7 +5,8 @@ version = "0.5.2"
author = "Status Research & Development GmbH"
description = "A wrapper for the libsecp256k1 C library"
license = "Apache License 2.0"
installDirs = @[".", "secp256k1_wrapper"]
skipDirs = @["tests"]
installDirs = @["secp256k1_wrapper"]
requires "nim >= 1.2.0"
requires "stew"

View File

@ -3,7 +3,7 @@ from os import DirSep, AltSep, quoteShell
const
wrapperPath = currentSourcePath.rsplit({DirSep, AltSep}, 1)[0] &
"/secp256k1_wrapper"
"/../secp256k1_wrapper"
internalPath = wrapperPath & "/secp256k1"
srcPath = internalPath & "/src"
secpSrc = srcPath & "/secp256k1.c"

5
vendor/nim-secp256k1/tests/nim.cfg vendored Normal file
View File

@ -0,0 +1,5 @@
# Avoid some rare stack corruption while using exceptions with a SEH-enabled
# toolchain: https://github.com/status-im/nimbus-eth2/issues/3121
@if windows and not vcc:
--define:nimRawSetjmp
@end

View File

@ -1,4 +1,4 @@
import ../secp256k1_abi, unittest
import ../secp256k1/abi, unittest
{.used.}