Browse Source

[entropy] audit: 7. Entropy providers may reveal seed before request is finalized (#1182)

* check request at the most recent finalized block

* update version
Dev Kalra 1 year ago
parent
commit
d420786166
3 changed files with 3 additions and 2 deletions
  1. 1 1
      fortuna/Cargo.lock
  2. 1 1
      fortuna/Cargo.toml
  3. 1 0
      fortuna/src/chain/ethereum.rs

+ 1 - 1
fortuna/Cargo.lock

@@ -1486,7 +1486,7 @@ dependencies = [
 
 [[package]]
 name = "fortuna"
-version = "2.0.0"
+version = "2.0.1"
 dependencies = [
  "anyhow",
  "axum",

+ 1 - 1
fortuna/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name    = "fortuna"
-version = "2.0.0"
+version = "2.0.1"
 edition = "2021"
 
 [dependencies]

+ 1 - 0
fortuna/src/chain/ethereum.rs

@@ -189,6 +189,7 @@ impl EntropyReader for PythContract {
     ) -> Result<Option<reader::Request>> {
         let r = self
             .get_request(provider_address, sequence_number)
+            .block(ethers::core::types::BlockNumber::Finalized)
             .call()
             .await?;