Skip to content

Commit

Permalink
update: orchestrator merge
Browse files Browse the repository at this point in the history
  • Loading branch information
heemankv committed Mar 8, 2025
1 parent 00b432d commit 564927d
Show file tree
Hide file tree
Showing 74 changed files with 3,407 additions and 973 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ jobs:
sudo apt update
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler gcc g++ build-essential libssl-dev pkg-config curl wget git libclang-dev
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- name: Install Rust toolchain using rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup toolchain install nightly-2024-09-05 --profile minimal
rustup default nightly-2024-09-05
rustup override set nightly-2024-09-05
rustup show
- name: Rust Cache
uses: Swatinem/rust-cache@v2

- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.8.2"
Expand Down Expand Up @@ -92,11 +95,12 @@ jobs:
- name: Rustup show
run: rustup show

- name: Run Orchestrator e2e test
- name: Run e2e test
env:
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=info cargo +nightly-2024-09-05 test --features testing --workspace test_orchestrator_workflow -- --nocapture
source "$HOME/.cargo/env"
RUST_LOG=info cargo +nightly-2024-09-05 cargo test --features testing test_orchestrator_workflow -- --nocapture
35 changes: 22 additions & 13 deletions .github/workflows/orchestrator-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ jobs:
sudo apt update
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler gcc g++ build-essential libssl-dev pkg-config curl wget git libclang-dev
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- name: Install Rust toolchain using rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup toolchain install nightly-2024-09-05 --profile minimal
rustup default nightly-2024-09-05
rustup override set nightly-2024-09-05
rustup show
- name: Rust Cache
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -107,6 +110,8 @@ jobs:
- name: Build Madara (Orchestrator)
working-directory: orchestrator/madara
run: |
source "$HOME/.cargo/env"
rustup toolchain install 1.81-x86_64-unknown-linux-gnu --profile minimal
cargo build
mv target/debug/madara ../madara-binary
cd ../..
Expand All @@ -126,7 +131,9 @@ jobs:
make snos
- name: Check rust version
run: rustup show
run: |
source "$HOME/.cargo/env"
rustup show
- name: Run llvm-cov tests
env:
Expand All @@ -135,17 +142,19 @@ jobs:
# the self hosted runner has a different region so we override it here
AWS_REGION: us-east-1
run: |
source "$HOME/.cargo/env"
RUST_LOG=debug RUST_BACKTRACE=1 cargo llvm-cov nextest \
--release \
--features testing \
--lcov \
--output-path lcov.info \
--test-threads=1 \
--package "orchestrator-*" \
--no-fail-fast
--release \
--features testing \
--lcov \
--output-path lcov.info \
--test-threads=1 \
--package "orchestrator-*" \
--no-fail-fast
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
files: lcov.info
debug: true
43 changes: 32 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ aws-sdk-sqs = "1.36.0"
axum = { version = "0.7.4" }
axum-macros = "0.4.1"
color-eyre = "0.6.2"
chrono = "0.4.0"
chrono = { version = "0.4", features = ["serde"] }
c-kzg = "1.0.3"
dotenvy = "0.15.7"
log = "0.4.21"
Expand Down
100 changes: 100 additions & 0 deletions cairo/Scarb.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "madara_contracts"
version = "0.1.0"
dependencies = [
"openzeppelin",
"snforge_std",
]

[[package]]
name = "openzeppelin"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
"openzeppelin_governance",
"openzeppelin_introspection",
"openzeppelin_presets",
"openzeppelin_security",
"openzeppelin_token",
"openzeppelin_upgrades",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_access"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_account"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_governance"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_access",
"openzeppelin_introspection",
]

[[package]]
name = "openzeppelin_introspection"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"

[[package]]
name = "openzeppelin_presets"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
"openzeppelin_introspection",
"openzeppelin_token",
"openzeppelin_upgrades",
]

[[package]]
name = "openzeppelin_security"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"

[[package]]
name = "openzeppelin_token"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"
dependencies = [
"openzeppelin_account",
"openzeppelin_governance",
"openzeppelin_introspection",
]

[[package]]
name = "openzeppelin_upgrades"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"

[[package]]
name = "openzeppelin_utils"
version = "0.15.1"
source = "git+https://github.com/OpenZeppelin/cairo-contracts.git?tag=v0.15.1#2f8a93d762858714095a1d391afffa9e21df6983"

[[package]]
name = "snforge_std"
version = "0.27.0"
source = "git+https://github.com/foundry-rs/starknet-foundry?tag=v0.27.0#2d99b7c00678ef0363881ee0273550c44a9263de"
2 changes: 1 addition & 1 deletion e2e-tests/src/anvil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl AnvilSetup {
let provider = ProviderBuilder::new().with_recommended_fillers().wallet(wallet).on_http(self.rpc_url.clone());

let starknet_core_contract_client = StarknetCoreContract::deploy(&provider).await.unwrap();
log::debug!("📦 Deployed starknet_core_contract at address: {}", starknet_core_contract_client.address());
log::info!("📦 Deployed starknet_core_contract at address: {}", starknet_core_contract_client.address());
let verifier_client = GPSVerifier::deploy(&provider).await.unwrap();

// This is the fact hash calculated from get_fact_info() or mongodb job metadata
Expand Down
Loading

0 comments on commit 564927d

Please sign in to comment.