Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: orchestrator merge #524

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
24 changes: 11 additions & 13 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,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 @@ -86,17 +89,12 @@ jobs:
run: |
make snos

- name: Install nightly toolchain
run: rustup install nightly-2024-09-05

- 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 test --features testing test_orchestrator_workflow -- --nocapture
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
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
Loading