Skip to content

Commit

Permalink
update: linters and package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
heemankv committed Mar 8, 2025
1 parent 564927d commit 00bc605
Show file tree
Hide file tree
Showing 22 changed files with 49 additions and 965 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
with:
path: target/release/madara
key: ${{ runner.os }}-madara-bin-${{ steps.binary_hash.outputs.hash }}

# Generate a unique hash for Cairo artifacts that includes both content and timestamp
# This ensures consistent Cairo artifacts between workflows while maintaining freshness
- name: Generate Cairo artifacts hash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Rust Cache
uses: Swatinem/rust-cache@v2

- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.8.2"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
uses: avto-dev/markdown-lint@v1
with:
config: "../.markdownlint.json"
args: "."

toml-lint:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions orchestrator/crates/da-clients/ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ alloy = { git = "https://github.com/alloy-rs/alloy", rev = "68952c0", features =
async-trait = { workspace = true }
c-kzg = { workspace = true }
color-eyre = { workspace = true }
orchestrator-da-client-interface = { workspace = true }
dotenvy.workspace = true
mockall = { workspace = true }
orchestrator-da-client-interface = { workspace = true }
orchestrator-utils = { workspace = true }
reqwest = { workspace = true }
rstest = { workspace = true }
serde = { workspace = true, features = ["derive"] }
starknet = { workspace = true }
tokio = { workspace = true }
url = { workspace = true }
orchestrator-utils = { workspace = true }

#Instrumentation
opentelemetry = { workspace = true, features = ["metrics", "logs"] }
Expand Down
18 changes: 9 additions & 9 deletions orchestrator/crates/orchestrator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ alloy = { version = "0.2.1", features = [
assert_matches = { workspace = true }
async-std = { workspace = true }
async-trait = { workspace = true }
orchestrator-atlantic-service = { workspace = true }
aws-config = { workspace = true, features = ["behavior-version-latest"] }
aws-credential-types = { workspace = true, features = [
"hardcoded-credentials",
Expand All @@ -41,10 +40,7 @@ cairo-vm = { workspace = true }
chrono = { workspace = true }
clap = { workspace = true }
color-eyre = { workspace = true }
orchestrator-da-client-interface = { workspace = true }
dotenvy = { workspace = true }
orchestrator-ethereum-da-client = { workspace = true, optional = true }
orchestrator-ethereum-settlement-client = { workspace = true }
futures = { workspace = true }
hex = { workspace = true }
itertools = { workspace = true }
Expand All @@ -60,25 +56,29 @@ num-bigint = { workspace = true }
num-traits = { workspace = true }
omniqueue = { workspace = true, optional = true }
once_cell = { workspace = true }
prove_block = { workspace = true }
orchestrator-atlantic-service = { workspace = true }
orchestrator-da-client-interface = { workspace = true }
orchestrator-ethereum-da-client = { workspace = true, optional = true }
orchestrator-ethereum-settlement-client = { workspace = true }
orchestrator-prover-client-interface = { workspace = true }
orchestrator-settlement-client-interface = { workspace = true }
orchestrator-sharp-service = { workspace = true }
orchestrator-starknet-settlement-client = { workspace = true }
prove_block = { workspace = true }
rstest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
orchestrator-settlement-client-interface = { workspace = true }
orchestrator-sharp-service = { workspace = true }
starknet = { workspace = true }
starknet-core = { workspace = true }
starknet-os = { workspace = true }
orchestrator-starknet-settlement-client = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }
tempfile = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] }

url = { workspace = true }
orchestrator-utils = { workspace = true }
url = { workspace = true }
uuid = { workspace = true, features = ["v4", "serde"] }

aws-sdk-iam = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion orchestrator/crates/orchestrator/src/queue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ lazy_static! {
#[async_trait]
pub trait QueueProvider: Send + Sync {
async fn send_message_to_queue(&self, queue: QueueType, payload: String, delay: Option<Duration>)
-> EyreResult<()>;
-> EyreResult<()>;
async fn consume_message_from_queue(&self, queue: QueueType) -> std::result::Result<Delivery, QueueError>;
async fn create_queue(&self, queue_config: &QueueConfig) -> EyreResult<()>;
async fn setup(&self) -> EyreResult<()> {
Expand Down
16 changes: 7 additions & 9 deletions orchestrator/crates/orchestrator/src/tests/jobs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,13 @@ async fn process_job_handles_panic() {
assert_eq!(job_in_db.status, JobStatus::Failed);

// Check that failure reason is recorded in common metadata
assert!(
job_in_db
.metadata
.common
.failure_reason
.as_ref()
.unwrap()
.contains("Job handler panicked with message: Simulated panic in process_job")
);
assert!(job_in_db
.metadata
.common
.failure_reason
.as_ref()
.unwrap()
.contains("Job handler panicked with message: Simulated panic in process_job"));
}

/// Tests `process_job` function when job is already existing in the db and job status is not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use httpmock::prelude::*;
use lazy_static::lazy_static;
use mockall::predicate::{always, eq};
use num_bigint::BigUint;
use rstest::*;
use orchestrator_settlement_client_interface::MockSettlementClient;
use rstest::*;
use starknet::providers::jsonrpc::HttpTransport;
use starknet::providers::JsonRpcClient;
use url::Url;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use std::error::Error;
use std::sync::Arc;

use orchestrator_da_client_interface::MockDaClient;
use httpmock::MockServer;
use mockall::predicate::eq;
use orchestrator_da_client_interface::MockDaClient;
use orchestrator_prover_client_interface::MockProverClient;
use rstest::rstest;
use orchestrator_settlement_client_interface::MockSettlementClient;
use rstest::rstest;
use starknet::providers::jsonrpc::HttpTransport;
use starknet::providers::JsonRpcClient;
use url::Url;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::error::Error;
use std::sync::Arc;

use orchestrator_da_client_interface::MockDaClient;
use httpmock::MockServer;
use mockall::predicate::eq;
use orchestrator_da_client_interface::MockDaClient;
use rstest::rstest;
use serde_json::json;
use starknet::providers::jsonrpc::HttpTransport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ chrono.workspace = true
color-eyre.workspace = true
dotenvy.workspace = true
env_logger.workspace = true
orchestrator-gps-fact-checker.workspace = true
hex.workspace = true
httpmock = { version = "0.8.0-alpha.1", features = ["proxy", "remote"] }
lazy_static.workspace = true
log.workspace = true
orchestrator-gps-fact-checker.workspace = true
orchestrator-prover-client-interface.workspace = true
orchestrator-utils.workspace = true
reqwest.workspace = true
rstest.workspace = true
serde.workspace = true
Expand All @@ -30,7 +31,6 @@ thiserror.workspace = true
tokio.workspace = true
tokio-util = { version = "0.7.12", features = ["codec"] }
url.workspace = true
orchestrator-utils.workspace = true
uuid.workspace = true

#Instrumentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ dotenvy.workspace = true
itertools.workspace = true
log.workspace = true
num-bigint.workspace = true
orchestrator-utils.workspace = true
serde.workspace = true
starknet.workspace = true
thiserror.workspace = true
tokio.workspace = true
url.workspace = true
orchestrator-utils.workspace = true

#Instrumentation
opentelemetry = { workspace = true, features = ["metrics", "logs"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition.workspace = true
[dependencies]
async-trait.workspace = true
cairo-vm.workspace = true
orchestrator-gps-fact-checker.workspace = true
mockall.workspace = true
orchestrator-gps-fact-checker.workspace = true
orchestrator-utils.workspace = true
starknet-os.workspace = true
thiserror.workspace = true
orchestrator-utils.workspace = true
4 changes: 2 additions & 2 deletions orchestrator/crates/prover-clients/sharp-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ base64.workspace = true
cairo-vm.workspace = true
color-eyre.workspace = true
dotenvy.workspace = true
orchestrator-gps-fact-checker.workspace = true
hex.workspace = true
httpmock = { version = "0.8.0-alpha.1", features = ["proxy", "remote"] }
lazy_static.workspace = true
log.workspace = true
orchestrator-gps-fact-checker.workspace = true
orchestrator-prover-client-interface.workspace = true
orchestrator-utils.workspace = true
reqwest.workspace = true
rstest.workspace = true
serde.workspace = true
Expand All @@ -24,7 +25,6 @@ starknet-os.workspace = true
thiserror.workspace = true
tokio.workspace = true
url.workspace = true
orchestrator-utils.workspace = true
uuid.workspace = true

#Instrumentation
Expand Down
4 changes: 2 additions & 2 deletions orchestrator/crates/settlement-clients/ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ dotenvy = { workspace = true }
lazy_static = { workspace = true }
log.workspace = true
mockall = { workspace = true }
orchestrator-settlement-client-interface = { workspace = true }
orchestrator-utils = { workspace = true }
reqwest = { workspace = true }
rstest = { workspace = true }
serde = { workspace = true, features = ["derive"] }
orchestrator-settlement-client-interface = { workspace = true }
starknet-os = { workspace = true }
tokio = { workspace = true }
url = { workspace = true }
orchestrator-utils = { workspace = true }

#Instrumentation
opentelemetry = { workspace = true, features = ["metrics", "logs"] }
Expand Down
2 changes: 1 addition & 1 deletion orchestrator/crates/settlement-clients/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ use color_eyre::eyre::{bail, Ok};
use color_eyre::Result;
use conversion::{get_input_data_for_eip_4844, prepare_sidecar};
use orchestrator_settlement_client_interface::{SettlementClient, SettlementVerificationStatus};
use url::Url;
#[cfg(feature = "testing")]
use orchestrator_utils::env_utils::get_env_var_or_panic;
use url::Url;

use crate::clients::interfaces::validity_interface::StarknetValidityContractTrait;
use crate::clients::StarknetValidityContractClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ axum = { workspace = true }
c-kzg = { workspace = true }
color-eyre = { workspace = true }
mockall = { workspace = true }
starknet = { workspace = true }
orchestrator-utils = { workspace = true }
starknet = { workspace = true }
4 changes: 2 additions & 2 deletions orchestrator/crates/settlement-clients/starknet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ dotenvy.workspace = true
lazy_static = { workspace = true }
log = { workspace = true }
mockall = { workspace = true }
orchestrator-settlement-client-interface = { workspace = true }
orchestrator-utils = { workspace = true }
reqwest = { workspace = true }
rstest = { workspace = true }
serde = { workspace = true }
orchestrator-settlement-client-interface = { workspace = true }
starknet = { workspace = true }
tempfile.workspace = true
tokio = { workspace = true }
url = { workspace = true }
orchestrator-utils = { workspace = true }

#Instrumentation
opentelemetry = { workspace = true, features = ["metrics", "logs"] }
Expand Down
1 change: 0 additions & 1 deletion orchestrator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"ethers": "^6.13.4",
"migrate-mongo": "^11.0.0",
"mongodb": "^6.9.0",
"prettier": "^3.4.2",
"prettier-plugin-solidity": "^1.4.2",
"starknet": "^6.11.0",
"uuid": "^10.0.0"
Expand Down
10 changes: 5 additions & 5 deletions orchestrator/scripts/artifacts/eth/MockGPSVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity ^0.8.0;

contract MockGPSVerifier {
// Returns true for any input fact hash
function isValid(bytes32) public pure returns (bool) {
return true;
}
}
// Returns true for any input fact hash
function isValid(bytes32) public pure returns (bool) {
return true;
}
}
Loading

0 comments on commit 00bc605

Please sign in to comment.