From c7e55228813d8bfe4b0051234898a8e2cfd4e403 Mon Sep 17 00:00:00 2001 From: Heemank Verma Date: Thu, 7 Nov 2024 18:44:58 +0530 Subject: [PATCH] update: env vars renamed --- .env.test | 140 +++++++++--------- crates/orchestrator/src/cli/alert/aws_sns.rs | 2 +- crates/orchestrator/src/cli/aws_config.rs | 8 +- crates/orchestrator/src/cli/da/ethereum.rs | 2 +- .../orchestrator/src/cli/database/mongodb.rs | 4 +- crates/orchestrator/src/cli/mod.rs | 1 - crates/orchestrator/src/cli/prover/sharp.rs | 20 +-- crates/orchestrator/src/cli/queue/aws_sqs.rs | 6 +- crates/orchestrator/src/cli/server.rs | 4 +- crates/orchestrator/src/cli/service.rs | 4 +- .../src/cli/settlement/ethereum.rs | 8 +- .../src/cli/settlement/starknet.rs | 12 +- crates/orchestrator/src/cli/snos.rs | 2 +- crates/orchestrator/src/cli/storage/aws_s3.rs | 2 +- .../sharp-service/src/config.rs | 1 - .../prover-services/sharp-service/src/lib.rs | 12 +- .../sharp-service/tests/lib.rs | 2 - 17 files changed, 108 insertions(+), 122 deletions(-) diff --git a/.env.test b/.env.test index 7a4349bd..77af8bb7 100644 --- a/.env.test +++ b/.env.test @@ -1,109 +1,103 @@ -##### ORCHESTRATOR ##### DONE -HOST=127.0.0.1 -PORT=3000 +#### AWS CONFIG #### -##### AWS CONFIG ##### DONE +AWS_ACCESS_KEY_ID=test +AWS_SECRET_ACCESS_KEY=test +AWS_REGION=us-east-1 -AWS_ACCESS_KEY_ID="AWS_ACCESS_KEY_ID" -AWS_SECRET_ACCESS_KEY="AWS_SECRET_ACCESS_KEY" -AWS_REGION="us-east-1" -# pick up by AWS sdk -AWS_ENDPOINT_URL="http://localhost.localstack.cloud:4566" -# Omniqueue -AWS_DEFAULT_REGION="localhost" +# For Aws sdk +MADARA_ORCHESTRATOR_AWS_ENDPOINT_URL=http://localhost.localstack.cloud:4566 +# For Omniqueue +MADARA_ORCHESTRATOR_AWS_DEFAULT_REGION=localhost -##### STORAGE ##### DONE -DATA_STORAGE="s3" +#### ALERTS #### -AWS_S3_BUCKET_NAME="madara-orchestrator-test-bucket" +MADARA_ORCHESTRATOR_AWS_SNS_ARN=arn:aws:sns:us-east-1:000000000000:madara-orchestrator-arn -##### QUEUE ##### +#### DATA AVAILABILITY #### -QUEUE_PROVIDER="sqs" +## ETHEREUM ## -SQS_SNOS_JOB_PROCESSING_QUEUE_URL="http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/madara_orchestrator_snos_job_processing_queue" -SQS_SNOS_JOB_VERIFICATION_QUEUE_URL="http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/madara_orchestrator_snos_job_verification_queue" +MADARA_ORCHESTRATOR_ETHEREUM_DA_RPC_URL=https://eth-sepolia.public.blastapi.io -SQS_PROVING_JOB_PROCESSING_QUEUE_URL="http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/madara_orchestrator_proving_job_processing_queue" -SQS_PROVING_JOB_VERIFICATION_QUEUE_URL="http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/madara_orchestrator_proving_job_verification_queue" -SQS_DATA_SUBMISSION_JOB_PROCESSING_QUEUE_URL="http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/madara_orchestrator_data_submission_job_processing_queue" -SQS_DATA_SUBMISSION_JOB_VERIFICATION_QUEUE_URL="http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/madara_orchestrator_data_submission_job_verification_queue" +#### DATABASE #### -SQS_UPDATE_STATE_JOB_PROCESSING_QUEUE_URL="http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/madara_orchestrator_update_state_job_processing_queue" -SQS_UPDATE_STATE_JOB_VERIFICATION_QUEUE_URL="http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/madara_orchestrator_update_state_job_verification_queue" +## MONGODB ## -SQS_JOB_HANDLE_FAILURE_QUEUE_URL="http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/madara_orchestrator_job_handle_failure_queue" -SQS_WORKER_TRIGGER_QUEUE_URL="http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/madara_orchestrator_worker_trigger_queue" +MADARA_ORCHESTRATOR_MONGODB_CONNECTION_URL=mongodb://localhost:27017 +MADARA_ORCHESTRATOR_DATABASE_NAME=madara-orchestrator-test -##### SNS ##### -ALERTS="sns" +#### PROVER #### -AWS_SNS_ARN="arn:aws:sns:us-east-1:000000000000:madara-orchestrator-arn" +## SHARP ## -##### DATABASE ##### +MADARA_ORCHESTRATOR_SHARP_CUSTOMER_ID=sharp_consumer_id +MADARA_ORCHESTRATOR_SHARP_URL=http://127.0.0.1:6000 +MADARA_ORCHESTRATOR_SHARP_USER_CRT=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUR4ekNDQXErZ0F3SUJBZ0lVTjBSK0xpb1MzL2ZadUZsK291RjZNNFk2RnRZd0RRWUpLb1pJaHZjTkFRRUwKQlFBd2N6RUxNQWtHQTFVRUJoTUNTVTR4RXpBUkJnTlZCQWdNQ2xOdmJXVXRVM1JoZEdVeElUQWZCZ05WQkFvTQpHRWx1ZEdWeWJtVjBJRmRwWkdkcGRITWdVSFI1SUV4MFpERU5NQXNHQTFVRUF3d0VVMVJTU3pFZE1Cc0dDU3FHClNJYjNEUUVKQVJZT1lXSmpRR3RoY201dmRDNTRlWG93SGhjTk1qUXdPREV6TVRNd05UTTBXaGNOTWpVd09ERXoKTVRNd05UTTBXakJ6TVFzd0NRWURWUVFHRXdKSlRqRVRNQkVHQTFVRUNBd0tVMjl0WlMxVGRHRjBaVEVoTUI4RwpBMVVFQ2d3WVNXNTBaWEp1WlhRZ1YybGtaMmwwY3lCUWRIa2dUSFJrTVEwd0N3WURWUVFEREFSVFZGSkxNUjB3Ckd3WUpLb1pJaHZjTkFRa0JGZzVoWW1OQWEyRnlibTkwTG5oNWVqQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQUQKZ2dFUEFEQ0NBUW9DZ2dFQkFOSEta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0x07ec0D28e50322Eb0C159B9090ecF3aeA8346DFe -DATABASE="mongodb" -MONGODB_CONNECTION_STRING="mongodb://localhost:27017" -DATABASE_NAME="orchestrator" +#### QUEUE #### -##### PROVER ##### +## AWS SQS ## -PROVER_SERVICE="sharp" +MADARA_ORCHESTRATOR_SQS_PREFIX=madara_orchestrator +MADARA_ORCHESTRATOR_SQS_SUFFIX=queue +MADARA_ORCHESTRATOR_SQS_BASE_QUEUE_URL=http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/ -SHARP_CUSTOMER_ID="sharp_consumer_id" -SHARP_URL="http://127.0.0.1:6000" -# [IMP!!!] These are test certificates (they don't work) -SHARP_USER_CRT="LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUR4ekNDQXErZ0F3SUJBZ0lVTjBSK0xpb1MzL2ZadUZsK291RjZNNFk2RnRZd0RRWUpLb1pJaHZjTkFRRUwKQlFBd2N6RUxNQWtHQTFVRUJoTUNTVTR4RXpBUkJnTlZCQWdNQ2xOdmJXVXRVM1JoZEdVeElUQWZCZ05WQkFvTQpHRWx1ZEdWeWJtVjBJRmRwWkdkcGRITWdVSFI1SUV4MFpERU5NQXNHQTFVRUF3d0VVMVJTU3pFZE1Cc0dDU3FHClNJYjNEUUVKQVJZT1lXSmpRR3RoY201dmRDNTRlWG93SGhjTk1qUXdPREV6TVRNd05UTTBXaGNOTWpVd09ERXoKTVRNd05UTTBXakJ6TVFzd0NRWURWUVFHRXdKSlRqRVRNQkVHQTFVRUNBd0tVMjl0WlMxVGRHRjBaVEVoTUI4RwpBMVVFQ2d3WVNXNTBaWEp1WlhRZ1YybGtaMmwwY3lCUWRIa2dUSFJrTVEwd0N3WURWUVFEREFSVFZGSkxNUjB3Ckd3WUpLb1pJaHZjTkFRa0JGZzVoWW1OQWEyRnlibTkwTG5oNWVqQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQUQKZ2dFUEFEQ0NBUW9DZ2dFQkFOSEtaUGRqWSs4Q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ESTRATOR_ETHEREUM_SETTLEMENT_RPC_URL=https://eth-sepolia.public.blastapi.io +MADARA_ORCHESTRATOR_ETHEREUM_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 +MADARA_ORCHESTRATOR_L1_CORE_CONTRACT_ADDRESS=0xE2Bb56ee936fd6433DC0F6e7e3b8365C906AA057 +MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS=0x5b98B836969A60FEC50Fa925905Dd1D382a7db43 -##### SETTLEMENT ##### +## STARKNET ## -SETTLEMENT_LAYER="ethereum" +MADARA_ORCHESTRATOR_STARKNET_SETTLEMENT_RPC_URL=https://starknet-sepolia.public.blastapi.io +MADARA_ORCHESTRATOR_STARKNET_PRIVATE_KEY=0x76f2ccdb23f29bc7b69278e947c01c6160a31cf02c19d06d0f6e5ab1d768b86 +MADARA_ORCHESTRATOR_STARKNET_ACCOUNT_ADDRESS=0x3bb306a004034dba19e6cf7b161e7a4fef64bc1078419e8ad1876192f0b8cd1 +MADARA_ORCHESTRATOR_STARKNET_CAIRO_CORE_CONTRACT_ADDRESS="" +MADARA_ORCHESTRATOR_STARKNET_FINALITY_RETRY_WAIT_IN_SECS="" +MADARA_ORCHESTRATOR_MADARA_BINARY_PATH="/path/to/madara" -# Ethereum -SETTLEMENT_RPC_URL="https://eth-sepolia.public.blastapi.io" -ETHEREUM_PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" -L1_CORE_CONTRACT_ADDRESS="0xE2Bb56ee936fd6433DC0F6e7e3b8365C906AA057" -STARKNET_OPERATOR_ADDRESS="0x5b98B836969A60FEC50Fa925905Dd1D382a7db43" +#### STORAGE #### -# Starknet +## AWS S3 ## -STARKNET_RPC_URL="https://starknet-sepolia.public.blastapi.io" -STARKNET_PRIVATE_KEY=0x76f2ccdb23f29bc7b69278e947c01c6160a31cf02c19d06d0f6e5ab1d768b86 -STARKNET_ACCOUNT_ADDRESS=0x3bb306a004034dba19e6cf7b161e7a4fef64bc1078419e8ad1876192f0b8cd1 -STARKNET_CAIRO_CORE_CONTRACT_ADDRESS="" -STARKNET_FINALITY_RETRY_WAIT_IN_SECS="" -MADARA_BINARY_PATH="/path/to/madara" +MADARA_ORCHESTRATOR_AWS_S3_BUCKET_NAME=madara-orchestrator-test-bucket -##### SNOS ##### -## This is needed right now because Madara doesn't support getProof -RPC_FOR_SNOS="" -MAX_BLOCK_TO_PROCESS= -MIN_BLOCK_TO_PROCESS= +#### INSTRUMENTATION #### -## Instrumentation -OTEL_SERVICE_NAME="madara_orchestrator" -OTEL_COLLECTOR_ENDPOINT="" +## OTEL ## -##### ON CHAIN CONFIG ##### +MADARA_ORCHESTRATOR_OTEL_SERVICE_NAME=orchestrator +MADARA_ORCHESTRATOR_OTEL_COLLECTOR_ENDPOINT=http://localhost:4317 -MADARA_RPC_URL=http://localhost:9944 -##### Tests ##### -# Can be removed, we already have AWS_SNS_ARN -AWS_SNS_ARN_NAME="madara-orchestrator-arn" +#### SERVER #### + +MADARA_ORCHESTRATOR_HOST=127.0.0.1 +MADARA_ORCHESTRATOR_PORT=3000 + + +#### SERVICE #### + +MADARA_ORCHESTRATOR_MAX_BLOCK_NO_TO_PROCESS=1000 +MADARA_ORCHESTRATOR_MIN_BLOCK_NO_TO_PROCESS=0 + + +#### SNOS #### + +MADARA_ORCHESTRATOR_RPC_FOR_SNOS=https://rpc.sepolia.madara.xyz diff --git a/crates/orchestrator/src/cli/alert/aws_sns.rs b/crates/orchestrator/src/cli/alert/aws_sns.rs index 340f7686..ff6ceb26 100644 --- a/crates/orchestrator/src/cli/alert/aws_sns.rs +++ b/crates/orchestrator/src/cli/alert/aws_sns.rs @@ -9,6 +9,6 @@ pub struct AWSSNSCliArgs { pub aws_sns: bool, /// The name of the S3 bucket. - #[arg(env = "SNS_NAME", long, default_value = Some("madara-orchestrator-arn"))] + #[arg(env = "MADARA_ORCHESTRATOR_AWS_SNS_ARN", long, default_value = Some("madara-orchestrator-arn"))] pub sns_arn: Option, } diff --git a/crates/orchestrator/src/cli/aws_config.rs b/crates/orchestrator/src/cli/aws_config.rs index c8cb4745..f24a1de3 100644 --- a/crates/orchestrator/src/cli/aws_config.rs +++ b/crates/orchestrator/src/cli/aws_config.rs @@ -16,10 +16,14 @@ pub struct AWSConfigParams { pub aws_region: String, /// The endpoint URL. - #[arg(env = "AWS_ENDPOINT_URL", long, default_value = "http://localhost.localstack.cloud:4566")] + #[arg( + env = "MADARA_ORCHESTRATOR_AWS_ENDPOINT_URL", + long, + default_value = "http://localhost.localstack.cloud:4566" + )] pub aws_endpoint_url: String, /// The default region. - #[arg(env = "AWS_DEFAULT_REGION", long, default_value = "localhost")] + #[arg(env = "MADARA_ORCHESTRATOR_AWS_DEFAULT_REGION", long, default_value = "localhost")] pub aws_default_region: String, } diff --git a/crates/orchestrator/src/cli/da/ethereum.rs b/crates/orchestrator/src/cli/da/ethereum.rs index ef6a25b1..f95551ff 100644 --- a/crates/orchestrator/src/cli/da/ethereum.rs +++ b/crates/orchestrator/src/cli/da/ethereum.rs @@ -10,6 +10,6 @@ pub struct EthereumDaCliArgs { pub da_on_ethereum: bool, /// The RPC URL of the Ethereum node. - #[arg(env = "DA_RPC_URL", long)] + #[arg(env = "MADARA_ORCHESTRATOR_ETHEREUM_DA_RPC_URL", long)] pub da_rpc_url: Option, } diff --git a/crates/orchestrator/src/cli/database/mongodb.rs b/crates/orchestrator/src/cli/database/mongodb.rs index 9a912020..e7f0bc7f 100644 --- a/crates/orchestrator/src/cli/database/mongodb.rs +++ b/crates/orchestrator/src/cli/database/mongodb.rs @@ -9,10 +9,10 @@ pub struct MongoDBCliArgs { pub mongodb: bool, /// The connection string to the MongoDB server. - #[arg(env = "MONGODB_CONNECTION_URL", long, default_value = Some("mongodb://localhost:27017"))] + #[arg(env = "MADARA_ORCHESTRATOR_MONGODB_CONNECTION_URL", long, default_value = Some("mongodb://localhost:27017"))] pub connection_url: Option, /// The name of the database. - #[arg(env = "DATABASE_NAME", long, default_value = Some("orchestrator"))] + #[arg(env = "MADARA_ORCHESTRATOR_DATABASE_NAME", long, default_value = Some("orchestrator"))] pub database_name: Option, } diff --git a/crates/orchestrator/src/cli/mod.rs b/crates/orchestrator/src/cli/mod.rs index a3fdeb49..b1d439ed 100644 --- a/crates/orchestrator/src/cli/mod.rs +++ b/crates/orchestrator/src/cli/mod.rs @@ -224,7 +224,6 @@ impl RunCmd { sharp_url: self.sharp_args.sharp_url.clone().unwrap(), sharp_user_crt: self.sharp_args.sharp_user_crt.clone().unwrap(), sharp_user_key: self.sharp_args.sharp_user_key.clone().unwrap(), - sharp_rpc_node_url: self.sharp_args.sharp_rpc_node_url.clone().unwrap(), sharp_proof_layout: self.sharp_args.sharp_proof_layout.clone().unwrap(), gps_verifier_contract_address: self.sharp_args.gps_verifier_contract_address.clone().unwrap(), sharp_server_crt: self.sharp_args.sharp_server_crt.clone().unwrap(), diff --git a/crates/orchestrator/src/cli/prover/sharp.rs b/crates/orchestrator/src/cli/prover/sharp.rs index f98c6476..7a5798be 100644 --- a/crates/orchestrator/src/cli/prover/sharp.rs +++ b/crates/orchestrator/src/cli/prover/sharp.rs @@ -3,42 +3,38 @@ use url::Url; /// Parameters used to config Sharp. #[derive(Debug, Clone, Args)] -#[group(requires_all = ["sharp_customer_id", "sharp_url", "sharp_user_crt", "sharp_user_key", "sharp_rpc_node_url"])] +#[group(requires_all = ["sharp_customer_id", "sharp_url", "sharp_user_crt", "sharp_user_key", "sharp_server_crt", "sharp_proof_layout", "gps_verifier_contract_address"])] pub struct SharpCliArgs { /// Use the Sharp prover. #[arg(long)] pub sharp: bool, /// The customer id for Sharp. - #[arg(env = "SHARP_CUSTOMER_ID", long)] + #[arg(env = "MADARA_ORCHESTRATOR_SHARP_CUSTOMER_ID", long)] pub sharp_customer_id: Option, /// The URL of the Sharp server. - #[arg(env = "SHARP_URL", long)] + #[arg(env = "MADARA_ORCHESTRATOR_SHARP_URL", long)] pub sharp_url: Option, /// The user certificate for Sharp. - #[arg(env = "SHARP_USER_CRT", long)] + #[arg(env = "MADARA_ORCHESTRATOR_SHARP_USER_CRT", long)] pub sharp_user_crt: Option, /// The user key for Sharp. - #[arg(env = "SHARP_USER_KEY", long)] + #[arg(env = "MADARA_ORCHESTRATOR_SHARP_USER_KEY", long)] pub sharp_user_key: Option, - /// The RPC node URL for Sharp. - #[arg(env = "SHARP_RPC_NODE_URL", long)] - pub sharp_rpc_node_url: Option, - /// The server certificate for Sharp. - #[arg(env = "SHARP_SERVER_CRT", long)] + #[arg(env = "MADARA_ORCHESTRATOR_SHARP_SERVER_CRT", long)] pub sharp_server_crt: Option, /// The proof layout for Sharp. - #[arg(env = "SHARP_PROOF_LAYOUT", long, default_value = "small")] + #[arg(env = "MADARA_ORCHESTRATOR_SHARP_PROOF_LAYOUT", long, default_value = "small")] pub sharp_proof_layout: Option, // TODO: GPS is a direct dependency of Sharp, hence GPS can be kept in SharpParams /// The GPS verifier contract address. - #[arg(env = "GPS_VERIFIER_CONTRACT_ADDRESS", long)] + #[arg(env = "MADARA_ORCHESTRATOR_GPS_VERIFIER_CONTRACT_ADDRESS", long)] pub gps_verifier_contract_address: Option, } diff --git a/crates/orchestrator/src/cli/queue/aws_sqs.rs b/crates/orchestrator/src/cli/queue/aws_sqs.rs index f6378ed3..a3f9088d 100644 --- a/crates/orchestrator/src/cli/queue/aws_sqs.rs +++ b/crates/orchestrator/src/cli/queue/aws_sqs.rs @@ -9,14 +9,14 @@ pub struct AWSSQSCliArgs { pub aws_sqs: bool, /// The name of the S3 bucket. - #[arg(env = "SQS_PREFIX", long, default_value = Some("madara_orchestrator"))] + #[arg(env = "MADARA_ORCHESTRATOR_SQS_PREFIX", long, default_value = Some("madara_orchestrator"))] pub sqs_prefix: Option, /// The suffix of the queue. - #[arg(env = "SQS_SUFFIX", long, default_value = Some("queue"))] + #[arg(env = "MADARA_ORCHESTRATOR_SQS_SUFFIX", long, default_value = Some("queue"))] pub sqs_suffix: Option, /// The QUEUE url - #[arg(env = "SQS_BASE_QUEUE_URL", long)] + #[arg(env = "MADARA_ORCHESTRATOR_SQS_BASE_QUEUE_URL", long)] pub queue_base_url: Option, } diff --git a/crates/orchestrator/src/cli/server.rs b/crates/orchestrator/src/cli/server.rs index 6d4d02b3..77a2ac0b 100644 --- a/crates/orchestrator/src/cli/server.rs +++ b/crates/orchestrator/src/cli/server.rs @@ -5,10 +5,10 @@ use clap::Args; #[group(requires_all = ["host", "port"])] pub struct ServerCliArgs { /// The host to listen on. - #[arg(env = "HOST", long, default_value = "127.0.0.1")] + #[arg(env = "MADARA_ORCHESTRATOR_HOST", long, default_value = "127.0.0.1")] pub host: String, /// The port to listen on. - #[arg(env = "PORT", long, default_value = "3000")] + #[arg(env = "MADARA_ORCHESTRATOR_PORT", long, default_value = "3000")] pub port: u16, } diff --git a/crates/orchestrator/src/cli/service.rs b/crates/orchestrator/src/cli/service.rs index fe82a226..b829bc49 100644 --- a/crates/orchestrator/src/cli/service.rs +++ b/crates/orchestrator/src/cli/service.rs @@ -4,10 +4,10 @@ use clap::Args; #[group(requires_all = ["rpc_for_snos"])] pub struct ServiceCliArgs { /// The maximum block to process. - #[arg(env = "MAX_BLOCK_TO_PROCESS", long)] + #[arg(env = "MADARA_ORCHESTRATOR_MAX_BLOCK_NO_TO_PROCESS", long)] pub max_block_to_process: Option, /// The minimum block to process. - #[arg(env = "MIN_BLOCK_TO_PROCESS", long)] + #[arg(env = "MADARA_ORCHESTRATOR_MIN_BLOCK_NO_TO_PROCESS", long)] pub min_block_to_process: Option, } diff --git a/crates/orchestrator/src/cli/settlement/ethereum.rs b/crates/orchestrator/src/cli/settlement/ethereum.rs index 532955ae..ae47d197 100644 --- a/crates/orchestrator/src/cli/settlement/ethereum.rs +++ b/crates/orchestrator/src/cli/settlement/ethereum.rs @@ -9,18 +9,18 @@ pub struct EthereumSettlementCliArgs { pub settle_on_ethereum: bool, /// The URL of the Ethereum RPC node. - #[arg(env = "ETHEREUM_SETTLEMENT_RPC_URL", long)] + #[arg(env = "MADARA_ORCHESTRATOR_ETHEREUM_SETTLEMENT_RPC_URL", long)] pub ethereum_rpc_url: Option, /// The private key of the Ethereum account. - #[arg(env = "ETHEREUM_PRIVATE_KEY", long)] + #[arg(env = "MADARA_ORCHESTRATOR_ETHEREUM_PRIVATE_KEY", long)] pub ethereum_private_key: Option, /// The address of the L1 core contract. - #[arg(env = "L1_CORE_CONTRACT_ADDRESS", long)] + #[arg(env = "MADARA_ORCHESTRATOR_L1_CORE_CONTRACT_ADDRESS", long)] pub l1_core_contract_address: Option, /// The address of the Starknet operator. - #[arg(env = "STARKNET_OPERATOR_ADDRESS", long)] + #[arg(env = "MADARA_ORCHESTRATOR_STARKNET_OPERATOR_ADDRESS", long)] pub starknet_operator_address: Option, } diff --git a/crates/orchestrator/src/cli/settlement/starknet.rs b/crates/orchestrator/src/cli/settlement/starknet.rs index 23658f3c..b86bd4b3 100644 --- a/crates/orchestrator/src/cli/settlement/starknet.rs +++ b/crates/orchestrator/src/cli/settlement/starknet.rs @@ -9,26 +9,26 @@ pub struct StarknetSettlementCliArgs { pub settle_on_starknet: bool, /// The URL of the Ethereum RPC node. - #[arg(env = "STARKNET_RPC_URL", long)] + #[arg(env = "MADARA_ORCHESTRATOR_STARKNET_SETTLEMENT_RPC_URL", long)] pub starknet_rpc_url: Option, /// The private key of the Ethereum account. - #[arg(env = "STARKNET_PRIVATE_KEY", long)] + #[arg(env = "MADARA_ORCHESTRATOR_STARKNET_PRIVATE_KEY", long)] pub starknet_private_key: Option, /// The address of the Starknet account. - #[arg(env = "STARKNET_ACCOUNT_ADDRESS", long)] + #[arg(env = "MADARA_ORCHESTRATOR_STARKNET_ACCOUNT_ADDRESS", long)] pub starknet_account_address: Option, /// The address of the Cairo core contract. - #[arg(env = "STARKNET_CAIRO_CORE_CONTRACT_ADDRESS", long)] + #[arg(env = "MADARA_ORCHESTRATOR_STARKNET_CAIRO_CORE_CONTRACT_ADDRESS", long)] pub starknet_cairo_core_contract_address: Option, /// The number of seconds to wait for finality. - #[arg(env = "STARKNET_FINALITY_RETRY_WAIT_IN_SECS", long)] + #[arg(env = "MADARA_ORCHESTRATOR_STARKNET_FINALITY_RETRY_WAIT_IN_SECS", long)] pub starknet_finality_retry_wait_in_secs: Option, /// The path to the Madara binary. - #[arg(env = "MADARA_BINARY_PATH", long)] + #[arg(env = "MADARA_ORCHESTRATOR_MADARA_BINARY_PATH", long)] pub madara_binary_path: Option, } diff --git a/crates/orchestrator/src/cli/snos.rs b/crates/orchestrator/src/cli/snos.rs index 1fb81504..12851ac8 100644 --- a/crates/orchestrator/src/cli/snos.rs +++ b/crates/orchestrator/src/cli/snos.rs @@ -5,7 +5,7 @@ use url::Url; #[group(requires_all = ["rpc_for_snos"])] pub struct SNOSCliArgs { /// The RPC URL for SNOS. - #[arg(env = "RPC_FOR_SNOS", long)] + #[arg(env = "MADARA_ORCHESTRATOR_RPC_FOR_SNOS", long)] pub rpc_for_snos: Url, } diff --git a/crates/orchestrator/src/cli/storage/aws_s3.rs b/crates/orchestrator/src/cli/storage/aws_s3.rs index 871a7635..3b801261 100644 --- a/crates/orchestrator/src/cli/storage/aws_s3.rs +++ b/crates/orchestrator/src/cli/storage/aws_s3.rs @@ -9,6 +9,6 @@ pub struct AWSS3CliArgs { pub aws_s3: bool, /// The name of the S3 bucket. - #[arg(env = "AWS_S3_BUCKET_NAME", long, default_value = Some("madara-orchestrator-bucket"))] + #[arg(env = "MADARA_ORCHESTRATOR_AWS_S3_BUCKET_NAME", long, default_value = Some("madara-orchestrator-bucket"))] pub bucket_name: Option, } diff --git a/crates/prover-services/sharp-service/src/config.rs b/crates/prover-services/sharp-service/src/config.rs index a1e49ef6..accf8661 100644 --- a/crates/prover-services/sharp-service/src/config.rs +++ b/crates/prover-services/sharp-service/src/config.rs @@ -6,7 +6,6 @@ pub struct SharpParams { pub sharp_url: Url, pub sharp_user_crt: String, pub sharp_user_key: String, - pub sharp_rpc_node_url: Url, pub sharp_server_crt: String, pub sharp_proof_layout: String, pub gps_verifier_contract_address: String, diff --git a/crates/prover-services/sharp-service/src/lib.rs b/crates/prover-services/sharp-service/src/lib.rs index b26a9ecf..d8f9b8a7 100644 --- a/crates/prover-services/sharp-service/src/lib.rs +++ b/crates/prover-services/sharp-service/src/lib.rs @@ -135,10 +135,8 @@ impl SharpProverService { pub fn new_with_settings(sharp_params: &SharpParams) -> Self { let sharp_client = SharpClient::new_with_settings(sharp_params.sharp_url.clone(), sharp_params); - let fact_checker = FactChecker::new( - sharp_params.sharp_rpc_node_url.clone(), - sharp_params.gps_verifier_contract_address.clone(), - ); + let fact_checker = + FactChecker::new(sharp_params.sharp_url.clone(), sharp_params.gps_verifier_contract_address.clone()); Self::new(sharp_client, fact_checker) } @@ -147,10 +145,8 @@ impl SharpProverService { format!("http://127.0.0.1:{}", port).parse().expect("Failed to create sharp client with the given params"), sharp_params, ); - let fact_checker = FactChecker::new( - sharp_params.sharp_rpc_node_url.clone(), - sharp_params.gps_verifier_contract_address.clone(), - ); + let fact_checker = + FactChecker::new(sharp_params.sharp_url.clone(), sharp_params.gps_verifier_contract_address.clone()); Self::new(sharp_client, fact_checker) } } diff --git a/crates/prover-services/sharp-service/tests/lib.rs b/crates/prover-services/sharp-service/tests/lib.rs index 29c1c691..818c9075 100644 --- a/crates/prover-services/sharp-service/tests/lib.rs +++ b/crates/prover-services/sharp-service/tests/lib.rs @@ -26,7 +26,6 @@ async fn prover_client_submit_task_works() { sharp_url: Url::parse(&get_env_var_or_panic("SHARP_URL")).unwrap(), sharp_user_crt: get_env_var_or_panic("SHARP_USER_CRT"), sharp_user_key: get_env_var_or_panic("SHARP_USER_KEY"), - sharp_rpc_node_url: Url::parse(&get_env_var_or_panic("SHARP_RPC_NODE_URL")).unwrap(), sharp_server_crt: get_env_var_or_panic("SHARP_SERVER_CRT"), sharp_proof_layout: get_env_var_or_panic("SHARP_PROOF_LAYOUT"), gps_verifier_contract_address: get_env_var_or_panic("GPS_VERIFIER_CONTRACT_ADDRESS"), @@ -71,7 +70,6 @@ async fn prover_client_get_task_status_works(#[case] cairo_job_status: CairoJobS sharp_url: Url::parse(&get_env_var_or_panic("SHARP_URL")).unwrap(), sharp_user_crt: get_env_var_or_panic("SHARP_USER_CRT"), sharp_user_key: get_env_var_or_panic("SHARP_USER_KEY"), - sharp_rpc_node_url: Url::parse(&get_env_var_or_panic("SHARP_RPC_NODE_URL")).unwrap(), sharp_server_crt: get_env_var_or_panic("SHARP_SERVER_CRT"), sharp_proof_layout: get_env_var_or_panic("SHARP_PROOF_LAYOUT"), gps_verifier_contract_address: get_env_var_or_panic("GPS_VERIFIER_CONTRACT_ADDRESS"),