Skip to content

Commit

Permalink
update hotshot query service to 0.1.26
Browse files Browse the repository at this point in the history
  • Loading branch information
imabdulbasit committed May 29, 2024
1 parent 95b349e commit 3a99991
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git",
hotshot-builder-core = { git = "https://github.com/EspressoSystems/hotshot-builder-core", tag = "0.1.23" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.23" }
hotshot-orchestrator = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.55" }
hotshot-query-service = { git = "https://github.com/EspressoSystems/hotshot-query-service", tag = "0.1.25" }
hotshot-query-service = { git = "https://github.com/EspressoSystems/hotshot-query-service", tag = "0.1.26" }
hotshot-stake-table = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.55" }
hotshot-state-prover = { version = "0.1.0", path = "hotshot-state-prover" }
hotshot-task = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.55" }
Expand Down
1 change: 1 addition & 0 deletions sequencer/api/public-env-vars.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ variables = [
"ESPRESSO_SEQUENCER_API_PEERS",
"ESPRESSO_SEQUENCER_API_PORT",
"ESPRESSO_SEQUENCER_CDN_ENDPOINT",
"ESPRESSO_SEQUENCER_FETCH_RATE_LIMIT",
"ESPRESSO_SEQUENCER_HOTSHOT_ADDRESS",
"ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_PORT",
"ESPRESSO_SEQUENCER_IS_DA",
Expand Down
10 changes: 9 additions & 1 deletion sequencer/src/api/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,20 @@ impl SequencerDataSource for DataSource {
type Options = Options;

async fn create(opt: Self::Options, provider: Provider, reset: bool) -> anyhow::Result<Self> {
let fetch_limit = opt.fetch_rate_limit;
let mut cfg = Config::try_from(opt)?;

if reset {
cfg = cfg.reset_schema();
}

Ok(cfg.connect(provider).await?)
let mut builder = cfg.builder(provider).await?;

if let Some(limit) = fetch_limit {
builder = builder.with_rate_limit(limit);
}

builder.build().await
}
}

Expand Down
4 changes: 4 additions & 0 deletions sequencer/src/persistence/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ pub struct Options {

#[clap(long, env = "ESPRESSO_SEQUENCER_STORE_UNDECIDED_STATE", hide = true)]
pub(crate) store_undecided_state: bool,

// Specifies the maximum number of concurrent fetch requests allowed from peers.
#[clap(long, env = "ESPRESSO_SEQUENCER_FETCH_RATE_LIMIT", hide = true)]
pub(crate) fetch_rate_limit: Option<usize>,
}

impl TryFrom<Options> for Config {
Expand Down

0 comments on commit 3a99991

Please sign in to comment.