Skip to content

Commit

Permalink
update: fixing env
Browse files Browse the repository at this point in the history
  • Loading branch information
heemankv committed Nov 8, 2024
1 parent 103e462 commit 44bbe55
Show file tree
Hide file tree
Showing 22 changed files with 80 additions and 67 deletions.
28 changes: 14 additions & 14 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
##### ORCHESTRATOR #####

HOST=
PORT=
MAX_BLOCK_TO_PROCESS=
MADARA_ORCHESTRATOR_HOST=
MADARA_ORCHESTRATOR_PORT=
MADARA_ORCHESTRATOR_MAX_BLOCK_NO_TO_PROCESS=

##### AWS CONFIG #####

Expand All @@ -17,7 +17,7 @@ AWS_DEFAULT_REGION="localhost"
##### STORAGE #####

DATA_STORAGE=
AWS_S3_BUCKET_NAME=
MADARA_ORCHESTRATOR_AWS_S3_BUCKET_NAME=

##### QUEUE #####

Expand All @@ -30,13 +30,13 @@ SQS_WORKER_TRIGGER_QUEUE_URL=
##### SNS #####

ALERTS="sns"
AWS_SNS_ARN="arn:aws:sns:us-east-1:000000000000:madara-orchestrator-arn"
MADARA_ORCHESTRATOR_AWS_SNS_ARN="arn:aws:sns:us-east-1:000000000000:madara-orchestrator-arn"

##### DATABASE #####

DATABASE=
MONGODB_CONNECTION_STRING=
DATABASE_NAME=
MADARA_ORCHESTRATOR_MONGODB_CONNECTION_URL=
MADARA_ORCHESTRATOR_DATABASE_NAME=

##### PROVER #####

Expand All @@ -52,17 +52,17 @@ MADARA_ORCHESTRATOR_SHARP_PROOF_LAYOUT=

DA_LAYER=
SETTLEMENT_LAYER=
SETTLEMENT_RPC_URL=
MADARA_ORCHESTRATOR_ETHEREUM_SETTLEMENT_RPC_URL=
MADARA_ORCHESTRATOR_MADARA_RPC_URL=
MADARA_ORCHESTRATOR_GPS_VERIFIER_CONTRACT_ADDRESS=
PRIVATE_KEY=
ETHEREUM_PRIVATE_KEY=
L1_CORE_CONTRACT_ADDRESS=
MADARA_ORCHESTRATOR_ETHEREUM_PRIVATE_KEY=
MADARA_ORCHESTRATOR_L1_CORE_CONTRACT_ADDRESS=

##### STARKNET SETTLEMENT (L3s) #####
STARKNET_PRIVATE_KEY=
STARKNET_ACCOUNT_ADDRESS=
MADARA_ORCHESTRATOR_STARKNET_PRIVATE_KEY=
MADARA_ORCHESTRATOR_STARKNET_ACCOUNT_ADDRESS=

##### Instrumentation #####
OTEL_SERVICE_NAME=
OTEL_COLLECTOR_ENDPOINT=
MADARA_ORCHESTRATOR_OTEL_SERVICE_NAME=
MADARA_ORCHESTRATOR_OTEL_COLLECTOR_ENDPOINT=
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ MADARA_ORCHESTRATOR_PORT=3000

MADARA_ORCHESTRATOR_MAX_BLOCK_NO_TO_PROCESS=1000
MADARA_ORCHESTRATOR_MIN_BLOCK_NO_TO_PROCESS=0
MADARA_ORCHESTRATOR_MADARA_RPC_URL=http://localhost:9944
MADARA_ORCHESTRATOR_MADARA_RPC_URL=http://81.16.176.130:9545


#### SNOS ####
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
mv target/debug/madara ../madara-binary
cd ..
echo -e "
MADARA_BINARY_PATH=\"$(pwd)/madara-binary\"" >> .env.test
MADARA_ORCHESTRATOR_MADARA_BINARY_PATH=\"$(pwd)/madara-binary\"" >> .env.test
cat .env.test
- name: Getting neccesary files for testing
Expand All @@ -128,8 +128,8 @@ jobs:

