From d4207861667e9a713245e2dd1a3c1f726341f528 Mon Sep 17 00:00:00 2001 From: Dev Kalra Date: Thu, 14 Dec 2023 17:55:10 +0530 Subject: [PATCH] [entropy] audit: 7. Entropy providers may reveal seed before request is finalized (#1182) * check request at the most recent finalized block * update version --- fortuna/Cargo.lock | 2 +- fortuna/Cargo.toml | 2 +- fortuna/src/chain/ethereum.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fortuna/Cargo.lock b/fortuna/Cargo.lock index 6788f703..c61d4c72 100644 --- a/fortuna/Cargo.lock +++ b/fortuna/Cargo.lock @@ -1486,7 +1486,7 @@ dependencies = [ [[package]] name = "fortuna" -version = "2.0.0" +version = "2.0.1" dependencies = [ "anyhow", "axum", diff --git a/fortuna/Cargo.toml b/fortuna/Cargo.toml index a4979a87..9cfb6305 100644 --- a/fortuna/Cargo.toml +++ b/fortuna/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fortuna" -version = "2.0.0" +version = "2.0.1" edition = "2021" [dependencies] diff --git a/fortuna/src/chain/ethereum.rs b/fortuna/src/chain/ethereum.rs index 395098b9..9be25b2c 100644 --- a/fortuna/src/chain/ethereum.rs +++ b/fortuna/src/chain/ethereum.rs @@ -189,6 +189,7 @@ impl EntropyReader for PythContract { ) -> Result> { let r = self .get_request(provider_address, sequence_number) + .block(ethers::core::types::BlockNumber::Finalized) .call() .await?;