bump `nim-stint` (#2969)

Upstream changes:
- Parsing should raise CatchableError for user inputs
- RangeError are actually defect and not catchable.
This commit is contained in:
Etan Kissling 2021-10-14 13:13:51 +02:00 committed by GitHub
parent 4a30003b07
commit 25a22fae5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -28,11 +28,10 @@ func makeInteropPrivKey*(i: int): ValidatorPrivKey =
var bytes: array[32, byte] var bytes: array[32, byte]
bytes[0..7] = uint64(i).toBytesLE() bytes[0..7] = uint64(i).toBytesLE()
# BLS381-12 curve order - same as milagro but formatted differently
const curveOrder =
u256"52435875175126190479447740508185965837690552500527637822603658699938581184513"
let let
# BLS381-12 curve order - same as milagro but formatted different
curveOrder =
"52435875175126190479447740508185965837690552500527637822603658699938581184513".parse(UInt256)
privkeyBytes = eth2digest(bytes) privkeyBytes = eth2digest(bytes)
key = (UInt256.fromBytesLE(privkeyBytes.data) mod curveOrder).toBytesBE() key = (UInt256.fromBytesLE(privkeyBytes.data) mod curveOrder).toBytesBE()
@ -55,4 +54,3 @@ func makeDeposit*(
if skipBLSValidation notin flags: if skipBLSValidation notin flags:
result.signature = preset.get_deposit_signature(result, privkey).toValidatorSig() result.signature = preset.get_deposit_signature(result, privkey).toValidatorSig()

2
vendor/nim-stint vendored

@ -1 +1 @@
Subproject commit 484031fdff38858ee661b0476dad44c13539c60e Subproject commit 49d11d61b824c1aa6ef16d4092fb3c27b21b0748