- name: Run llvm-cov tests
env:
SETTLEMENT_RPC_URL: ${{ secrets.ETHEREUM_SEPOLIA_BLAST_RPC }}
RPC_FOR_SNOS: ${{ secrets.RPC_FOR_SNOS }}
MADARA_ORCHESTRATOR_ETHEREUM_SETTLEMENT_RPC_URL: ${{ secrets.ETHEREUM_SEPOLIA_BLAST_RPC }}
MADARA_ORCHESTRATOR_RPC_FOR_SNOS: ${{ secrets.RPC_FOR_SNOS }}
# the self hosted runner has a different region so we override it here
AWS_REGION: us-east-1
run: RUST_LOG=debug RUST_BACKTRACE=1 cargo llvm-cov nextest --release --features testing --lcov --output-path lcov.info --test-threads=1 --workspace --exclude=e2e-tests --no-fail-fast
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ jobs:
- name: Run e2e test
env:
SETTLEMENT_RPC_URL: ${{ secrets.ETHEREUM_SEPOLIA_BLAST_RPC }}
RPC_FOR_SNOS: ${{ secrets.RPC_FOR_SNOS }}
MADARA_ORCHESTRATOR_ETHEREUM_SETTLEMENT_RPC_URL: ${{ secrets.ETHEREUM_SEPOLIA_BLAST_RPC }}
MADARA_ORCHESTRATOR_RPC_FOR_SNOS: ${{ secrets.RPC_FOR_SNOS }}
# the self hosted runner has a different region so we override it here
AWS_REGION: us-east-1
run: |
Expand Down
6 changes: 6 additions & 0 deletions crates/orchestrator/src/alerts/aws_sns/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ pub struct AWSSNSParams {
pub sns_arn: String,
}

impl AWSSNSParams {
pub fn get_topic_name(&self) -> String {
self.sns_arn.split(":").last().unwrap().to_string()
}
}

