From c2a3fb06e30b671a0c35bf02a11e08f959d46fc4 Mon Sep 17 00:00:00 2001 From: Patrick McClurg Date: Fri, 26 Jan 2024 16:59:07 +0100 Subject: [PATCH 1/2] bumped version for release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b44213..cef08b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "drand-client", - "version": "1.2.1", + "version": "1.2.2", "description": "A client to the drand randomness beacon network.", "main": "index.js", "types": "index.d.ts", From eaf80fb0479ffd42928140833400e02b1b8533ce Mon Sep 17 00:00:00 2001 From: Patrick McClurg Date: Fri, 26 Jan 2024 17:10:34 +0100 Subject: [PATCH 2/2] added some additional error logging for invalid beacons --- lib/beacon-verification.ts | 2 ++ package-lock.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/beacon-verification.ts b/lib/beacon-verification.ts index c987162..d846f53 100644 --- a/lib/beacon-verification.ts +++ b/lib/beacon-verification.ts @@ -21,10 +21,12 @@ async function verifyBeacon(chainInfo: ChainInfo, beacon: RandomnessBeacon, expe const publicKey = chainInfo.public_key if (beacon.round !== expectedRound) { + console.error('round was not the expected round') return false } if (!await randomnessIsValid(beacon)) { + console.error('randomness did not match the signature') return false } diff --git a/package-lock.json b/package-lock.json index ed14f2b..2d36ea3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "drand-client", - "version": "1.2.1", + "version": "1.2.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "drand-client", - "version": "1.2.1", + "version": "1.2.2", "license": "(Apache-2.0 OR MIT)", "dependencies": { "@babel/traverse": "^7.23.2",