From 14235221ca52202e5b69df566e74a5a0f140c47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Avila=20Gast=C3=B3n?= <72628438+avilagaston9@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:33:39 -0300 Subject: [PATCH 01/10] hotfix(docs): add link for sending proofs on mainnet (#1716) Co-authored-by: Julian Arce <52429267+JuArce@users.noreply.github.com> --- docs/1_introduction/1_try_aligned.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/1_introduction/1_try_aligned.md b/docs/1_introduction/1_try_aligned.md index 6a317ed898..c9d302421d 100644 --- a/docs/1_introduction/1_try_aligned.md +++ b/docs/1_introduction/1_try_aligned.md @@ -2,6 +2,11 @@ In this tutorial, you will learn how to send your first SP1 proofs to get verified in Aligned in under 3 minutes. +{% hint style="warning" %} +This tutorial is for sending proofs on Holesky network. +To send proofs on Mainnet, please refer to the [submitting proofs](../3_guides/0_submitting_proofs.md) guide. +{% endhint %} + ## Quickstart We will download a previously generated SP1 proof, send it to Aligned for verification, and retrieve the results from Ethereum Holesky testnet. From 281b246bb7297eac298d728d3e979e50dec39d98 Mon Sep 17 00:00:00 2001 From: Julian Ventura <43799596+JulianVentura@users.noreply.github.com> Date: Wed, 8 Jan 2025 18:53:44 -0300 Subject: [PATCH 02/10] fix(explorer): Batch stats endpoint should return an array of summarized batches information (#1721) Co-authored-by: Julian Ventura --- explorer/config/config.exs | 7 ++++ explorer/lib/explorer/models/batches.ex | 35 ++++++++++--------- .../controllers/data_controller.ex | 17 +++------ .../lib/explorer_web/controllers/data_json.ex | 6 ++-- explorer/lib/explorer_web/live/utils.ex | 18 ++++++++++ explorer/lib/explorer_web/router.ex | 2 +- 6 files changed, 51 insertions(+), 34 deletions(-) diff --git a/explorer/config/config.exs b/explorer/config/config.exs index 74e986d082..7965e10957 100644 --- a/explorer/config/config.exs +++ b/explorer/config/config.exs @@ -7,6 +7,13 @@ # General application configuration import Config +config :explorer, + batcher_submission_gas_cost: 125000, + aggregator_gas_cost: 330000, + additional_submission_gas_cost_per_proof: 2000, + aggregator_fee_percentage_multiplier: 125, + percentage_divider: 100 + config :explorer, generators: [timestamp_type: :utc_datetime], tracker_api_url: System.get_env("TRACKER_API_URL") diff --git a/explorer/lib/explorer/models/batches.ex b/explorer/lib/explorer/models/batches.ex index ffd8f5b40a..abedb8c6df 100644 --- a/explorer/lib/explorer/models/batches.ex +++ b/explorer/lib/explorer/models/batches.ex @@ -164,23 +164,26 @@ defmodule Batches do end end - def get_last_24h_verified_proof_stats() do - minutes_in_a_day = 1440 - threshold_datetime = DateTime.utc_now() |> DateTime.add(-1 * minutes_in_a_day, :minute) # Last 24 hours + # The following query was built by reading: + # - https://hexdocs.pm/ecto/Ecto.Query.html#module-fragments + # - https://www.postgresql.org/docs/9.1/functions-datetime.html#FUNCTIONS-DATETIME-TABLE + # - https://stackoverflow.com/questions/43288914/how-to-use-date-trunc-with-timezone-in-ecto-fragment-statement + # - https://glennjon.es/2016/09/24/elixir-ecto-how-to-group-and-count-records-by-week.html + def get_daily_verified_batches_summary() do + submission_constant_cost = Utils.constant_batch_submission_gas_cost() + additional_cost_per_proof = Utils.additional_batch_submission_gas_cost_per_proof() + + query = Batches + |> where([b], b.is_verified == true) + |> group_by([b], fragment("DATE_TRUNC('day', ?)", b.response_timestamp)) + |> select([b], %{ + date: fragment("DATE_TRUNC('day', ?)::date", b.response_timestamp), + amount_of_proofs: sum(b.amount_of_proofs), + gas_cost: sum(fragment("? + ? * ?", ^submission_constant_cost, ^additional_cost_per_proof, b.amount_of_proofs)) + }) + |> order_by([b], fragment("DATE_TRUNC('day', ?)", b.response_timestamp)) - query = from(b in Batches, - where: b.is_verified == true and b.submission_timestamp > ^threshold_datetime, - select: {sum(b.amount_of_proofs), avg(b.fee_per_proof)}) - - {amount_of_proofs, avg_fee_per_proof} = case Explorer.Repo.one(query) do - nil -> {0, 0.0} - result -> result - end - - %{ - amount_of_proofs: amount_of_proofs, - avg_fee_per_proof: avg_fee_per_proof - } + Explorer.Repo.all(query) end def insert_or_update(batch_changeset, proofs) do diff --git a/explorer/lib/explorer_web/controllers/data_controller.ex b/explorer/lib/explorer_web/controllers/data_controller.ex index 9ed257807c..e69097a6af 100644 --- a/explorer/lib/explorer_web/controllers/data_controller.ex +++ b/explorer/lib/explorer_web/controllers/data_controller.ex @@ -1,21 +1,12 @@ defmodule ExplorerWeb.DataController do use ExplorerWeb, :controller - def verified_proofs_in_last_24_hours(conn, _params) do - %{ - amount_of_proofs: amount_of_proofs, - avg_fee_per_proof: avg_fee_per_proof - } = Batches.get_last_24h_verified_proof_stats() - - avg_fee_per_proof_usd = - case EthConverter.wei_to_usd_sf(avg_fee_per_proof, 2) do - {:ok, value} -> value - _ -> 0 - end + def verified_batches_summary(conn, _params) do + batches_summary = + Batches.get_daily_verified_batches_summary() render(conn, :show, %{ - amount_of_proofs: amount_of_proofs, - avg_fee_per_proof_usd: avg_fee_per_proof_usd + batches: batches_summary, }) end end diff --git a/explorer/lib/explorer_web/controllers/data_json.ex b/explorer/lib/explorer_web/controllers/data_json.ex index d6d905f1a2..cbe524b5b7 100644 --- a/explorer/lib/explorer_web/controllers/data_json.ex +++ b/explorer/lib/explorer_web/controllers/data_json.ex @@ -1,11 +1,9 @@ defmodule ExplorerWeb.DataJSON do def show(%{ - amount_of_proofs: amount_of_proofs, - avg_fee_per_proof_usd: avg_fee_per_proof_usd + batches: batches, }) do %{ - amount_of_proofs: amount_of_proofs, - avg_fee_per_proof_usd: avg_fee_per_proof_usd + batches: batches, } end end diff --git a/explorer/lib/explorer_web/live/utils.ex b/explorer/lib/explorer_web/live/utils.ex index dc06bd2b68..d172ff84c2 100644 --- a/explorer/lib/explorer_web/live/utils.ex +++ b/explorer/lib/explorer_web/live/utils.ex @@ -205,6 +205,12 @@ defmodule Utils do _ -> 268_435_456 end) + @batcher_submission_gas_cost Application.compile_env(:explorer, :batcher_submission_gas_cost) + @aggregator_gas_cost Application.compile_env(:explorer, :aggregator_gas_cost) + @aggregator_fee_percentage_multiplier Application.compile_env(:explorer, :aggregator_fee_percentage_multiplier) + @percentage_divider Application.compile_env(:explorer, :percentage_divider) + @additional_submission_gas_cost_per_proof Application.compile_env(:explorer, :additional_submission_gas_cost_per_proof) + def string_to_bytes32(hex_string) do # Remove the '0x' prefix hex = @@ -409,4 +415,16 @@ defmodule Utils do def random_id(prefix) do prefix <> "_" <> (:crypto.strong_rand_bytes(8) |> Base.url_encode64(padding: false)) end + + def constant_batch_submission_gas_cost() do + trunc( + @aggregator_gas_cost * @aggregator_fee_percentage_multiplier / + @percentage_divider + + @batcher_submission_gas_cost + ) + end + + def additional_batch_submission_gas_cost_per_proof() do + @additional_submission_gas_cost_per_proof + end end diff --git a/explorer/lib/explorer_web/router.ex b/explorer/lib/explorer_web/router.ex index f8d90604e6..02bcd34522 100644 --- a/explorer/lib/explorer_web/router.ex +++ b/explorer/lib/explorer_web/router.ex @@ -34,7 +34,7 @@ defmodule ExplorerWeb.Router do scope "/api", ExplorerWeb do pipe_through :api - get "/proofs_verified_last_24h", DataController, :verified_proofs_in_last_24_hours + get "/verified_batches_summary", DataController, :verified_batches_summary end scope "/", ExplorerWeb do From b396d02a756c9d27e352377e64c584fc2fd139cc Mon Sep 17 00:00:00 2001 From: Julian Ventura <43799596+JulianVentura@users.noreply.github.com> Date: Thu, 9 Jan 2025 11:41:34 -0300 Subject: [PATCH 03/10] hotfix(explorer): Fix the proof price average (#1717) Co-authored-by: Julian Ventura Co-authored-by: Julian Arce <52429267+JuArce@users.noreply.github.com> --- explorer/lib/explorer/models/batches.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/explorer/lib/explorer/models/batches.ex b/explorer/lib/explorer/models/batches.ex index abedb8c6df..4b988b7916 100644 --- a/explorer/lib/explorer/models/batches.ex +++ b/explorer/lib/explorer/models/batches.ex @@ -144,7 +144,7 @@ defmodule Batches do query = from(b in Batches, where: b.is_verified == true, - select: avg(b.fee_per_proof) + select: sum(b.fee_per_proof * b.amount_of_proofs) / sum(b.amount_of_proofs) ) case Explorer.Repo.one(query) do From cd0c331ad550483368f56909151800fd28d253d9 Mon Sep 17 00:00:00 2001 From: Mario Rugiero Date: Fri, 10 Jan 2025 11:32:28 -0300 Subject: [PATCH 04/10] hotfix: make aggregator fee multiplier customizable (#1690) Co-authored-by: Julian Arce <52429267+JuArce@users.noreply.github.com> Co-authored-by: avilagaston9 --- batcher/aligned-batcher/src/config/mod.rs | 12 ++++ batcher/aligned-batcher/src/lib.rs | 30 ++++++--- .../aligned-batcher/src/types/batch_queue.rs | 63 ++++++++++++++++--- batcher/aligned-sdk/src/core/constants.rs | 13 ++-- batcher/aligned-sdk/src/sdk.rs | 4 +- config-files/config-batcher-docker.yaml | 2 + config-files/config-batcher.yaml | 2 + .../config-files/config-batcher.yaml.j2 | 2 + 8 files changed, 101 insertions(+), 27 deletions(-) diff --git a/batcher/aligned-batcher/src/config/mod.rs b/batcher/aligned-batcher/src/config/mod.rs index 3a6f01e349..1d1cea836e 100644 --- a/batcher/aligned-batcher/src/config/mod.rs +++ b/batcher/aligned-batcher/src/config/mod.rs @@ -37,6 +37,10 @@ impl NonPayingConfig { #[derive(Debug, Deserialize)] pub struct BatcherConfigFromYaml { + #[serde(default = "default_aggregator_fee_percentage_multiplier")] + pub aggregator_fee_percentage_multiplier: u128, + #[serde(default = "default_aggregator_gas_cost")] + pub aggregator_gas_cost: u128, pub block_interval: u64, pub transaction_wait_timeout: u64, pub max_proof_size: usize, @@ -86,3 +90,11 @@ impl ContractDeploymentOutput { serde_json::from_str(&deployment_output).expect("Failed to parse deployment output file") } } + +fn default_aggregator_fee_percentage_multiplier() -> u128 { + aligned_sdk::core::constants::DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER +} + +fn default_aggregator_gas_cost() -> u128 { + aligned_sdk::core::constants::DEFAULT_AGGREGATOR_GAS_COST +} diff --git a/batcher/aligned-batcher/src/lib.rs b/batcher/aligned-batcher/src/lib.rs index c6c8af65bb..0b6f7c0d85 100644 --- a/batcher/aligned-batcher/src/lib.rs +++ b/batcher/aligned-batcher/src/lib.rs @@ -23,11 +23,11 @@ use std::sync::Arc; use std::time::Duration; use aligned_sdk::core::constants::{ - ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF, AGGREGATOR_GAS_COST, BUMP_BACKOFF_FACTOR, - BUMP_MAX_RETRIES, BUMP_MAX_RETRY_DELAY, BUMP_MIN_RETRY_DELAY, CONNECTION_TIMEOUT, - CONSTANT_GAS_COST, DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER, DEFAULT_MAX_FEE_PER_PROOF, - ETHEREUM_CALL_BACKOFF_FACTOR, ETHEREUM_CALL_MAX_RETRIES, ETHEREUM_CALL_MAX_RETRY_DELAY, - ETHEREUM_CALL_MIN_RETRY_DELAY, GAS_PRICE_PERCENTAGE_MULTIPLIER, PERCENTAGE_DIVIDER, + ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF, BATCHER_SUBMISSION_BASE_GAS_COST, + BUMP_BACKOFF_FACTOR, BUMP_MAX_RETRIES, BUMP_MAX_RETRY_DELAY, BUMP_MIN_RETRY_DELAY, + CONNECTION_TIMEOUT, DEFAULT_MAX_FEE_PER_PROOF, ETHEREUM_CALL_BACKOFF_FACTOR, + ETHEREUM_CALL_MAX_RETRIES, ETHEREUM_CALL_MAX_RETRY_DELAY, ETHEREUM_CALL_MIN_RETRY_DELAY, + GAS_PRICE_PERCENTAGE_MULTIPLIER, PERCENTAGE_DIVIDER, RESPOND_TO_TASK_FEE_LIMIT_PERCENTAGE_MULTIPLIER, }; use aligned_sdk::core::types::{ @@ -92,6 +92,8 @@ pub struct Batcher { non_paying_config: Option, posting_batch: Mutex, disabled_verifiers: Mutex, + aggregator_fee_percentage_multiplier: u128, + aggregator_gas_cost: u128, pub metrics: metrics::BatcherMetrics, pub telemetry: TelemetrySender, } @@ -253,6 +255,10 @@ impl Batcher { last_uploaded_batch_block: Mutex::new(last_uploaded_batch_block), pre_verification_is_enabled: config.batcher.pre_verification_is_enabled, non_paying_config, + aggregator_fee_percentage_multiplier: config + .batcher + .aggregator_fee_percentage_multiplier, + aggregator_gas_cost: config.batcher.aggregator_gas_cost, posting_batch: Mutex::new(false), batch_state: Mutex::new(batch_state), disabled_verifiers: Mutex::new(disabled_verifiers), @@ -1159,6 +1165,7 @@ impl Batcher { gas_price, self.max_batch_byte_size, self.max_batch_proof_qty, + self.constant_gas_cost(), ) .inspect_err(|e| { *batch_posting = false; @@ -1431,13 +1438,13 @@ impl Batcher { let batch_data_pointer: String = "".to_owned() + &self.download_endpoint + "/" + &file_name; let num_proofs_in_batch = leaves.len(); - let gas_per_proof = (CONSTANT_GAS_COST + let gas_per_proof = (self.constant_gas_cost() + ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF * num_proofs_in_batch as u128) / num_proofs_in_batch as u128; let fee_per_proof = U256::from(gas_per_proof) * gas_price; - let fee_for_aggregator = (U256::from(AGGREGATOR_GAS_COST) + let fee_for_aggregator = (U256::from(self.aggregator_gas_cost) * gas_price - * U256::from(DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER)) + * U256::from(self.aggregator_fee_percentage_multiplier)) / U256::from(PERCENTAGE_DIVIDER); let respond_to_task_fee_limit = (fee_for_aggregator * U256::from(RESPOND_TO_TASK_FEE_LIMIT_PERCENTAGE_MULTIPLIER)) @@ -1735,7 +1742,7 @@ impl Batcher { let nonced_verification_data = NoncedVerificationData::new( client_msg.verification_data.verification_data.clone(), client_msg.verification_data.nonce, - DEFAULT_MAX_FEE_PER_PROOF.into(), // 13_000 gas per proof * 100 gwei gas price (upper bound) + DEFAULT_MAX_FEE_PER_PROOF.into(), // 2_000 gas per proof * 100 gwei gas price (upper bound) self.chain_id, self.payment_service.address(), ); @@ -1862,4 +1869,9 @@ impl Batcher { })?; Ok(()) } + + fn constant_gas_cost(&self) -> u128 { + (self.aggregator_fee_percentage_multiplier * self.aggregator_gas_cost) / PERCENTAGE_DIVIDER + + BATCHER_SUBMISSION_BASE_GAS_COST + } } diff --git a/batcher/aligned-batcher/src/types/batch_queue.rs b/batcher/aligned-batcher/src/types/batch_queue.rs index 2d9ce2225e..a32957a548 100644 --- a/batcher/aligned-batcher/src/types/batch_queue.rs +++ b/batcher/aligned-batcher/src/types/batch_queue.rs @@ -154,13 +154,14 @@ pub(crate) fn try_build_batch( gas_price: U256, max_batch_byte_size: usize, max_batch_proof_qty: usize, + constant_gas_cost: u128, ) -> Result, BatcherError> { let mut finalized_batch = batch_queue; let mut batch_size = calculate_batch_size(&finalized_batch)?; while let Some((entry, _)) = finalized_batch.peek() { let batch_len = finalized_batch.len(); - let fee_per_proof = calculate_fee_per_proof(batch_len, gas_price); + let fee_per_proof = calculate_fee_per_proof(batch_len, gas_price, constant_gas_cost); // if batch is not acceptable: if batch_size > max_batch_byte_size @@ -197,8 +198,8 @@ pub(crate) fn try_build_batch( Ok(finalized_batch.clone().into_sorted_vec()) } -fn calculate_fee_per_proof(batch_len: usize, gas_price: U256) -> U256 { - let gas_per_proof = (crate::CONSTANT_GAS_COST +fn calculate_fee_per_proof(batch_len: usize, gas_price: U256, constant_gas_cost: u128) -> U256 { + let gas_per_proof = (constant_gas_cost + crate::ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF * batch_len as u128) / batch_len as u128; @@ -207,6 +208,7 @@ fn calculate_fee_per_proof(batch_len: usize, gas_price: U256) -> U256 { #[cfg(test)] mod test { + use aligned_sdk::core::constants::DEFAULT_CONSTANT_GAS_COST; use aligned_sdk::core::types::ProvingSystemId; use aligned_sdk::core::types::VerificationData; use ethers::types::Address; @@ -303,7 +305,14 @@ mod test { batch_queue.push(entry_3, batch_priority_3); let gas_price = U256::from(1); - let finalized_batch = try_build_batch(batch_queue, gas_price, 5000000, 50).unwrap(); + let finalized_batch = try_build_batch( + batch_queue.clone(), + gas_price, + 5000000, + 50, + DEFAULT_CONSTANT_GAS_COST, + ) + .unwrap(); assert_eq!( finalized_batch[0].nonced_verification_data.max_fee, @@ -408,7 +417,14 @@ mod test { batch_queue.push(entry_3, batch_priority_3); let gas_price = U256::from(1); - let finalized_batch = try_build_batch(batch_queue.clone(), gas_price, 5000000, 50).unwrap(); + let finalized_batch = try_build_batch( + batch_queue.clone(), + gas_price, + 5000000, + 50, + DEFAULT_CONSTANT_GAS_COST, + ) + .unwrap(); // All entries from the batch queue should be in // the finalized batch. @@ -511,7 +527,14 @@ mod test { batch_queue.push(entry_3.clone(), batch_priority_3.clone()); let gas_price = U256::from(1); - let finalized_batch = try_build_batch(batch_queue.clone(), gas_price, 5000000, 2).unwrap(); + let finalized_batch = try_build_batch( + batch_queue.clone(), + gas_price, + 5000000, + 2, + DEFAULT_CONSTANT_GAS_COST, + ) + .unwrap(); // One Entry from the batch_queue should not be in the finalized batch // Particularly, nonce_3 is not in the finalized batch @@ -614,7 +637,14 @@ mod test { batch_queue.push(entry_3, batch_priority_3); let gas_price = U256::from(1); - let finalized_batch = try_build_batch(batch_queue.clone(), gas_price, 5000000, 50).unwrap(); + let finalized_batch = try_build_batch( + batch_queue.clone(), + gas_price, + 5000000, + 50, + DEFAULT_CONSTANT_GAS_COST, + ) + .unwrap(); // All entries from the batch queue should be in // the finalized batch. @@ -723,7 +753,14 @@ mod test { batch_queue.push(entry_3, batch_priority_3); let gas_price = U256::from(1); - let finalized_batch = try_build_batch(batch_queue.clone(), gas_price, 5000000, 50).unwrap(); + let finalized_batch = try_build_batch( + batch_queue.clone(), + gas_price, + 5000000, + 50, + DEFAULT_CONSTANT_GAS_COST, + ) + .unwrap(); // All but one entries from the batch queue should be in the finalized batch. assert_eq!(batch_queue.len(), 3); @@ -832,8 +869,14 @@ mod test { // The max batch len is 2, so the algorithm should stop at the second entry. let max_batch_proof_qty = 2; - let finalized_batch = - try_build_batch(batch_queue.clone(), gas_price, 5000000, max_batch_proof_qty).unwrap(); + let finalized_batch = try_build_batch( + batch_queue.clone(), + gas_price, + 5000000, + max_batch_proof_qty, + DEFAULT_CONSTANT_GAS_COST, + ) + .unwrap(); assert_eq!(batch_queue.len(), 3); assert_eq!(finalized_batch.len(), 2); diff --git a/batcher/aligned-sdk/src/core/constants.rs b/batcher/aligned-sdk/src/core/constants.rs index b7a253f7a4..01d0215952 100644 --- a/batcher/aligned-sdk/src/core/constants.rs +++ b/batcher/aligned-sdk/src/core/constants.rs @@ -1,18 +1,19 @@ /// Batcher /// pub const GAS_PRICE_INCREMENT_PERCENTAGE_PER_ITERATION: usize = 5; -pub const AGGREGATOR_GAS_COST: u128 = 400_000; +pub const DEFAULT_AGGREGATOR_GAS_COST: u128 = 330_000; pub const BATCHER_SUBMISSION_BASE_GAS_COST: u128 = 125_000; -pub const ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF: u128 = 13_000; -pub const CONSTANT_GAS_COST: u128 = - ((AGGREGATOR_GAS_COST * DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER) / PERCENTAGE_DIVIDER) - + BATCHER_SUBMISSION_BASE_GAS_COST; +pub const ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF: u128 = 2_000; +pub const DEFAULT_CONSTANT_GAS_COST: u128 = ((DEFAULT_AGGREGATOR_GAS_COST + * DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER) + / PERCENTAGE_DIVIDER) + + BATCHER_SUBMISSION_BASE_GAS_COST; pub const DEFAULT_MAX_FEE_PER_PROOF: u128 = ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF * 100_000_000_000; // gas_price = 100 Gwei = 0.0000001 ether (high gas price) pub const CONNECTION_TIMEOUT: u64 = 30; // 30 secs // % modifiers: (100% is x1, 10% is x0.1, 1000% is x10) pub const RESPOND_TO_TASK_FEE_LIMIT_PERCENTAGE_MULTIPLIER: u128 = 250; // fee_for_aggregator -> respondToTaskFeeLimit modifier -pub const DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER: u128 = 150; // feeForAggregator modifier +pub const DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER: u128 = 125; // feeForAggregator modifier pub const GAS_PRICE_PERCENTAGE_MULTIPLIER: u128 = 110; // gasPrice modifier pub const OVERRIDE_GAS_PRICE_PERCENTAGE_MULTIPLIER: u128 = 120; // gasPrice modifier to override previous transactions pub const PERCENTAGE_DIVIDER: u128 = 100; diff --git a/batcher/aligned-sdk/src/sdk.rs b/batcher/aligned-sdk/src/sdk.rs index 6045d84116..f57b2aed56 100644 --- a/batcher/aligned-sdk/src/sdk.rs +++ b/batcher/aligned-sdk/src/sdk.rs @@ -7,7 +7,7 @@ use crate::{ }, core::{ constants::{ - ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF, CONSTANT_GAS_COST, + ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF, DEFAULT_CONSTANT_GAS_COST, MAX_FEE_BATCH_PROOF_NUMBER, MAX_FEE_DEFAULT_PROOF_NUMBER, }, errors::{self, GetNonceError}, @@ -191,7 +191,7 @@ pub async fn fee_per_proof( let gas_price = fetch_gas_price(ð_rpc_provider).await?; // Cost for estimate `num_proofs_per_batch` proofs - let estimated_gas_per_proof = (CONSTANT_GAS_COST + let estimated_gas_per_proof = (DEFAULT_CONSTANT_GAS_COST + ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF * num_proofs_per_batch as u128) / num_proofs_per_batch as u128; diff --git a/config-files/config-batcher-docker.yaml b/config-files/config-batcher-docker.yaml index 9ce349465c..05818bd7f3 100644 --- a/config-files/config-batcher-docker.yaml +++ b/config-files/config-batcher-docker.yaml @@ -16,6 +16,8 @@ ecdsa: ## Batcher configurations batcher: + aggregator_fee_percentage_multiplier: 125 + aggregator_gas_cost: 330000 block_interval: 3 batch_size_interval: 10 transaction_wait_timeout: 96000 # 8 blocks diff --git a/config-files/config-batcher.yaml b/config-files/config-batcher.yaml index 6bcaffe9af..c7c061946e 100644 --- a/config-files/config-batcher.yaml +++ b/config-files/config-batcher.yaml @@ -16,6 +16,8 @@ ecdsa: ## Batcher configurations batcher: + aggregator_fee_percentage_multiplier: 125 + aggregator_gas_cost: 330000 block_interval: 3 batch_size_interval: 10 transaction_wait_timeout: 96000 # 8 blocks diff --git a/infra/ansible/playbooks/templates/config-files/config-batcher.yaml.j2 b/infra/ansible/playbooks/templates/config-files/config-batcher.yaml.j2 index b748947798..e6f81bc202 100644 --- a/infra/ansible/playbooks/templates/config-files/config-batcher.yaml.j2 +++ b/infra/ansible/playbooks/templates/config-files/config-batcher.yaml.j2 @@ -16,6 +16,8 @@ ecdsa: ## Batcher configurations batcher: + aggregator_fee_percentage_multiplier: 125 + aggregator_gas_cost: 330000 block_interval: 3 batch_size_interval: 10 transaction_wait_timeout: 36000 # 3 blocks From b23698b76f82fb974a2c2b1fa850b058a2e5d95c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Avila=20Gast=C3=B3n?= <72628438+avilagaston9@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:20:41 -0300 Subject: [PATCH 05/10] hotfix(explorer): panic on batches last page (#1731) --- explorer/lib/explorer_web/components/batches_table.ex | 7 ++++++- explorer/lib/explorer_web/live/eth_converter.ex | 11 +++++++++-- .../lib/explorer_web/live/pages/batch/index.html.heex | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/explorer/lib/explorer_web/components/batches_table.ex b/explorer/lib/explorer_web/components/batches_table.ex index 568c0d9b64..86ae7981e2 100644 --- a/explorer/lib/explorer_web/components/batches_table.ex +++ b/explorer/lib/explorer_web/components/batches_table.ex @@ -38,7 +38,12 @@ defmodule ExplorerWeb.BatchesTable do <%= "N/A" %> <% end %> <.tooltip> - ~= <%= EthConverter.wei_to_eth(batch.fee_per_proof, 6) %> ETH + <%= case EthConverter.wei_to_eth(batch.fee_per_proof, 6) do %> + <% nil -> %> + <%= "N/A" %> + <% eth -> %> + <%= "~= #{eth} ETH" %> + <% end %> diff --git a/explorer/lib/explorer_web/live/eth_converter.ex b/explorer/lib/explorer_web/live/eth_converter.ex index 919f3620c7..824629d789 100644 --- a/explorer/lib/explorer_web/live/eth_converter.ex +++ b/explorer/lib/explorer_web/live/eth_converter.ex @@ -31,7 +31,11 @@ defmodule EthConverter do |> wei_to_eth(decimal_places) end - def wei_to_usd(wei, decimal_places \\ 0) do + def wei_to_usd(wei, decimal_places \\ 0) + + def wei_to_usd(nil, _), do: {:error, "nil value"} + + def wei_to_usd(wei, decimal_places) do with eth_amount <- wei_to_eth(wei, 18), {:ok, eth_price} <- get_eth_price_usd() do usd_value = @@ -43,8 +47,11 @@ defmodule EthConverter do end end + def wei_to_usd_sf(wei, significant_figures \\ 3) + def wei_to_usd_sf(nil, _), do: {:error, "nil value"} + # rounds to significant figures, instead of decimal places - def wei_to_usd_sf(wei, significant_figures \\ 3) do + def wei_to_usd_sf(wei, significant_figures) do with eth_amount <- wei_to_eth(wei, 18), {:ok, eth_price} <- get_eth_price_usd() do usd_value = diff --git a/explorer/lib/explorer_web/live/pages/batch/index.html.heex b/explorer/lib/explorer_web/live/pages/batch/index.html.heex index 4422d0c8ca..4023ac6b65 100644 --- a/explorer/lib/explorer_web/live/pages/batch/index.html.heex +++ b/explorer/lib/explorer_web/live/pages/batch/index.html.heex @@ -39,7 +39,7 @@

<%= @current_batch.amount_of_proofs %>

-
+

Fee per Proof:

From da3a353bbc769946e796756cdfcf2e5b12a90df4 Mon Sep 17 00:00:00 2001 From: Marcos Nicolau <76252340+MarcosNicolau@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:25:35 -0300 Subject: [PATCH 06/10] fix: dark mode toogle (#1733) Co-authored-by: Mario Rugiero --- explorer/assets/vendor/dark_mode.js | 5 +---- explorer/lib/explorer_web/components/layouts/root.html.heex | 5 ----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/explorer/assets/vendor/dark_mode.js b/explorer/assets/vendor/dark_mode.js index 7c0ebc19b1..a8b5e9425a 100644 --- a/explorer/assets/vendor/dark_mode.js +++ b/explorer/assets/vendor/dark_mode.js @@ -5,10 +5,7 @@ const isDark = () => { .split("; ") .find((row) => row.startsWith(`${themeCookieKey}=`)) ?.split("=")[1]; - return ( - theme == "dark" || - window.matchMedia("(prefers-color-scheme: dark)").matches - ); + return theme == "dark"; }; const setThemeCookie = (theme) => { diff --git a/explorer/lib/explorer_web/components/layouts/root.html.heex b/explorer/lib/explorer_web/components/layouts/root.html.heex index ffb87f2c50..e8fedb9827 100644 --- a/explorer/lib/explorer_web/components/layouts/root.html.heex +++ b/explorer/lib/explorer_web/components/layouts/root.html.heex @@ -38,11 +38,6 @@ From 36b5f3b4463b6a459e8004230eb4914be2fb2b64 Mon Sep 17 00:00:00 2001 From: Marcos Nicolau <76252340+MarcosNicolau@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:40:51 -0300 Subject: [PATCH 07/10] fix: mobile view for operators and restakes pages (#1709) Co-authored-by: Julian Arce <52429267+JuArce@users.noreply.github.com> --- explorer/lib/explorer_web/live/pages/operators/index.ex | 2 +- explorer/lib/explorer_web/live/pages/restakes/index.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/explorer/lib/explorer_web/live/pages/operators/index.ex b/explorer/lib/explorer_web/live/pages/operators/index.ex index c05a54aa03..40ab769779 100644 --- a/explorer/lib/explorer_web/live/pages/operators/index.ex +++ b/explorer/lib/explorer_web/live/pages/operators/index.ex @@ -54,7 +54,7 @@ defmodule ExplorerWeb.Operators.Index do operators_registered={@operators_registered} /> <%= if @operators != [] do %> - <.card_background> + <.card_background class="overflow-x-auto"> <.table id="operators" rows={@operators}> <:col :let={operator} label="Name" class="[animation-delay: 3s]"> <.link navigate={~p"/operators/#{operator.address}"} class="flex gap-x-2"> diff --git a/explorer/lib/explorer_web/live/pages/restakes/index.ex b/explorer/lib/explorer_web/live/pages/restakes/index.ex index 3bda8ad50e..0a910e7b88 100644 --- a/explorer/lib/explorer_web/live/pages/restakes/index.ex +++ b/explorer/lib/explorer_web/live/pages/restakes/index.ex @@ -65,7 +65,7 @@ defmodule ExplorerWeb.Restakes.Index do operators_registered={@operators_registered} /> <%= if @assets != [] do %> - <.card_background> + <.card_background class="overflow-x-auto"> <.table id="assets" rows={@assets}> <:col :let={asset} label="Token" class="text-left"> <.link From 9a4b37bef53294f31414047cdf8e116422449577 Mon Sep 17 00:00:00 2001 From: "Klaus @ LambdaClass" <18153834+klaus993@users.noreply.github.com> Date: Tue, 14 Jan 2025 13:27:27 -0300 Subject: [PATCH 08/10] hotfix(explorer): fetch latest version from env instead of github (#1738) Co-authored-by: nicolau Co-authored-by: Julian Arce <52429267+JuArce@users.noreply.github.com> --- explorer/.env.dev | 3 ++ explorer/.env.example | 3 ++ .../lib/explorer_web/live/releases_helper.ex | 35 +------------------ explorer/start.sh | 1 + 4 files changed, 8 insertions(+), 34 deletions(-) diff --git a/explorer/.env.dev b/explorer/.env.dev index 38728db845..ccbd316a4a 100644 --- a/explorer/.env.dev +++ b/explorer/.env.dev @@ -25,3 +25,6 @@ MAX_BATCH_SIZE=268435456 # 256 MiB # Time we wait for a batch to be verified before marking it stale BATCH_TTL_MINUTES=5 + +# Latest aligned release that operators should be running +LATEST_RELEASE=v0.13.0 diff --git a/explorer/.env.example b/explorer/.env.example index b9a3a7a32a..0733157512 100644 --- a/explorer/.env.example +++ b/explorer/.env.example @@ -23,3 +23,6 @@ TRACKER_API_URL= # Time we wait for a batch to be verified before marking it stale BATCH_TTL_MINUTES=5 + +# Latest aligned release that operators should be running +LATEST_RELEASE=v0.13.0 diff --git a/explorer/lib/explorer_web/live/releases_helper.ex b/explorer/lib/explorer_web/live/releases_helper.ex index 7a9a6db351..4f8a3eb7e7 100644 --- a/explorer/lib/explorer_web/live/releases_helper.ex +++ b/explorer/lib/explorer_web/live/releases_helper.ex @@ -2,39 +2,6 @@ defmodule ReleasesHelper do require Logger def get_latest_release do - case do_fetch_latest_release() do - {:ok, tag} -> - tag - - {:error, reason} -> - Logger.error("Failed to fetch latest release: #{reason}") - nil - end - end - - defp do_fetch_latest_release do - with :ok <- fetch_tags(), - {:ok, tag} <- get_latest_tag() do - {:ok, tag} - end - end - - defp fetch_tags do - case System.cmd("git", ["fetch", "--tags"]) do - {_, 0} -> :ok - {error, _} -> {:error, "Failed to fetch tags: #{error}"} - end - end - - defp get_latest_tag do - case System.cmd("git", ["rev-list", "--tags", "--max-count=1"]) do - {sha, 0} -> - sha = String.trim(sha) - case System.cmd("git", ["describe", "--tags", sha]) do - {tag, 0} -> {:ok, String.trim(tag)} - {_, _} -> {:error, "Failed to describe tag"} - end - {_, _} -> {:error, "No tags found or not a git repository"} - end + System.get_env("LATEST_RELEASE") end end diff --git a/explorer/start.sh b/explorer/start.sh index 1763d73149..dd49823a58 100755 --- a/explorer/start.sh +++ b/explorer/start.sh @@ -16,6 +16,7 @@ env_vars=( "TRACKER_API_URL" "MAX_BATCH_SIZE" "BATCH_TTL_MINUTES" + "LATEST_RELEASE" ) for var in "${env_vars[@]}"; do From 422f6d4d0d5886393808857af70077d1c9c2875c Mon Sep 17 00:00:00 2001 From: PatStiles <33334338+PatStiles@users.noreply.github.com> Date: Tue, 14 Jan 2025 13:47:40 -0300 Subject: [PATCH 09/10] feat(alerts): Display the number of proofs in a batch from the created task (#1727) Co-authored-by: Julian Arce <52429267+JuArce@users.noreply.github.com> --- alerts/sender_with_alert.sh | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/alerts/sender_with_alert.sh b/alerts/sender_with_alert.sh index 3b70d57d7c..64d372627b 100755 --- a/alerts/sender_with_alert.sh +++ b/alerts/sender_with_alert.sh @@ -53,6 +53,22 @@ function fetch_tx_cost() { fi } +# Function to get the tx cost from the tx hash +# @param tx_hash +function get_number_proofs_in_batch_from_create_task_tx() { + if [[ -z "$1" ]]; then + echo 0 + else + # Get the tx receipt from the blockchain + calldata=$(cast tx $1 --rpc-url $RPC_URL input) + decoded_calldata=$(cast --calldata-decode --json "createNewTask(bytes32 batchMerkleRoot, string batchDataPointer, address[] proofSubmitters, uint256 feeForAggregator, uint256 feePerProof, uint256 respondToTaskFeeLimit)" $calldata) + # We count the number of proofSubmitters within the tx which corresponds to the number of proofs sent in the last batch + number_proofs_in_batch=$(echo $decoded_calldata | jq '.[2] | [ match(","; "g")] | length + 1') + + echo $number_proofs_in_batch + fi +} + # Function to send PagerDuty alert # @param message function send_pagerduty_alert() { @@ -94,7 +110,7 @@ do --rpc_url $RPC_URL \ --batcher_url $BATCHER_URL \ --network $NETWORK \ - --max_fee 4000000000000000 \ + --max_fee 0.004ether \ 2>&1) echo "$submit" @@ -113,6 +129,7 @@ do fi total_fee_in_wei=0 + total_number_proofs=0 batch_explorer_urls=() for batch_merkle_root in $batch_merkle_roots do @@ -127,12 +144,16 @@ do response_tx_hash=$(echo "$log" | grep -oE "transactionHash: 0x[[:alnum:]]{64}" | awk '{ print $2 }') # Calculate fees for transactions + number_proofs_in_batch=$(get_number_proofs_in_batch_from_create_task_tx $submission_tx_hash) submission_fee_in_wei=$(fetch_tx_cost $submission_tx_hash) response_fee_in_wei=$(fetch_tx_cost $response_tx_hash) batch_fee_in_wei=$((submission_fee_in_wei + response_fee_in_wei)) # Accumulate the fee total_fee_in_wei=$(($total_fee_in_wei + $batch_fee_in_wei)) + + # Accumulate proofs in batch + total_number_proofs=$(($total_number_proofs + $number_proofs_in_batch)) done # Calculate the spent amount by converting the fee to ETH @@ -168,9 +189,9 @@ do done if [ $verified -eq 1 ]; then - slack_message="$REPETITIONS Proofs submitted and verified. Spent amount: $spent_amount ETH ($ $spent_amount_usd) [ ${batch_explorer_urls[@]} ]" + slack_message="$total_number_proofs proofs submitted and verified. We sent $REPETITIONS proofs. Spent amount: $spent_amount ETH ($ $spent_amount_usd) [ ${batch_explorer_urls[@]} ]" else - slack_message="$REPETITIONS Proofs submitted but not verified. Spent amount: $spent_amount ETH ($ $spent_amount_usd) [ ${batch_explorer_urls[@]} ]" + slack_message="$total_number_proofs proofs submitted but not verified. We sent $REPETITIONS proofs. Spent amount: $spent_amount ETH ($ $spent_amount_usd) [ ${batch_explorer_urls[@]} ]" fi ## Send Update to Slack From eabda9c7a2c8c538843443128d187e02f49b61b9 Mon Sep 17 00:00:00 2001 From: Julian Arce <52429267+JuArce@users.noreply.github.com> Date: Fri, 17 Jan 2025 17:12:47 -0300 Subject: [PATCH 10/10] hotfix(CI): update devnet aligned_service_manager in sdk and update docker config files (#1752) --- Makefile | 7 +++++++ batcher/aligned-sdk/src/sdk.rs | 2 +- config-files/config-aggregator-docker.yaml | 7 +++++++ config-files/config-batcher-docker.yaml | 1 - ...ocker.yaml => config-operator-docker.yaml} | 19 +------------------ docker-compose.yaml | 8 ++++---- docker/operator.Dockerfile | 2 +- 7 files changed, 21 insertions(+), 25 deletions(-) rename config-files/{config-docker.yaml => config-operator-docker.yaml} (74%) diff --git a/Makefile b/Makefile index cc42002816..fe08cb2447 100644 --- a/Makefile +++ b/Makefile @@ -1046,11 +1046,18 @@ docker_verify_proof_submission_success: verification=$$(aligned verify-proof-onchain \ --aligned-verification-data $${proof} \ --rpc_url $$(echo $(DOCKER_RPC_URL)) 2>&1); \ + cat $${proof%.cbor}.json; \ + echo "$$verification"; \ if echo "$$verification" | grep -q not; then \ echo "ERROR: Proof verification failed for $${proof}"; \ exit 1; \ elif echo "$$verification" | grep -q verified; then \ echo "Proof verification succeeded for $${proof}"; \ + else \ + echo "WARNING: Unexpected verification result for $${proof}"; \ + echo "Output:"; \ + echo "$$verification"; \ + exit 1; \ fi; \ echo "---------------------------------------------------------------------------------------------------"; \ done; \ diff --git a/batcher/aligned-sdk/src/sdk.rs b/batcher/aligned-sdk/src/sdk.rs index f57b2aed56..e933ab6f8d 100644 --- a/batcher/aligned-sdk/src/sdk.rs +++ b/batcher/aligned-sdk/src/sdk.rs @@ -284,7 +284,7 @@ pub fn get_payment_service_address(network: Network) -> ethers::types::H160 { pub fn get_aligned_service_manager_address(network: Network) -> ethers::types::H160 { match network { - Network::Devnet => H160::from_str("0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8").unwrap(), + Network::Devnet => H160::from_str("0x851356ae760d987E095750cCeb3bC6014560891C").unwrap(), Network::Holesky => H160::from_str("0x58F280BeBE9B34c9939C3C39e0890C81f163B623").unwrap(), Network::HoleskyStage => { H160::from_str("0x9C5231FC88059C086Ea95712d105A2026048c39B").unwrap() diff --git a/config-files/config-aggregator-docker.yaml b/config-files/config-aggregator-docker.yaml index 6185fedf1b..a8a4dcd302 100644 --- a/config-files/config-aggregator-docker.yaml +++ b/config-files/config-aggregator-docker.yaml @@ -31,3 +31,10 @@ aggregator: garbage_collector_tasks_age: 20 #The age of tasks that will be removed by the GC, in blocks. Suggested value for prod: '216000' (30 days) garbage_collector_tasks_interval: 10 #The interval of queried blocks to get an old batch. Suggested value for prod: '900' (3 hours) bls_service_task_timeout: 168h # The timeout of bls aggregation service tasks. Suggested value for prod '168h' (7 days) + gas_base_bump_percentage: 25 # Percentage to overestimate gas price when sending a task + gas_bump_incremental_percentage: 20 # An extra percentage to overestimate in each bump of respond to task. This is additive between tries + # Gas used formula = est_gas_by_node * (gas_base_bump_percentage + gas_bum_incremental_percentage * i) / 100, where i is the iteration number. + gas_bump_percentage_limit: 150 # The max percentage to bump the gas price. + # The Gas formula is percentage (gas_base_bump_percentage + gas_bump_incremental_percentage * i) / 100) is checked against this value + # If it is higher, it will default to `gas_bump_percentage_limit` + time_to_wait_before_bump: 72s # The time to wait for the receipt when responding to task. Suggested value 72 seconds (6 blocks) diff --git a/config-files/config-batcher-docker.yaml b/config-files/config-batcher-docker.yaml index 05818bd7f3..0db1e4966a 100644 --- a/config-files/config-batcher-docker.yaml +++ b/config-files/config-batcher-docker.yaml @@ -24,7 +24,6 @@ batcher: max_proof_size: 67108864 # 64 MiB max_batch_byte_size: 268435456 # 256 MiB max_batch_proof_qty: 3000 # 3000 proofs in a batch - eth_ws_reconnects: 99999999999999 pre_verification_is_enabled: true metrics_port: 9093 telemetry_ip_port_address: localhost:4001 diff --git a/config-files/config-docker.yaml b/config-files/config-operator-docker.yaml similarity index 74% rename from config-files/config-docker.yaml rename to config-files/config-operator-docker.yaml index 18c7be892f..57aed7f159 100644 --- a/config-files/config-docker.yaml +++ b/config-files/config-operator-docker.yaml @@ -19,23 +19,6 @@ bls: private_key_store_path: "config-files/anvil.bls.key.json" private_key_store_password: "" -## Batcher configurations -batcher: - block_interval: 3 - batch_size_interval: 10 - max_proof_size: 67108864 # 64 MiB - max_batch_byte_size: 268435456 # 256 MiB - eth_ws_reconnects: 99999999999999 - pre_verification_is_enabled: true - -## Aggregator Configurations -aggregator: - server_ip_port_address: localhost:8090 - bls_public_key_compendium_address: 0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44 - avs_service_manager_address: 0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690 - enable_metrics: true - metrics_ip_port_address: localhost:9091 - ## Operator Configurations operator: aggregator_rpc_server_ip_port_address: aggregator:8090 @@ -47,7 +30,7 @@ operator: metadata_url: "https://yetanotherco.github.io/operator_metadata/metadata.json" enable_metrics: true metrics_ip_port_address: localhost:9092 - max_batch_byte_size: 268435456 # 256 MiB + max_batch_size: 268435456 # 256 MiB last_processed_batch_filepath: config-files/operator.last_processed_batch.json # Operators variables needed for register it in EigenLayer el_delegation_manager_address: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9" diff --git a/docker-compose.yaml b/docker-compose.yaml index a91ab2b618..24237a8569 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -40,7 +40,7 @@ services: register-operator-eigenlayer: image: ghcr.io/yetanotherco/aligned_layer/eigenlayer-cli:latest - command: ["sh", "-c", "echo '' | eigenlayer operator register config-files/config-docker.yaml"] + command: ["sh", "-c", "echo '' | eigenlayer operator register config-files/config-operator-docker.yaml"] build: context: . dockerfile: docker/eigenlayer-cli.Dockerfile @@ -58,7 +58,7 @@ services: operator-deposit-into-mock-strategy: image: ghcr.io/yetanotherco/aligned_layer/operator:latest - command: ["aligned-layer-operator", "deposit-into-strategy", "--config", "./config-files/config-docker.yaml", "--strategy-address", "0xc5a5C42992dECbae36851359345FE25997F5C42d", "--amount", "100000000000000000"] + command: ["aligned-layer-operator", "deposit-into-strategy", "--config", "./config-files/config-operator-docker.yaml", "--strategy-address", "0xc5a5C42992dECbae36851359345FE25997F5C42d", "--amount", "100000000000000000"] build: context: . dockerfile: docker/operator.Dockerfile @@ -76,7 +76,7 @@ services: operator-register-with-aligned-layer: image: ghcr.io/yetanotherco/aligned_layer/operator:latest - command: ["aligned-layer-operator", "register", "--config", "./config-files/config-docker.yaml"] + command: ["aligned-layer-operator", "register", "--config", "./config-files/config-operator-docker.yaml"] build: context: . dockerfile: docker/operator.Dockerfile @@ -85,7 +85,7 @@ services: operator: image: ghcr.io/yetanotherco/aligned_layer/operator:latest - command: ["aligned-layer-operator", "start", "--config", "./config-files/config-docker.yaml"] + command: ["aligned-layer-operator", "start", "--config", "./config-files/config-operator-docker.yaml"] build: context: . dockerfile: docker/operator.Dockerfile diff --git a/docker/operator.Dockerfile b/docker/operator.Dockerfile index aa3d7c9ce1..1c0afe9b15 100644 --- a/docker/operator.Dockerfile +++ b/docker/operator.Dockerfile @@ -29,4 +29,4 @@ COPY contracts ./contracts ENV LD_LIBRARY_PATH=/aligned_layer/operator/risc_zero/lib/ -CMD ["aligned-layer-operator", "start", "--config", "./config-files/config-docker.yaml"] +CMD ["aligned-layer-operator", "start", "--config", "./config-files/config-operator-docker.yaml"]