pub struct AWSSNS {
client: Client,
topic_arn: String,
Expand Down
14 changes: 9 additions & 5 deletions crates/orchestrator/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,15 @@ pub async fn build_settlement_client(
// {
// Ok(Box::new(EthereumSettlementClient::with_test_settings(
//
// RootProvider::new_http(get_env_var_or_panic("SETTLEMENT_RPC_URL").as_str().parse()?),
// Address::from_str(&get_env_var_or_panic("L1_CORE_CONTRACT_ADDRESS"))?,
// Url::from_str(get_env_var_or_panic("SETTLEMENT_RPC_URL").as_str())?,
// RootProvider::new_http(get_env_var_or_panic("MADARA_ORCHESTRATOR_ETHEREUM_SETTLEMENT_RPC_URL"
// ).as_str().parse()?),
// Address::from_str(&get_env_var_or_panic("MADARA_ORCHESTRATOR_L1_CORE_CONTRACT_ADDRESS"))?,
//
// Url::from_str(get_env_var_or_panic("MADARA_ORCHESTRATOR_ETHEREUM_SETTLEMENT_RPC_URL").
// as_str())?,
//
// Some(Address::from_str(get_env_var_or_panic("STARKNET_OPERATOR_ADDRESS").as_str())?),
// )))
// Some(Address::from_str(get_env_var_or_panic("MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS").
// as_str())?), )))
// }
// }
// "starknet" =>
Expand All @@ -334,6 +337,7 @@ pub async fn build_alert_client(
) -> Box<dyn Alerts + Send + Sync> {
match alert_params {
AlertParams::AWSSNS(aws_sns_params) => {
println!("Building alert client {}", aws_sns_params.sns_arn);
Box::new(AWSSNS::new_with_settings(aws_sns_params, provider_config).await)
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/orchestrator/src/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fn get_otel_config(instrumentation: &InstrumentationParams) -> Option<OTELConfig
match otel_endpoint {
Some(endpoint) => Some(OTELConfig { endpoint, service_name: otel_service_name }),
_ => {
tracing::warn!("OTEL_COLLECTOR_ENDPOINT is not set");
tracing::warn!("MADARA_ORCHESTRATOR_OTEL_COLLECTOR_ENDPOINT is not set");
None
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/orchestrator/src/tests/alerts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async fn sns_alert_subscribe_to_topic_receive_alert_works() {
// subscribing the queue with the alerts
sns_client
.subscribe()
.topic_arn(get_env_var_or_panic("AWS_SNS_ARN").as_str())
.topic_arn(get_env_var_or_panic("MADARA_ORCHESTRATOR_AWS_SNS_ARN").as_str())
.protocol("sqs")
.endpoint(queue_arn)
.send()
Expand Down
10 changes: 7 additions & 3 deletions crates/orchestrator/src/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use chrono::{SubsecRound, Utc};
use mongodb::Client;
use rstest::*;
use serde::Deserialize;
use utils::env_utils::get_env_var_or_panic;

use crate::cli::alert::AlertParams;
use crate::cli::database::DatabaseParams;
use crate::cli::queue::QueueParams;
use crate::config::ProviderConfig;
Expand Down Expand Up @@ -48,9 +48,13 @@ pub fn custom_job_item(default_job_item: JobItem, #[default(String::from("0"))]
job_item
}

pub async fn create_sns_arn(provider_config: Arc<ProviderConfig>) -> Result<(), SdkError<CreateTopicError>> {
pub async fn create_sns_arn(
provider_config: Arc<ProviderConfig>,
alert_params: &AlertParams,
) -> Result<(), SdkError<CreateTopicError>> {
let AlertParams::AWSSNS(aws_sns_params) = alert_params;
let sns_client = get_sns_client(provider_config.get_aws_client_or_panic()).await;
sns_client.create_topic().name(get_env_var_or_panic("MADARA_ORCHESTRATOR_AWS_SNS_ARN")).send().await?;
sns_client.create_topic().name(aws_sns_params.get_topic_name()).send().await?;
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion crates/orchestrator/src/tests/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl TestConfigBuilder {
// Deleting the database
drop_database(&db_params).await.expect("Unable to drop the database.");
// Creating the SNS ARN
create_sns_arn(provider_config.clone()).await.expect("Unable to create the sns arn");
create_sns_arn(provider_config.clone(), &alert_params).await.expect("Unable to create the sns arn");

let config = Arc::new(Config::new(
orchestrator_config,
Expand Down
2 changes: 1 addition & 1 deletion crates/orchestrator/src/tests/jobs/snos_job/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async fn test_verify_job(#[from(default_job_item)] mut job_item: JobItem) {
/// We have a private pathfinder node used to run the Snos [prove_block] function.
/// It must be set or the test below will be ignored, since the Snos cannot run
/// without a Pathinder node for the moment.
const SNOS_PATHFINDER_RPC_URL_ENV: &str = "RPC_FOR_SNOS";
const SNOS_PATHFINDER_RPC_URL_ENV: &str = "MADARA_ORCHESTRATOR_RPC_FOR_SNOS";

#[rstest]
#[tokio::test(flavor = "multi_thread")]
Expand Down
2 changes: 1 addition & 1 deletion crates/settlement-clients/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use tokio::time::sleep;

use crate::types::{bytes_be_to_u128, convert_stark_bigint_to_u256};

pub const ENV_PRIVATE_KEY: &str = "ETHEREUM_PRIVATE_KEY";
pub const ENV_PRIVATE_KEY: &str = "MADARA_ORCHESTRATOR_ETHEREUM_PRIVATE_KEY";
const X_0_POINT_OFFSET: usize = 10;
const Y_LOW_POINT_OFFSET: usize = 14;
const Y_HIGH_POINT_OFFSET: usize = Y_LOW_POINT_OFFSET + 1;
Expand Down
10 changes: 5 additions & 5 deletions crates/settlement-clients/ethereum/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ lazy_static! {
.expect("Path contains invalid Unicode")
.to_string();
static ref ETH_RPC: String = get_env_var_or_panic("MADARA_ORCHESTRATOR_STARKNET_SETTLEMENT_RPC_URL");
pub static ref STARKNET_OPERATOR_ADDRESS: Address =
pub static ref MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS: Address =
Address::from_str(get_env_var_or_panic("MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS").as_str())
.expect("Could not parse MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS");
static ref STARKNET_CORE_CONTRACT_ADDRESS: Address =
Expand Down Expand Up @@ -139,8 +139,8 @@ mod settlement_client_tests {
use super::{BLOCK_TIME, ENV_FILE_PATH};
use crate::conversion::to_padded_hex;
use crate::tests::{
DummyCoreContract, EthereumTestBuilder, Pipe, CURRENT_PATH, STARKNET_CORE_CONTRACT,
STARKNET_CORE_CONTRACT_ADDRESS, STARKNET_OPERATOR_ADDRESS,
DummyCoreContract, EthereumTestBuilder, Pipe, CURRENT_PATH, MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS,
STARKNET_CORE_CONTRACT, STARKNET_CORE_CONTRACT_ADDRESS,
};
use crate::types::{bytes_be_to_u128, convert_stark_bigint_to_u256};
use crate::{EthereumSettlementClient, EthereumSettlementParams, Y_HIGH_POINT_OFFSET, Y_LOW_POINT_OFFSET};
Expand Down Expand Up @@ -232,7 +232,7 @@ mod settlement_client_tests {

let setup = EthereumTestBuilder::new()
.with_fork_block(fork_block_no)
.with_impersonator(*STARKNET_OPERATOR_ADDRESS)
.with_impersonator(*MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS)
.build()
.await;

Expand All @@ -242,7 +242,7 @@ mod settlement_client_tests {

let nonce = setup
.provider
.get_transaction_count(*STARKNET_OPERATOR_ADDRESS)
.get_transaction_count(*MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS)
.await
.unwrap()
.to_string()
Expand Down
4 changes: 2 additions & 2 deletions crates/settlement-clients/starknet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ pub struct StarknetSettlementClient {
pub tx_finality_retry_delay_in_seconds: u64,
}

pub const ENV_ACCOUNT_ADDRESS: &str = "STARKNET_ACCOUNT_ADDRESS";
pub const ENV_PRIVATE_KEY: &str = "STARKNET_PRIVATE_KEY";
pub const ENV_ACCOUNT_ADDRESS: &str = "MADARA_ORCHESTRATOR_STARKNET_ACCOUNT_ADDRESS";
pub const ENV_PRIVATE_KEY: &str = "MADARA_ORCHESTRATOR_STARKNET_PRIVATE_KEY";

const MAX_RETRIES_VERIFY_TX_FINALITY: usize = 10;

Expand Down
2 changes: 1 addition & 1 deletion crates/settlement-clients/starknet/src/tests/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl MadaraCmdBuilder {
}

pub fn run(self) -> MadaraCmd {
let target_bin = env::var("MADARA_BINARY_PATH").expect("failed to get binary path");
let target_bin = env::var("MADARA_ORCHESTRATOR_MADARA_BINARY_PATH").expect("failed to get binary path");
let target_bin = PathBuf::from(target_bin);

if !target_bin.exists() {
Expand Down
4 changes: 2 additions & 2 deletions crates/settlement-clients/starknet/src/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async fn setup(#[future] spin_up_madara: MadaraCmd) -> (LocalWalletSignerMiddlew
)
.parse::<u64>()
.unwrap(),
madara_binary_path: get_env_var_or_panic("MADARA_BINARY_PATH"),
madara_binary_path: get_env_var_or_panic("MADARA_ORCHESTRATOR_MADARA_BINARY_PATH"),
};

let rpc_url = Url::parse(starknet_settlement_params.starknet_rpc_url.as_ref()).unwrap();
Expand Down Expand Up @@ -129,7 +129,7 @@ async fn test_settle(#[future] setup: (LocalWalletSignerMiddleware, MadaraCmd))
)
.parse::<u64>()
.unwrap(),
madara_binary_path: get_env_var_or_panic("MADARA_BINARY_PATH"),
madara_binary_path: get_env_var_or_panic("MADARA_ORCHESTRATOR_MADARA_BINARY_PATH"),
};

let (account, _madara_process) = setup.await;
Expand Down
32 changes: 16 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ services:
app:
build: .
ports:
- "${PORT}:3000"
- "${MADARA_ORCHESTRATOR_PORT}:3000"
environment:
- HOST=${HOST:-127.0.0.1}
- PORT=${PORT:-3000}
- MADARA_ORCHESTRATOR_HOST=${MADARA_ORCHESTRATOR_HOST:-127.0.0.1}
- MADARA_ORCHESTRATOR_PORT=${MADARA_ORCHESTRATOR_PORT:-3000}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_REGION=${AWS_REGION:-us-east-1}
- AWS_ENDPOINT_URL=${AWS_ENDPOINT_URL}
- AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:-localhost}
- DATA_STORAGE=${DATA_STORAGE:-s3}
- AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME}
- MADARA_ORCHESTRATOR_AWS_S3_BUCKET_NAME=${MADARA_ORCHESTRATOR_AWS_S3_BUCKET_NAME}
- QUEUE_PROVIDER=${QUEUE_PROVIDER:-sqs}
- SQS_SNOS_JOB_PROCESSING_QUEUE_URL=${SQS_SNOS_JOB_PROCESSING_QUEUE_URL}
- SQS_SNOS_JOB_VERIFICATION_QUEUE_URL=${SQS_SNOS_JOB_VERIFICATION_QUEUE_URL}
Expand All @@ -27,10 +27,10 @@ services:
- SQS_JOB_HANDLE_FAILURE_QUEUE_URL=${SQS_JOB_HANDLE_FAILURE_QUEUE_URL}
- SQS_WORKER_TRIGGER_QUEUE_URL=${SQS_WORKER_TRIGGER_QUEUE_URL}
- ALERTS=${ALERTS:-sns}
- AWS_SNS_ARN=${AWS_SNS_ARN}
- MADARA_ORCHESTRATOR_AWS_SNS_ARN=${MADARA_ORCHESTRATOR_AWS_SNS_ARN}
- MADARA_ORCHESTRATOR_AWS_SNS_ARN=${MADARA_ORCHESTRATOR_AWS_SNS_ARN}
- DATABASE=${DATABASE:-mongodb}
- MONGODB_CONNECTION_STRING=${MONGODB_CONNECTION_STRING}
- MADARA_ORCHESTRATOR_MONGODB_CONNECTION_URL=${MADARA_ORCHESTRATOR_MONGODB_CONNECTION_URL}
- PROVER_SERVICE=${PROVER_SERVICE:-sharp}
- MADARA_ORCHESTRATOR_SHARP_CUSTOMER_ID=${MADARA_ORCHESTRATOR_SHARP_CUSTOMER_ID}
- MADARA_ORCHESTRATOR_SHARP_URL=${MADARA_ORCHESTRATOR_SHARP_URL}
Expand All @@ -40,19 +40,19 @@ services:
- MADARA_ORCHESTRATOR_SHARP_PROOF_LAYOUT=${MADARA_ORCHESTRATOR_SHARP_PROOF_LAYOUT:-small}
- DA_LAYER=${DA_LAYER:-ethereum}
- SETTLEMENT_LAYER=${SETTLEMENT_LAYER:-ethereum}
- SETTLEMENT_RPC_URL=${SETTLEMENT_RPC_URL}
- MADARA_ORCHESTRATOR_ETHEREUM_SETTLEMENT_RPC_URL=${MADARA_ORCHESTRATOR_ETHEREUM_SETTLEMENT_RPC_URL}
- MADARA_ORCHESTRATOR_MADARA_RPC_URL=${MADARA_ORCHESTRATOR_MADARA_RPC_URL}
- MEMORY_PAGES_CONTRACT_ADDRESS=${MEMORY_PAGES_CONTRACT_ADDRESS}
- ETHEREUM_PRIVATE_KEY=${ETHEREUM_PRIVATE_KEY}
- L1_CORE_CONTRACT_ADDRESS=${L1_CORE_CONTRACT_ADDRESS}
- RPC_FOR_SNOS=${RPC_FOR_SNOS}
- STARKNET_PRIVATE_KEY=${STARKNET_PRIVATE_KEY}
- STARKNET_ACCOUNT_ADDRESS=${STARKNET_ACCOUNT_ADDRESS}
- MADARA_BINARY_PATH=${MADARA_BINARY_PATH}
- OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME:-madara_orchestrator}
- OTEL_COLLECTOR_ENDPOINT=${OTEL_COLLECTOR_ENDPOINT}
- MADARA_ORCHESTRATOR_ETHEREUM_PRIVATE_KEY=${MADARA_ORCHESTRATOR_ETHEREUM_PRIVATE_KEY}
- MADARA_ORCHESTRATOR_L1_CORE_CONTRACT_ADDRESS=${MADARA_ORCHESTRATOR_L1_CORE_CONTRACT_ADDRESS}
- MADARA_ORCHESTRATOR_RPC_FOR_SNOS=${MADARA_ORCHESTRATOR_RPC_FOR_SNOS}
- MADARA_ORCHESTRATOR_STARKNET_PRIVATE_KEY=${MADARA_ORCHESTRATOR_STARKNET_PRIVATE_KEY}
- MADARA_ORCHESTRATOR_STARKNET_ACCOUNT_ADDRESS=${MADARA_ORCHESTRATOR_STARKNET_ACCOUNT_ADDRESS}
- MADARA_ORCHESTRATOR_MADARA_BINARY_PATH=${MADARA_ORCHESTRATOR_MADARA_BINARY_PATH}
- MADARA_ORCHESTRATOR_OTEL_SERVICE_NAME=${MADARA_ORCHESTRATOR_OTEL_SERVICE_NAME:-madara_orchestrator}
- MADARA_ORCHESTRATOR_OTEL_COLLECTOR_ENDPOINT=${MADARA_ORCHESTRATOR_OTEL_COLLECTOR_ENDPOINT}
- TRACING_LEVEL=${TRACING_LEVEL:-info}
- STARKNET_OPERATOR_ADDRESS=${STARKNET_OPERATOR_ADDRESS}
- MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS=${MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS}
depends_on:
- mongodb
- localstack
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/src/mock_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl MockServerGlobal {
then.json_body(return_val);
});

let snos_url = get_env_var_or_panic("RPC_FOR_SNOS");
let snos_url = get_env_var_or_panic("MADARA_ORCHESTRATOR_RPC_FOR_SNOS");
let snos_host = snos_url.split("://").last().unwrap().split(":").next().unwrap();
let snos_port = snos_url.split("://").last().unwrap().split(":").last().unwrap();
proxy_server.proxy(|rule| {
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl Orchestrator {
std::env::set_current_dir(repository_root).expect("Failed to change working directory");

let port_str = format!("{}", port);
let envs = [envs, vec![("PORT".to_string(), port_str)]].concat();
let envs = [envs, vec![("MADARA_ORCHESTRATOR_PORT".to_string(), port_str)]].concat();

let mut command = Command::new("cargo");
command
Expand Down
3 changes: 1 addition & 2 deletions e2e-tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use rstest::rstest;
use serde::{Deserialize, Serialize};
use serde_json::json;
use starknet::core::types::{Felt, MaybePendingStateUpdate};
use utils::env_utils::{get_env_var_optional, get_env_var_or_panic};
use utils::env_utils::get_env_var_or_panic;
use uuid::Uuid;

extern crate e2e_tests;
Expand Down Expand Up @@ -584,7 +584,6 @@ fn set_env_vars() -> Vec<(String, String)> {
"MADARA_ORCHESTRATOR_OTEL_SERVICE_NAME".to_string(),
get_env_var_or_panic("MADARA_ORCHESTRATOR_OTEL_SERVICE_NAME"),
),

// Server
("MADARA_ORCHESTRATOR_HOST".to_string(), get_env_var_or_panic("MADARA_ORCHESTRATOR_HOST")),
("MADARA_ORCHESTRATOR_PORT".to_string(), get_env_var_or_panic("MADARA_ORCHESTRATOR_PORT")),
Expand Down
Loading

0 comments on commit 44bbe55

Please sign in to comment.