Skip to content

Commit

Permalink
update merkle trees
Browse files Browse the repository at this point in the history
  • Loading branch information
imabdulbasit committed Apr 10, 2024
1 parent 71d680e commit 246292f
Show file tree
Hide file tree
Showing 6 changed files with 176 additions and 81 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ toml = "0.8"
url = "2.3"
vbs = "0.1"
zeroize = "1.7"
committable = "0.2"
portpicker = "0.1.1"
hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.34" }
hotshot-builder-core = { git = "https://github.com/EspressoSystems/hotshot-builder-core", branch = "abdul/update-deps" }
10 changes: 5 additions & 5 deletions builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,29 @@ async-std = { workspace = true }
async-trait = { workspace = true }
clap = { workspace = true }
cld = { workspace = true }
committable = "0.2"
dotenvy = { workspace = true }
es-version = { workspace = true }
ethers = { workspace = true }
futures = { workspace = true }
hotshot = { workspace = true }
hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.34" }
hotshot-builder-core = { git = "https://github.com/EspressoSystems/hotshot-builder-core", branch = "abdul/update-deps" }
hotshot-builder-api = { workspace = true }
hotshot-builder-core = { workspace = true }
hotshot-events-service = { workspace = true }
hotshot-orchestrator = { workspace = true }
hotshot-stake-table = { workspace = true }
hotshot-state-prover = { path = "../hotshot-state-prover" }
hotshot-types = { workspace = true }
jf-primitives = { workspace = true }
portpicker = "0.1.1"
rand = "0.8.5"
sequencer = { path = "../sequencer", features = ["testing"] }
serde = { workspace = true }
snafu = { workspace = true }
surf = "2.3.1"
surf-disco = { workspace = true }
tagged-base64 = "0.4"
tagged-base64 = { workspace = true }
tide-disco = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
vbs = { workspace = true }
committable = { workspace = true}
portpicker = { workspace = true }
6 changes: 3 additions & 3 deletions sequencer/src/api/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{
context::SequencerContext,
network,
persistence::{self, SequencerPersistence},
state::{update_state_storage, BlockMerkleTree, FeeMerkleTree},
state::{update_state_storage_loop, BlockMerkleTree, FeeMerkleTree},
};
use anyhow::bail;
use async_std::sync::{Arc, RwLock};
Expand Down Expand Up @@ -320,8 +320,8 @@ impl Options {
.await?;

context.spawn(
"merklized state storage updater",
update_state_storage(Arc::new(RwLock::new(ds)), context.node_state()),
"merklized state storage update loop",
update_state_storage_loop(ds, context.node_state()),
);

context.spawn(
Expand Down
3 changes: 1 addition & 2 deletions sequencer/src/bin/nasty-client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ use surf_disco::{error::ClientError, socket, Url};
use tide_disco::{error::ServerError, App};
use time::OffsetDateTime;
use toml::toml;
use vbs::version::StaticVersion;

/// An adversarial stress test for sequencer APIs.
#[derive(Clone, Debug, Parser)]
Expand Down Expand Up @@ -774,7 +773,7 @@ async fn serve(port: u16, metrics: PrometheusMetrics) {
METHOD = "METRICS"
};
let mut app = App::<_, ServerError>::with_state(RwLock::new(metrics));
app.module::<ServerError, StaticVersion<0, 1>>("status", api)
app.module::<ServerError, SequencerVersion>("status", api)
.unwrap()
.metrics("metrics", |_req, state| {
async move { Ok(Cow::Borrowed(state)) }.boxed()
Expand Down
2 changes: 1 addition & 1 deletion sequencer/src/block/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl<TableWord: TableWordTraits> Payload<TableWord> {
ns_id: NamespaceId,
vid_common: VidCommon,
) -> Option<NamespaceProof> {
if self.raw_payload.len() as u32 != VidSchemeType::get_payload_byte_len(&vid_common) {
if self.raw_payload.len() != VidSchemeType::get_payload_byte_len(&vid_common) as usize {
return None; // error: vid_common inconsistent with self
}

Expand Down
Loading

0 comments on commit 246292f

Please sign in to comment.