Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into ag/integration
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinI committed Oct 21, 2024
2 parents afb4cea + b959677 commit f479bd0
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 141 deletions.
121 changes: 34 additions & 87 deletions Cargo.lock

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

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ resolver = "2"
members = ["crates/*"]

[workspace.dependencies]
hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", rev = "1d48deec38979e2a7fd6b625c9d62554d4caae56" }
hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", rev = "1d48deec38979e2a7fd6b625c9d62554d4caae56" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.49" }
hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", rev = "1d48deec38979e2a7fd6b625c9d62554d4caae56" }
hotshot-macros = { git = "https://github.com/EspressoSystems/HotShot.git", rev = "1d48deec38979e2a7fd6b625c9d62554d4caae56" }
hotshot-task-impls = { git = "https://github.com/EspressoSystems/HotShot.git", rev = "1d48deec38979e2a7fd6b625c9d62554d4caae56" }
hotshot-testing = { git = "https://github.com/EspressoSystems/HotShot.git", rev = "1d48deec38979e2a7fd6b625c9d62554d4caae56" }
hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", rev = "1d48deec38979e2a7fd6b625c9d62554d4caae56" }
hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.50" }
hotshot-macros = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-task-impls = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-testing = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }
hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.78" }

anyhow = "1"
async-broadcast = "0.7"
Expand Down
14 changes: 7 additions & 7 deletions crates/legacy/src/builder_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub enum TransactionSource {
/// Decide Message to be put on the decide channel
#[derive(Clone, Debug)]
pub struct DecideMessage<Types: NodeType> {
pub latest_decide_view_number: Types::Time,
pub latest_decide_view_number: Types::View,
}
/// DA Proposal Message to be put on the da proposal channel
#[derive(Clone, Debug, PartialEq)]
Expand Down Expand Up @@ -108,7 +108,7 @@ pub enum Status {

#[derive(Debug, Clone, PartialEq)]
pub struct DAProposalInfo<Types: NodeType> {
pub view_number: Types::Time,
pub view_number: Types::View,
pub proposal: Arc<Proposal<Types, DaProposal<Types>>>,
pub num_nodes: usize,
}
Expand Down Expand Up @@ -141,12 +141,12 @@ pub struct BuilderState<Types: NodeType> {
/// `da_proposal_payload_commit` to (`da_proposal`, `node_count`)
#[allow(clippy::type_complexity)]
pub da_proposal_payload_commit_to_da_proposal:
HashMap<(BuilderCommitment, Types::Time), DAProposalInfo<Types>>,
HashMap<(BuilderCommitment, Types::View), DAProposalInfo<Types>>,

/// `quorum_proposal_payload_commit` to `quorum_proposal`
#[allow(clippy::type_complexity)]
pub quorum_proposal_payload_commit_to_quorum_proposal:
HashMap<(BuilderCommitment, Types::Time), Arc<Proposal<Types, QuorumProposal<Types>>>>,
HashMap<(BuilderCommitment, Types::View), Arc<Proposal<Types, QuorumProposal<Types>>>>,

/// Spawned-from references to the parent block.
pub parent_block_references: ParentBlockReferences<Types>,
Expand Down Expand Up @@ -199,7 +199,7 @@ pub struct BuilderState<Types: NodeType> {
/// a builder should stop producing empty blocks. This is done specifically
/// to allow for faster finalization of previous blocks that have had
/// transactions included in them.
pub allow_empty_block_until: Option<Types::Time>,
pub allow_empty_block_until: Option<Types::View>,
}

/// [`best_builder_states_to_extend`] is a utility function that is used to
Expand Down Expand Up @@ -678,7 +678,7 @@ impl<Types: NodeType> BuilderState<Types> {
.retain(|tx| self.txns_in_queue.contains(&tx.commit));

if !txn_commitments.is_empty() {
self.allow_empty_block_until = Some(Types::Time::new(
self.allow_empty_block_until = Some(Types::View::new(
da_proposal_info.view_number.u64() + ALLOW_EMPTY_BLOCK_PERIOD,
));
}
Expand Down Expand Up @@ -1195,7 +1195,7 @@ mod test {
// call process_da_proposal without matching quorum proposal message
// da_proposal_payload_commit_to_da_proposal should insert the message
let mut correct_da_proposal_payload_commit_to_da_proposal: HashMap<
(BuilderCommitment, <TestTypes as NodeType>::Time),
(BuilderCommitment, <TestTypes as NodeType>::View),
DAProposalInfo<TestTypes>,
> = HashMap::new();
let (payload_builder_commitment, da_proposal_info) =
Expand Down
Loading

0 comments on commit f479bd0

Please sign in to comment.