From 25a22fae5f0e6316f0999bce5b401faa40404367 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Thu, 14 Oct 2021 13:13:51 +0200 Subject: [PATCH] bump `nim-stint` (#2969) Upstream changes: - Parsing should raise CatchableError for user inputs - RangeError are actually defect and not catchable. --- beacon_chain/interop.nim | 8 +++----- vendor/nim-stint | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/beacon_chain/interop.nim b/beacon_chain/interop.nim index d6f85545b..306083068 100644 --- a/beacon_chain/interop.nim +++ b/beacon_chain/interop.nim @@ -28,11 +28,10 @@ func makeInteropPrivKey*(i: int): ValidatorPrivKey = var bytes: array[32, byte] bytes[0..7] = uint64(i).toBytesLE() + # BLS381-12 curve order - same as milagro but formatted differently + const curveOrder = + u256"52435875175126190479447740508185965837690552500527637822603658699938581184513" let - # BLS381-12 curve order - same as milagro but formatted different - curveOrder = - "52435875175126190479447740508185965837690552500527637822603658699938581184513".parse(UInt256) - privkeyBytes = eth2digest(bytes) key = (UInt256.fromBytesLE(privkeyBytes.data) mod curveOrder).toBytesBE() @@ -55,4 +54,3 @@ func makeDeposit*( if skipBLSValidation notin flags: result.signature = preset.get_deposit_signature(result, privkey).toValidatorSig() - diff --git a/vendor/nim-stint b/vendor/nim-stint index 484031fdf..49d11d61b 160000 --- a/vendor/nim-stint +++ b/vendor/nim-stint @@ -1 +1 @@ -Subproject commit 484031fdff38858ee661b0476dad44c13539c60e +Subproject commit 49d11d61b824c1aa6ef16d4092fb3c27b21b0748