Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TRACKING] Labrador Release #2519

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
405 changes: 310 additions & 95 deletions Cargo.lock

Large diffs are not rendered by default.

40 changes: 26 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,24 @@ tokio = { version = "1", default-features = false, features = [
"sync",
] }

hotshot = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.84" }
hotshot = { git = "https://github.com/EspressoSystems/hotshot", branch = "release-labrador-debug-2" }
# Hotshot imports
hotshot-builder-api = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.84" }
hotshot-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.5.84" }
marketplace-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.5.84" }
marketplace-builder-shared = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.5.84" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.58" }
hotshot-orchestrator = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.84" }
hotshot-query-service = { git = "https://github.com/EspressoSystems/hotshot-query-service", tag = "v0.1.77" }
hotshot-stake-table = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.84" }
hotshot-builder-api = { git = "https://github.com/EspressoSystems/hotshot", branch = "release-labrador-debug-2" }
hotshot-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", branch = "release-labrador-debug-2" }
marketplace-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", branch = "release-labrador-debug-2" }
marketplace-builder-shared = { git = "https://github.com/EspressoSystems/marketplace-builder-core", branch = "release-labrador-debug-2" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", branch = "release-labrador-debug-2" }
hotshot-orchestrator = { git = "https://github.com/EspressoSystems/hotshot", branch = "release-labrador-debug-2" }
hotshot-query-service = { git = "https://github.com/EspressoSystems/hotshot-query-service", branch = "release-labrador-debug-2" }
hotshot-stake-table = { git = "https://github.com/EspressoSystems/hotshot", branch = "release-labrador-debug-2" }
hotshot-state-prover = { version = "0.1.0", path = "hotshot-state-prover" }
hotshot-task = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.84" }
hotshot-testing = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.84" }
hotshot-types = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.84" }
libp2p-networking = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.84" }
hotshot-task = { git = "https://github.com/EspressoSystems/hotshot", branch = "release-labrador-debug-2" }
hotshot-testing = { git = "https://github.com/EspressoSystems/hotshot", branch = "release-labrador-debug-2" }
hotshot-types = { git = "https://github.com/EspressoSystems/hotshot", branch = "release-labrador-debug-2" }
libp2p-networking = { git = "https://github.com/EspressoSystems/hotshot", branch = "release-labrador-debug-2" }
hotshot-contract-adapter = { version = "0.1.0", path = "contracts/rust/adapter" }
# Temporary, used to pull in the mock auction results provider
hotshot-example-types = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.84" }
hotshot-example-types = { git = "https://github.com/EspressoSystems/hotshot", branch = "release-labrador-debug-2" }

# Push CDN imports
cdn-broker = { git = "https://github.com/EspressoSystems/Push-CDN", tag = "0.5.1-upgrade", package = "cdn-broker" }
Expand Down Expand Up @@ -162,3 +162,15 @@ opt-level = 0
opt-level = 0
[profile.test.package.hotshot-state-prover]
opt-level = 3

# [patch."https://github.com/EspressoSystems/HotShot.git"]
# hotshot = { git = "https://www.github.com/EspressoSystems/HotShot.git", branch = "release-labrador-debug-2" }
# hotshot-builder-api = { git = "https://www.github.com/EspressoSystems/HotShot.git", branch = "release-labrador-debug-2" }
# hotshot-orchestrator = { git = "https://www.github.com/EspressoSystems/HotShot.git", branch = "release-labrador-debug-2" }
# hotshot-stake-table = { git = "https://www.github.com/EspressoSystems/HotShot.git", branch = "release-labrador-debug-2" }
# hotshot-task = { git = "https://www.github.com/EspressoSystems/HotShot.git", branch = "release-labrador-debug-2" }
# hotshot-task-impls = { git = "https://www.github.com/EspressoSystems/HotShot.git", branch = "release-labrador-debug-2" }
# hotshot-testing = { git = "https://www.github.com/EspressoSystems/HotShot.git", branch = "release-labrador-debug-2" }
# hotshot-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", branch = "release-labrador-debug-2" }
# libp2p-networking = { git = "https://github.com/EspressoSystems//HotShot.git", branch = "release-labrador-debug-2" }
# hotshot-example-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", branch = "release-labrador-debug-2" }
6 changes: 5 additions & 1 deletion builder/src/non_permissioned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ impl BuilderConfig {

let vid_commitment = {
let payload_bytes = genesis_payload.encode();
vid_commitment(&payload_bytes, GENESIS_VID_NUM_STORAGE_NODES)
vid_commitment::<V>(
&payload_bytes,
GENESIS_VID_NUM_STORAGE_NODES,
<V as Versions>::Base::VERSION,
)
};

// create the global state
Expand Down
5 changes: 3 additions & 2 deletions node-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = { workspace = true }
testing = ["serde_json", "espresso-types/testing"]

[dev-dependencies]
node-metrics = { path = ".", features = [ "testing" ] }
node-metrics = { path = ".", features = ["testing"] }

[dependencies]
async-lock = { workspace = true }
Expand All @@ -21,9 +21,9 @@ clap = { workspace = true }
espresso-types = { path = "../types" }
futures = { workspace = true }
hotshot = { workspace = true }
hotshot-example-types = { workspace = true }
hotshot-query-service = { workspace = true }
hotshot-stake-table = { workspace = true }
tokio = { workspace = true }

# Dependencies for feature `testing`
hotshot-types = { workspace = true }
Expand All @@ -34,6 +34,7 @@ serde_json = { version = "^1.0.113", optional = true }
surf-disco = { workspace = true }
tide-disco = { workspace = true }
time = { workspace = true }
tokio = { workspace = true }
toml = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
Expand Down
8 changes: 6 additions & 2 deletions node-metrics/src/service/client_state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,7 @@ pub mod tests {
channel::mpsc::{self, Sender},
SinkExt, StreamExt,
};
use hotshot_example_types::node_types::TestVersions;
use hotshot_types::{signature_key::BLSPubKey, traits::signature_key::SignatureKey};
use std::{sync::Arc, time::Duration};
use tokio::{
Expand Down Expand Up @@ -1371,10 +1372,12 @@ pub mod tests {
async fn test_process_client_handling_stream_request_latest_blocks_snapshot() {
use super::clone_block_detail;
use crate::service::data_state::create_block_detail_from_leaf;
use hotshot_example_types::node_types::TestVersions;

let (_, _, _, mut data_state) = create_test_data_state();
let client_thread_state = Arc::new(RwLock::new(create_test_client_thread_state()));
let leaf_1 = Leaf::genesis(&ValidatedState::default(), &NodeState::mock()).await;
let leaf_1 =
Leaf::genesis::<TestVersions>(&ValidatedState::default(), &NodeState::mock()).await;
let block_1 = create_block_detail_from_leaf(&leaf_1);
data_state.add_latest_block(clone_block_detail(&block_1));

Expand Down Expand Up @@ -1614,7 +1617,8 @@ pub mod tests {
// No response expected from the client messages at the moment.

// send a new leaf
let leaf = Leaf::genesis(&ValidatedState::default(), &NodeState::mock()).await;
let leaf =
Leaf::genesis::<TestVersions>(&ValidatedState::default(), &NodeState::mock()).await;
let expected_block = create_block_detail_from_leaf(&leaf);
let arc_expected_block = Arc::new(expected_block);

Expand Down
3 changes: 2 additions & 1 deletion node-metrics/src/service/data_state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ mod tests {
v0_99::ChainConfig, BlockMerkleTree, FeeMerkleTree, Leaf, NodeState, ValidatedState,
};
use futures::{channel::mpsc, SinkExt, StreamExt};
use hotshot_example_types::node_types::TestVersions;
use hotshot_types::{signature_key::BLSPubKey, traits::signature_key::SignatureKey};
use std::{sync::Arc, time::Duration};
use tokio::time::timeout;
Expand Down Expand Up @@ -627,7 +628,7 @@ mod tests {
};
let instance_state = NodeState::mock();

let sample_leaf = Leaf::genesis(&validated_state, &instance_state).await;
let sample_leaf = Leaf::genesis::<TestVersions>(&validated_state, &instance_state).await;

let mut leaf_sender = leaf_sender;
// We should be able to send a leaf without issue
Expand Down
37 changes: 21 additions & 16 deletions sequencer-sqlite/Cargo.lock

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

15 changes: 9 additions & 6 deletions sequencer/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1084,17 +1084,19 @@ mod api_tests {
};
use ethers::utils::Anvil;
use futures::{future, stream::StreamExt};
use hotshot_example_types::node_types::TestVersions;
use hotshot_query_service::availability::{
AvailabilityDataSource, BlockQueryData, VidCommonQueryData,
};

use hotshot_types::data::vid_disperse::ADVZDisperseShare;
use hotshot_types::{
data::{DaProposal, QuorumProposal2, QuorumProposalWrapper, VidDisperseShare},
data::{DaProposal, QuorumProposal2, QuorumProposalWrapper},
event::LeafInfo,
message::Proposal,
simple_certificate::QuorumCertificate,
traits::{node_implementation::ConsensusTime, signature_key::SignatureKey, EncodeBytes},
vid::vid_scheme,
vid::advz_scheme,
};

use jf_vid::VidScheme;
Expand Down Expand Up @@ -1269,10 +1271,10 @@ mod api_tests {
// Create two non-consecutive leaf chains.
let mut chain1 = vec![];

let genesis = Leaf::genesis(&Default::default(), &NodeState::mock()).await;
let genesis = Leaf::genesis::<TestVersions>(&Default::default(), &NodeState::mock()).await;
let payload = genesis.block_payload().unwrap();
let payload_bytes_arc = payload.encode();
let disperse = vid_scheme(2).disperse(payload_bytes_arc.clone()).unwrap();
let disperse = advz_scheme(2).disperse(payload_bytes_arc.clone()).unwrap();
let payload_commitment = disperse.commit;
let mut quorum_proposal = QuorumProposalWrapper::<SeqTypes> {
proposal: QuorumProposal2::<SeqTypes> {
Expand Down Expand Up @@ -1323,7 +1325,7 @@ mod api_tests {
.unwrap();

// Include VID information for each leaf.
let share = VidDisperseShare::<SeqTypes> {
let share = ADVZDisperseShare::<SeqTypes> {
view_number: leaf.view_number(),
payload_commitment,
share: disperse.shares[0].clone(),
Expand Down Expand Up @@ -1471,7 +1473,8 @@ mod api_tests {
)
.await
.to_qc2();
let leaf = Leaf::genesis(&ValidatedState::default(), &NodeState::mock()).await;
let leaf =
Leaf::genesis::<TestVersions>(&ValidatedState::default(), &NodeState::mock()).await;

// Append the genesis leaf. We don't use this for the test, because the update function will
// automatically fill in the missing data for genesis. We just append this to get into a
Expand Down
Loading
Loading