11use {
2- crate :: {
3- api:: ChainId ,
4- chain:: reader:: { BlockNumber , BlockStatus } ,
5- } ,
6- fortuna:: eth_utils:: utils:: EscalationPolicy ,
2+ crate :: { api:: ChainId , chain:: reader:: BlockStatus } ,
73 anyhow:: { anyhow, Result } ,
84 clap:: { crate_authors, crate_description, crate_name, crate_version, Args , Parser } ,
95 ethers:: types:: Address ,
6+ fortuna:: eth_utils:: utils:: EscalationPolicy ,
107 std:: { collections:: HashMap , fs} ,
118} ;
129pub use {
@@ -66,7 +63,7 @@ pub enum Options {
6663pub struct ConfigOptions {
6764 /// Path to a configuration file containing the list of supported blockchains
6865 #[ arg( long = "config" ) ]
69- #[ arg( env = "FORTUNA_CONFIG " ) ]
66+ #[ arg( env = "ARGUS_CONFIG " ) ]
7067 #[ arg( default_value = "config.yaml" ) ]
7168 pub config : String ,
7269}
@@ -117,12 +114,6 @@ pub struct EthereumConfig {
117114 /// Address of a Pyth Randomness contract to interact with.
118115 pub contract_addr : Address ,
119116
120- /// reveal_delay_blocks - The difference between the block number with the
121- /// confirmed_block_status(see below) and the block number of a request to
122- /// Entropy should be greater than `reveal_delay_blocks` for Fortuna to reveal
123- /// its commitment.
124- pub reveal_delay_blocks : BlockNumber ,
125-
126117 /// The BlockStatus of the block that is considered confirmed.
127118 /// For example, Finalized, Safe, Latest
128119 #[ serde( default ) ]
@@ -136,7 +127,6 @@ pub struct EthereumConfig {
136127 pub gas_limit : u64 ,
137128
138129 /// The percentage multiplier to apply to priority fee estimates (100 = no change, e.g. 150 = 150% of base fee)
139- #[ serde( default = "default_priority_fee_multiplier_pct" ) ]
140130 pub priority_fee_multiplier_pct : u64 ,
141131
142132 /// The escalation policy governs how the gas limit and fee are increased during backoff retries.
@@ -171,24 +161,6 @@ pub struct EthereumConfig {
171161 /// How much the provider charges for a request on this chain.
172162 #[ serde( default ) ]
173163 pub fee : u128 ,
174-
175- /// Maximum number of hashes to record in a request.
176- /// This should be set according to the maximum gas limit the provider supports for callbacks.
177- pub max_num_hashes : Option < u32 > ,
178-
179- /// A list of delays (in blocks) that indicates how many blocks should be delayed
180- /// before we process a block. For retry logic, we can process blocks multiple times
181- /// at each specified delay. For example: [5, 10, 20].
182- #[ serde( default = "default_block_delays" ) ]
183- pub block_delays : Vec < u64 > ,
184- }
185-
186- fn default_block_delays ( ) -> Vec < u64 > {
187- vec ! [ 5 ]
188- }
189-
190- fn default_priority_fee_multiplier_pct ( ) -> u64 {
191- 100
192164}
193165
194166#[ derive( Clone , Debug , serde:: Serialize , serde:: Deserialize ) ]
@@ -272,10 +244,6 @@ impl EscalationPolicyConfig {
272244/// Configuration values that are common to a single provider (and shared across chains).
273245#[ derive( Clone , Debug , serde:: Serialize , serde:: Deserialize ) ]
274246pub struct ProviderConfig {
275- /// The URI where clients can retrieve random values from this provider,
276- /// i.e., wherever fortuna for this provider will be hosted.
277- pub uri : String ,
278-
279247 /// The public key of the provider whose requests the server will respond to.
280248 pub address : Address ,
281249
0 commit comments