From 4e7b54c561447a5d354013fc09678cc124dd0c6d Mon Sep 17 00:00:00 2001 From: Jonas Bostoen Date: Thu, 8 Aug 2024 11:39:15 +0200 Subject: [PATCH 1/4] chore(sidecar): bump version --- bolt-sidecar/Cargo.lock | 2 +- bolt-sidecar/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bolt-sidecar/Cargo.lock b/bolt-sidecar/Cargo.lock index 181afdf38..8a2aab774 100644 --- a/bolt-sidecar/Cargo.lock +++ b/bolt-sidecar/Cargo.lock @@ -1496,7 +1496,7 @@ dependencies = [ [[package]] name = "bolt-sidecar" -version = "0.1.3-alpha" +version = "0.2.0-alpha" dependencies = [ "alloy", "alloy-node-bindings", diff --git a/bolt-sidecar/Cargo.toml b/bolt-sidecar/Cargo.toml index bddd6aa04..b29ef0f7c 100644 --- a/bolt-sidecar/Cargo.toml +++ b/bolt-sidecar/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bolt-sidecar" -version = "0.1.3-alpha" +version = "0.2.0-alpha" edition = "2021" default-run = "bolt-sidecar" From 8cfc38be28ae9e32cda7d989c3170d161d44633a Mon Sep 17 00:00:00 2001 From: Jonas Bostoen Date: Thu, 8 Aug 2024 11:43:56 +0200 Subject: [PATCH 2/4] chore(testnets): update version --- testnets/helder/docker-compose.pbs.yml | 14 +++++++------- testnets/helder/docker-compose.yml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/testnets/helder/docker-compose.pbs.yml b/testnets/helder/docker-compose.pbs.yml index 2da5be291..d2dd9d704 100644 --- a/testnets/helder/docker-compose.pbs.yml +++ b/testnets/helder/docker-compose.pbs.yml @@ -30,7 +30,7 @@ services: ADMINER_PLUGINS: tables-filter tinymce builder: - image: ghcr.io/chainbound/bolt-builder:v0.1.3-alpha + image: ghcr.io/chainbound/bolt-builder:v0.2.0-alpha restart: unless-stopped volumes: - "chaindata:/var/lib/chaindata" @@ -61,7 +61,7 @@ services: entrypoint: /scripts/run-bn.sh relay-housekeeper: - image: ghcr.io/chainbound/bolt-relay:v0.1.3-alpha + image: ghcr.io/chainbound/bolt-relay:v0.2.0-alpha restart: unless-stopped depends_on: db: @@ -84,11 +84,11 @@ services: "--redis-uri", "redis:6379", "--beacon-uris", - "http://beacon:4000", + "http://beacon:4000" ] relay-api: - image: ghcr.io/chainbound/bolt-relay:v0.1.3-alpha + image: ghcr.io/chainbound/bolt-relay:v0.2.0-alpha restart: unless-stopped depends_on: relay-housekeeper: @@ -117,11 +117,11 @@ services: "--secret-key", "0x607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2", "--listen-addr", - "0.0.0.0:9062", + "0.0.0.0:9062" ] relay-website: - image: ghcr.io/chainbound/bolt-relay:v0.1.3-alpha + image: ghcr.io/chainbound/bolt-relay:v0.2.0-alpha restart: always depends_on: relay-api: @@ -144,5 +144,5 @@ services: "--redis-uri", "redis:6379", "--listen-addr", - "0.0.0.0:9060", + "0.0.0.0:9060" ] diff --git a/testnets/helder/docker-compose.yml b/testnets/helder/docker-compose.yml index 67d583324..c28b8bda1 100644 --- a/testnets/helder/docker-compose.yml +++ b/testnets/helder/docker-compose.yml @@ -1,6 +1,6 @@ services: bolt-sidecar: - image: ghcr.io/chainbound/bolt-sidecar:v0.1.3-alpha + image: ghcr.io/chainbound/bolt-sidecar:v0.2.0-alpha container_name: bolt-sidecar restart: unless-stopped ports: @@ -10,7 +10,7 @@ services: entrypoint: /bin/sh -c '/bolt-sidecar --port $$BOLT_RPC_PORT --chain helder --validator-indexes $$VALIDATOR_INDEXES --beacon-api-url $$BEACON_API_URL --execution-api-url $$EXECUTION_API_URL --engine-api-url $$ENGINE_API_URL --private-key $$SIGNING_KEY --mevboost-url http://bolt-boost:18550 --mevboost-proxy-port 18551 --jwt-hex $$JWT_HEX --fee-recipient $$FEE_RECIPIENT' bolt-boost: - image: ghcr.io/chainbound/bolt-mev-boost:v0.1.3-alpha + image: ghcr.io/chainbound/bolt-mev-boost:v0.2.0-alpha container_name: bolt-boost restart: unless-stopped env_file: ./launch.env From d86805ca7f6ad45c0caeb4068146a5f2a626fa85 Mon Sep 17 00:00:00 2001 From: nicolas <48695862+merklefruit@users.noreply.github.com> Date: Thu, 8 Aug 2024 12:12:36 +0200 Subject: [PATCH 3/4] feat: added release.md doc --- RELEASE.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..52b498c02 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,37 @@ +# Guide on creating new releases + +## 0. Pre-release checks + +There is not a single end2end test procedure, but each release should at least +go through a manual test of the core components, including the happy-case and +error-case scenarios. This includes the Kurtosis devnet environment and any +live testnet deployment that is available at time of release. + +For testnets, if the launch setup has changed since the previous version, +the `testnets/` directory should be updated to reflect the new setup. +Pay special attention to the `README` and `docker-compose` files. + +## 1. Update the version tag in the necessary packages + +For instance, for the Bolt sidecar this is in `bolt-sidecar/Cargo.toml`. +Similar changes should be made in the other packages getting updated. + +We don't currently keep track of the version for flashbots forks. + +Next, update the version of the Docker images used in any `docker-compose` files. +These currently only live inside the `testnets/` dir. + +## 2. Create a release on Github + +Create a new release on Github with the new tag and a description of the changes. + +We use the built-in Github changelog feature to generate the changelog. + +## 3. Build new Docker images + +You can build new Docker images with the `just release ` recipe. + +Example: `just release v0.2.0-alpha` will build and push the Docker images +for all Bolt components with the tag `v0.2.0-alpha` for both `arm64` and `amd64` +architectures. This can take a long time... We recommend building from an ARM machine +because cross-compiling from x86 into ARM is slow as hell. From 304a264760515adc468b0376ddb6e4d6791505b6 Mon Sep 17 00:00:00 2001 From: Jonas Bostoen Date: Thu, 8 Aug 2024 12:32:28 +0200 Subject: [PATCH 4/4] fix(sidecar): genesis time issues --- bolt-sidecar/src/config/chain.rs | 5 ++-- bolt-sidecar/src/driver.rs | 10 ++++---- bolt-sidecar/src/state/consensus.rs | 7 ++++-- bolt-sidecar/src/state/head_tracker.rs | 34 ++------------------------ 4 files changed, 14 insertions(+), 42 deletions(-) diff --git a/bolt-sidecar/src/config/chain.rs b/bolt-sidecar/src/config/chain.rs index a260a1bdd..9aff45db9 100644 --- a/bolt-sidecar/src/config/chain.rs +++ b/bolt-sidecar/src/config/chain.rs @@ -1,7 +1,6 @@ -use std::time::Duration; - use alloy::primitives::b256; use clap::{Args, ValueEnum}; +use std::time::Duration; /// Default commitment deadline duration. /// @@ -40,7 +39,7 @@ pub struct ChainConfig { /// new commitments for the next block (parsed as milliseconds). #[clap( long, - env = "BOLT_SIDECAR_COMMITMENT_DEADLINE", + env = "BOLT_SIDECAR_COMMITMENT_DEADLINE", default_value_t = DEFAULT_COMMITMENT_DEADLINE_IN_MILLIS )] commitment_deadline: u64, diff --git a/bolt-sidecar/src/driver.rs b/bolt-sidecar/src/driver.rs index b13ad005b..c2515b900 100644 --- a/bolt-sidecar/src/driver.rs +++ b/bolt-sidecar/src/driver.rs @@ -102,14 +102,14 @@ impl SidecarDriver Result<(), ConsensusError> { + debug!("Updating slot to {slot}"); // Reset the commitment deadline to start counting for the next slot. self.commitment_deadline = CommitmentDeadline::new(slot + 1, self.commitment_deadline_duration); @@ -128,6 +130,7 @@ impl ConsensusState { // If the epoch has changed, update the proposer duties if epoch != self.epoch.value { + debug!("Updating epoch to {epoch}"); self.epoch.value = epoch; self.epoch.start_slot = epoch * SLOTS_PER_EPOCH; diff --git a/bolt-sidecar/src/state/head_tracker.rs b/bolt-sidecar/src/state/head_tracker.rs index 5195881d6..ff9c9ae13 100644 --- a/bolt-sidecar/src/state/head_tracker.rs +++ b/bolt-sidecar/src/state/head_tracker.rs @@ -1,14 +1,7 @@ -use std::{ - sync::{ - atomic::{AtomicU64, Ordering}, - Arc, - }, - time::Duration, -}; - use alloy::rpc::types::beacon::events::HeadEvent; use beacon_api_client::Topic; use futures::StreamExt; +use std::time::Duration; use tokio::{sync::broadcast, task::AbortHandle, time::sleep}; use tracing::warn; @@ -26,8 +19,6 @@ const RETRY_DELAY: Duration = Duration::from_secs(1); pub struct HeadTracker { /// Channel to receive updates of the "Head" beacon topic new_heads_rx: broadcast::Receiver, - /// The genesis timestamp of the beacon chain, used for calculating proposal times - beacon_genesis_timestamp: Arc, /// Handle to the background task that listens for new head events. /// Kept to allow for graceful shutdown. quit: AbortHandle, @@ -49,24 +40,8 @@ impl HeadTracker { pub fn start(beacon_client: BeaconClient) -> Self { let (new_heads_tx, new_heads_rx) = broadcast::channel(32); - let beacon_genesis_timestamp = Arc::new(AtomicU64::new(0)); - let beacon_genesis_timestamp_clone = beacon_genesis_timestamp.clone(); - let task = tokio::spawn(async move { loop { - // First, try to get the genesis timestamp and cache it. - let genesis_time = loop { - match beacon_client.get_genesis_details().await { - Ok(genesis_info) => break genesis_info.genesis_time, - Err(err) => { - warn!(?err, "failed to get genesis details"); - sleep(RETRY_DELAY).await; - continue; - } - } - }; - beacon_genesis_timestamp_clone.store(genesis_time, Ordering::Relaxed); - let mut event_stream = match beacon_client.get_events::().await { Ok(events) => events, Err(err) => { @@ -96,7 +71,7 @@ impl HeadTracker { } }); - Self { new_heads_rx, beacon_genesis_timestamp, quit: task.abort_handle() } + Self { new_heads_rx, quit: task.abort_handle() } } /// Stop the tracker and cleanup resources @@ -116,11 +91,6 @@ impl HeadTracker { pub fn subscribe_new_heads(&self) -> broadcast::Receiver { self.new_heads_rx.resubscribe() } - - /// Get the genesis timestamp of the beacon chain - pub fn beacon_genesis_timestamp(&self) -> u64 { - self.beacon_genesis_timestamp.load(Ordering::Relaxed) - } } #[cfg(test)]