Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #130 from EspressoSystems/jb/update-hotshot
Browse files Browse the repository at this point in the history
Update HotShot 0.5.50
  • Loading branch information
jbearer authored May 7, 2024
2 parents e661421 + 001a9cb commit 569517e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 47 deletions.
63 changes: 27 additions & 36 deletions Cargo.lock

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

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hotshot-builder-core"
version = "0.1.17"
version = "0.1.18"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -16,10 +16,10 @@ clap = { version = "4.4", features = ["derive", "env"] }
committable = "0.2"
derivative = "2.2"
futures = "0.3"
hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.48" }
hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.48" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.18" }
hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.48" }
hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.50" }
hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.50" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.19" }
hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.50" }
serde = { version = "1.0", features = ["derive"] }
sha2 = "0.10"
snafu = "0.8"
Expand All @@ -30,4 +30,4 @@ tracing = "0.1"
vbs = "0.1"

[dev-dependencies]
hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.48" }
hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.50" }
7 changes: 3 additions & 4 deletions src/builder_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use hotshot_types::{
traits::{
block_contents::precompute_vid_commitment,
node_implementation::{ConsensusTime, NodeType},
states::InstanceState,
},
utils::BuilderCommitment,
vid::{VidCommitment, VidPrecomputeData},
Expand Down Expand Up @@ -181,7 +180,7 @@ pub struct BuilderState<TYPES: NodeType> {
pub base_fee: u64,

/// instance state to enfoce max_block_size
pub instance_state: Arc<dyn InstanceState>,
pub instance_state: Arc<TYPES::InstanceState>,
}

/// Trait to hold the helper functions for the builder
Expand Down Expand Up @@ -692,7 +691,7 @@ impl<TYPES: NodeType> BuilderProgress<TYPES> for BuilderState<TYPES> {
.get(tx_hash)
.map(|(_ts, tx, _source)| tx.clone())
}),
self.instance_state.clone(),
&self.instance_state,
) {
let builder_hash = payload.builder_commitment(&metadata);
// count the number of txns
Expand Down Expand Up @@ -969,7 +968,7 @@ impl<TYPES: NodeType> BuilderState<TYPES> {
buffer_view_num_count: u64,
maximize_txn_capture_timeout: Duration,
base_fee: u64,
instance_state: Arc<dyn InstanceState>,
instance_state: Arc<TYPES::InstanceState>,
) -> Self {
BuilderState {
timestamp_to_tx: BTreeMap::new(),
Expand Down
2 changes: 1 addition & 1 deletion src/testing/basic_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ mod tests {

let (block_payload, metadata) = <TestBlockPayload as BlockPayload>::from_transactions(
vec![tx.clone()],
Arc::new(TestInstanceState {}),
&TestInstanceState {},
)
.unwrap();

Expand Down

0 comments on commit 569517e

Please sign in to comment.