From c1e403d95124d0ede2171b695c92d67c36e29904 Mon Sep 17 00:00:00 2001 From: ImJeremyHe Date: Thu, 5 Sep 2024 16:48:21 +0800 Subject: [PATCH 01/12] Use the marketplace builder in dev node --- sequencer/src/bin/espresso-dev-node.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sequencer/src/bin/espresso-dev-node.rs b/sequencer/src/bin/espresso-dev-node.rs index f5172b607..8a2654c50 100644 --- a/sequencer/src/bin/espresso-dev-node.rs +++ b/sequencer/src/bin/espresso-dev-node.rs @@ -4,7 +4,7 @@ use async_std::task::spawn; use async_trait::async_trait; use clap::Parser; use contract_bindings::light_client_mock::LightClientMock; -use espresso_types::{parse_duration, MockSequencerVersions}; +use espresso_types::{parse_duration, MarketplaceVersion, SequencerVersions}; use ethers::{ middleware::{MiddlewareBuilder, SignerMiddleware}, providers::{Http, Middleware, Provider}, @@ -188,7 +188,11 @@ async fn main() -> anyhow::Result<()> { .network_config(network_config) .build(); - let network = TestNetwork::new(config, MockSequencerVersions::new()).await; + let network = TestNetwork::new( + config, + SequencerVersions::::new(), + ) + .await; let st = network.cfg.stake_table(); let total_stake = st.total_stake(SnapshotVersion::LastEpochStart).unwrap(); let config = network.cfg.hotshot_config(); From a6c9ae4d3782fd9597b2a6f18260830370415258 Mon Sep 17 00:00:00 2001 From: ImJeremyHe Date: Fri, 6 Sep 2024 11:48:06 +0800 Subject: [PATCH 02/12] Fix the builder url --- sequencer/src/api.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sequencer/src/api.rs b/sequencer/src/api.rs index 1645028ec..7d3c8e8ad 100644 --- a/sequencer/src/api.rs +++ b/sequencer/src/api.rs @@ -529,14 +529,13 @@ pub mod test_helpers { ) -> Self { let mut cfg = cfg; let mut builder_tasks = Vec::new(); - let mut legacy_builder_url = "http://example.com".parse().unwrap(); let mut marketplace_builder_url = "http://example.com".parse().unwrap(); if ::Base::VERSION < MarketplaceVersion::VERSION { let (task, url) = run_test_builder::<{ NUM_NODES }>(cfg.network_config.builder_port()).await; builder_tasks.push(task); - legacy_builder_url = url; + cfg.network_config.set_builder_urls(vec1::vec1![url]); }; if ::Upgrade::VERSION >= MarketplaceVersion::VERSION @@ -549,12 +548,11 @@ pub mod test_helpers { ) .await; builder_tasks.push(task); + cfg.network_config + .set_builder_urls(vec1::vec1![url.clone()]); marketplace_builder_url = url; } - cfg.network_config - .set_builder_urls(vec1::vec1![legacy_builder_url]); - let mut nodes = join_all( izip!(cfg.state, cfg.persistence, cfg.catchup) .enumerate() From 5f5c638d94fe0cfd99dfce640873de191eeff429 Mon Sep 17 00:00:00 2001 From: ImJeremyHe Date: Fri, 6 Sep 2024 13:39:01 +0800 Subject: [PATCH 03/12] Fix the marketplace builder port --- sequencer/src/bin/espresso-dev-node.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer/src/bin/espresso-dev-node.rs b/sequencer/src/bin/espresso-dev-node.rs index 8a2654c50..4626ac79e 100644 --- a/sequencer/src/bin/espresso-dev-node.rs +++ b/sequencer/src/bin/espresso-dev-node.rs @@ -177,7 +177,7 @@ async fn main() -> anyhow::Result<()> { .unwrap(); let network_config = TestConfigBuilder::default() - .builder_port(builder_port) + .marketplace_builder_port(builder_port) .state_relay_url(relay_server_url.clone()) .l1_url(l1_url.clone()) .build(); From 55100dc6ccfdf1c4269b005ade302f926c7f2d2e Mon Sep 17 00:00:00 2001 From: ImJeremyHe Date: Fri, 6 Sep 2024 14:40:46 +0800 Subject: [PATCH 04/12] Fix the test marketplace builder listener --- sequencer/src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sequencer/src/lib.rs b/sequencer/src/lib.rs index 63c286c8e..2bac12870 100644 --- a/sequencer/src/lib.rs +++ b/sequencer/src/lib.rs @@ -575,7 +575,14 @@ pub mod testing { .into_app() .expect("Failed to create builder tide-disco app"); - async_spawn(app.serve(url.clone(), MarketplaceVersion::instance())); + async_spawn( + app.serve( + format!("http://0.0.0.0:{port}") + .parse::() + .expect("Failed to parse builder listener"), + MarketplaceVersion::instance(), + ), + ); ( Box::new(MarketplaceBuilderImplementation { hooks, senders }), From 2d383b2070ae78aa01356fe66c45da3633382bf0 Mon Sep 17 00:00:00 2001 From: ImJeremyHe Date: Tue, 10 Sep 2024 14:07:20 +0800 Subject: [PATCH 05/12] WIP --- sequencer/src/bin/espresso-dev-node.rs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/sequencer/src/bin/espresso-dev-node.rs b/sequencer/src/bin/espresso-dev-node.rs index 4626ac79e..6c2bd4c43 100644 --- a/sequencer/src/bin/espresso-dev-node.rs +++ b/sequencer/src/bin/espresso-dev-node.rs @@ -190,7 +190,7 @@ async fn main() -> anyhow::Result<()> { let network = TestNetwork::new( config, - SequencerVersions::::new(), + SequencerVersions::::new(), ) .await; let st = network.cfg.stake_table(); @@ -320,6 +320,7 @@ async fn main() -> anyhow::Result<()> { let dev_info = DevInfo { builder_url: network.cfg.hotshot_config().builder_urls[0].clone(), + sequencer_api_port, l1_prover_port, l1_url, l1_light_client_address: l1_lc, @@ -470,6 +471,7 @@ async fn run_dev_node_server = Client::new(format!("http://localhost:{api_port}").parse().unwrap()); api_client.connect(None).await; @@ -601,18 +605,18 @@ mod tests { Client::new(format!("http://localhost:{builder_port}").parse().unwrap()); builder_api_client.connect(None).await; - let builder_address = builder_api_client - .get::("block_info/builderaddress") - .send() - .await - .unwrap(); + // let builder_address = builder_api_client + // .get::("block_info/builderaddress") + // .send() + // .await + // .unwrap(); - assert!(!builder_address.is_empty()); + // assert!(!builder_address.is_empty()); let tx = Transaction::new(100_u32.into(), vec![1, 2, 3]); - let hash: Commitment = api_client - .post("submit/submit") + let hash: Commitment = builder_api_client + .post("txn_submit/submit") .body_json(&tx) .unwrap() .send() @@ -628,8 +632,10 @@ mod tests { )) .send() .await; + tracing::warn!("waiting for tx???????"); while tx_result.is_err() { sleep(Duration::from_secs(1)).await; + tracing::warn!("waiting for tx"); tx_result = api_client .get::>(&format!( From e06dd834aee20264adf162a409df57b0782b1c4d Mon Sep 17 00:00:00 2001 From: ImJeremyHe Date: Fri, 13 Sep 2024 11:08:28 +0800 Subject: [PATCH 06/12] Cleanup --- sequencer/src/bin/espresso-dev-node.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/sequencer/src/bin/espresso-dev-node.rs b/sequencer/src/bin/espresso-dev-node.rs index 0e702573e..6579ee123 100644 --- a/sequencer/src/bin/espresso-dev-node.rs +++ b/sequencer/src/bin/espresso-dev-node.rs @@ -551,8 +551,7 @@ mod tests { let api_port = pick_unused_port().unwrap(); - // let dev_node_port = pick_unused_port().unwrap(); - let dev_node_port = 20000; + let dev_node_port = pick_unused_port().unwrap(); let instance = AnvilOptions::default().spawn().await; let l1_url = instance.url(); @@ -585,7 +584,6 @@ mod tests { let process = BackgroundProcess(process); - tracing::info!("connectingmmmmmmmm"); let api_client: Client = Client::new(format!("http://localhost:{api_port}").parse().unwrap()); api_client.connect(None).await; @@ -605,14 +603,6 @@ mod tests { Client::new(format!("http://localhost:{builder_port}").parse().unwrap()); builder_api_client.connect(None).await; - // let builder_address = builder_api_client - // .get::("block_info/builderaddress") - // .send() - // .await - // .unwrap(); - - // assert!(!builder_address.is_empty()); - let tx = Transaction::new(100_u32.into(), vec![1, 2, 3]); let hash: Commitment = builder_api_client @@ -632,7 +622,6 @@ mod tests { )) .send() .await; - tracing::warn!("waiting for tx???????"); while tx_result.is_err() { sleep(Duration::from_secs(1)).await; tracing::warn!("waiting for tx"); From dae071bf41dccd58248c5019e5315b876baf6c81 Mon Sep 17 00:00:00 2001 From: ImJeremyHe Date: Fri, 13 Sep 2024 14:23:34 +0800 Subject: [PATCH 07/12] Update the marketplace builder --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a5b1accd0..68fe846f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6182,7 +6182,7 @@ dependencies = [ [[package]] name = "marketplace-builder-core" version = "0.1.47" -source = "git+https://github.com/EspressoSystems/marketplace-builder-core?tag=0.1.47#526782bbe1b04d76c0b931b00cd266017089c20b" +source = "git+https://github.com/EspressoSystems/marketplace-builder-core?branch=ab/update-module-path#f6c715d3e038bfcca784c85cf639be661040fea6" dependencies = [ "anyhow", "async-broadcast", diff --git a/Cargo.toml b/Cargo.toml index 1ff7677e6..89079bf06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ hotshot = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.74", # Hotshot imports hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.74" } hotshot-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.1.47" } -marketplace-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.1.47" } +marketplace-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", branch = "ab/update-module-path" } hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.46" } hotshot-orchestrator = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.74" } hotshot-query-service = { git = "https://github.com/EspressoSystems/hotshot-query-service", tag = "0.1.57" } From aa0cb2cca92c86803718005c1473f6fe407cb195 Mon Sep 17 00:00:00 2001 From: Abdul Basit Date: Fri, 13 Sep 2024 12:15:32 +0500 Subject: [PATCH 08/12] change version and builder key --- sequencer/src/api.rs | 2 +- sequencer/src/bin/espresso-dev-node.rs | 9 +++------ sequencer/src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/sequencer/src/api.rs b/sequencer/src/api.rs index 95c41a039..64c3609ff 100644 --- a/sequencer/src/api.rs +++ b/sequencer/src/api.rs @@ -543,7 +543,7 @@ pub mod test_helpers { { let (task, url) = run_marketplace_builder::<{ NUM_NODES }>( cfg.network_config.marketplace_builder_port(), - NodeState::default(), + NodeState::default().with_current_version(V::Base::VERSION), cfg.state[0].clone(), ) .await; diff --git a/sequencer/src/bin/espresso-dev-node.rs b/sequencer/src/bin/espresso-dev-node.rs index 6579ee123..83e666d46 100644 --- a/sequencer/src/bin/espresso-dev-node.rs +++ b/sequencer/src/bin/espresso-dev-node.rs @@ -4,7 +4,7 @@ use async_std::task::spawn; use async_trait::async_trait; use clap::Parser; use contract_bindings::light_client_mock::LightClientMock; -use espresso_types::{parse_duration, MarketplaceVersion, SequencerVersions}; +use espresso_types::{parse_duration, MarketplaceVersion, SequencerVersions, V0_1}; use ethers::{ middleware::{MiddlewareBuilder, SignerMiddleware}, providers::{Http, Middleware, Provider}, @@ -188,11 +188,8 @@ async fn main() -> anyhow::Result<()> { .network_config(network_config) .build(); - let network = TestNetwork::new( - config, - SequencerVersions::::new(), - ) - .await; + let network = + TestNetwork::new(config, SequencerVersions::::new()).await; let st = network.cfg.stake_table(); let total_stake = st.total_stake(SnapshotVersion::LastEpochStart).unwrap(); let config = network.cfg.hotshot_config(); diff --git a/sequencer/src/lib.rs b/sequencer/src/lib.rs index 9cc3d9103..da5929a59 100644 --- a/sequencer/src/lib.rs +++ b/sequencer/src/lib.rs @@ -503,7 +503,7 @@ pub mod testing { instance_state: NodeState, validated_state: ValidatedState, ) -> (Box>, Url) { - let builder_key_pair = EthKeyPair::random(); + let builder_key_pair = TestConfig::<0>::builder_key(); let port = port.unwrap_or_else(|| pick_unused_port().expect("No ports available")); // This should never fail. From d8ba5853d73cd7ff9d25167cc107813c6f0ade60 Mon Sep 17 00:00:00 2001 From: Abdul Basit Date: Fri, 13 Sep 2024 12:41:42 +0500 Subject: [PATCH 09/12] block_info -> bundle_info for marketplace builder tests --- marketplace-builder/src/builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/marketplace-builder/src/builder.rs b/marketplace-builder/src/builder.rs index 4f2c7a489..1f7ca2ad3 100644 --- a/marketplace-builder/src/builder.rs +++ b/marketplace-builder/src/builder.rs @@ -581,7 +581,7 @@ mod test { let bundle = builder_client .get::>( format!( - "block_info/bundle/{parent_view_number}/{parent_commitment}/{}", + "bundle_info/bundle/{parent_view_number}/{parent_commitment}/{}", parent_view_number + 1 ) .as_str(), @@ -671,7 +671,7 @@ mod test { let bundle = builder_client .get::>( format!( - "block_info/bundle/{parent_view_number}/{parent_commitment}/{}", + "bundle_info/bundle/{parent_view_number}/{parent_commitment}/{}", parent_view_number + 1 ) .as_str(), From 2f636f46f22e5c1a80d633326ec8456f11fb4281 Mon Sep 17 00:00:00 2001 From: Abdul Basit Date: Mon, 16 Sep 2024 18:47:39 +0500 Subject: [PATCH 10/12] update mkt builder core to 0.1.48 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68fe846f8..000ce501d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6181,8 +6181,8 @@ dependencies = [ [[package]] name = "marketplace-builder-core" -version = "0.1.47" -source = "git+https://github.com/EspressoSystems/marketplace-builder-core?branch=ab/update-module-path#f6c715d3e038bfcca784c85cf639be661040fea6" +version = "0.1.48" +source = "git+https://github.com/EspressoSystems/marketplace-builder-core?tag=0.1.48#aa79a76769cf0d13d48cfeaafb455173ad85edf0" dependencies = [ "anyhow", "async-broadcast", diff --git a/Cargo.toml b/Cargo.toml index 89079bf06..3460cdcb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ hotshot = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.74", # Hotshot imports hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.74" } hotshot-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.1.47" } -marketplace-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", branch = "ab/update-module-path" } +marketplace-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.1.48" } hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.46" } hotshot-orchestrator = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.74" } hotshot-query-service = { git = "https://github.com/EspressoSystems/hotshot-query-service", tag = "0.1.57" } From 5be401ab99cbf0845337a677026c3cea46ae03a0 Mon Sep 17 00:00:00 2001 From: "Mat R." <1577341+Ancient123@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:19:53 -0600 Subject: [PATCH 11/12] Update genesis file for staging and bugfix demo (#2031) Update genesis file for staging --- data/genesis/staging.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/data/genesis/staging.toml b/data/genesis/staging.toml index a407ba06f..89aaa5e3d 100644 --- a/data/genesis/staging.toml +++ b/data/genesis/staging.toml @@ -1,14 +1,15 @@ -base_version = "0.1" -upgrade_version = "0.2" +base_version = "0.2" +upgrade_version = "0.3" [stake_table] capacity = 200 [chain_config] chain_id = 888888888 -base_fee = '0 wei' -max_block_size = '30mb' +base_fee = '1 wei' +max_block_size = '1mb' fee_recipient = '0x0000000000000000000000000000000000000000' +fee_contract = '0x0c8e79f3534b00d9a3d4a856b665bf4ebc22f2ba' [header] timestamp = "1970-01-01T00:00:00Z" From e7f2097919a91ea9fd0d80c5f348e9e56b9ce9d9 Mon Sep 17 00:00:00 2001 From: "Mat R." <1577341+Ancient123@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:52:31 -0600 Subject: [PATCH 12/12] Updated fee proxy contract address for staging (#2032) --- data/genesis/staging.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/genesis/staging.toml b/data/genesis/staging.toml index 89aaa5e3d..297d77b30 100644 --- a/data/genesis/staging.toml +++ b/data/genesis/staging.toml @@ -9,7 +9,7 @@ chain_id = 888888888 base_fee = '1 wei' max_block_size = '1mb' fee_recipient = '0x0000000000000000000000000000000000000000' -fee_contract = '0x0c8e79f3534b00d9a3d4a856b665bf4ebc22f2ba' +fee_contract = '0xa15bb66138824a1c7167f5e85b957d04dd34e468' [header] timestamp = "1970-01-01T00:00:00Z"