Skip to content

Commit

Permalink
Merge branch 'main' into feat/alerts-module
Browse files Browse the repository at this point in the history
  • Loading branch information
ocdbytes authored Aug 23, 2024
2 parents 3438448 + 11dc132 commit 39abe4b
Show file tree
Hide file tree
Showing 28 changed files with 1,837 additions and 371 deletions.
72 changes: 44 additions & 28 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,49 +1,65 @@
HOST=
PORT=
DATABASE_URL=
MADARA_RPC_URL=
DA_LAYER=
SETTLEMENT_LAYER=

# Ethereum
ETHEREUM_PRIVATE_KEY=
ETHEREUM_RPC_URL=
MEMORY_PAGES_CONTRACT_ADDRESS=
STARKNET_SOLIDITY_CORE_CONTRACT_ADDRESS=
##### ORCHESTRATOR #####

HOST=
PORT=

# Starknet
STARKNET_PUBLIC_KEY=
STARNET_PRIVATE_KEY=
STARKNET_RPC_URL=
STARKNET_CAIRO_CORE_CONTRACT_ADDRESS=

# MongoDB connection string
MONGODB_CONNECTION_STRING=
##### AWS CONFIG #####

# AWS
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=
AWS_REGION=
AWS_ENDPOINT_URL=

##### STORAGE #####

DATA_STORAGE=
AWS_S3_BUCKET_NAME=

# SQS
##### QUEUE #####

QUEUE_PROVIDER=
SQS_JOB_PROCESSING_QUEUE_URL=
SQS_JOB_VERIFICATION_QUEUE_URL=
SQS_JOB_HANDLE_FAILURE_QUEUE_URL=
SQS_WORKER_TRIGGER_QUEUE_URL=

# S3
AWS_S3_BUCKET_NAME=
AWS_S3_BUCKET_REGION=
##### DATABASE #####

# SNS
AWS_SNS_REGION=
AWS_SNS_ARN=
AWS_SNS_ARN_NAME=
DATABASE=
MONGODB_CONNECTION_STRING=

##### PROVER #####

# Sharp Services
PROVER_SERVICE=
SHARP_CUSTOMER_ID=
SHARP_URL=
# [IMP!!!] These are test certificates (they don't work)
SHARP_USER_CRT=
SHARP_USER_KEY=
SHARP_SERVER_CRT=
SHARP_PROOF_LAYOUT=

##### ON CHAIN CONFIG #####

DA_LAYER=
SETTLEMENT_LAYER=
ETHEREUM_RPC_URL=
MADARA_RPC_URL=
MEMORY_PAGES_CONTRACT_ADDRESS=
PRIVATE_KEY=
ETHEREUM_PRIVATE_KEY=
STARKNET_SOLIDITY_CORE_CONTRACT_ADDRESS=

##### ALERTS #####

AWS_SNS_REGION=
AWS_SNS_ARN=
AWS_SNS_ARN_NAME=

##### SETTLEMENT CLIENT #####

DEFAULT_SETTLEMENT_CLIENT_RPC=
DEFAULT_L1_CORE_CONTRACT_ADDRESS=
9 changes: 8 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ MADARA_RPC_URL="http://localhost:3000"
ETHEREUM_RPC_URL="http://localhost:3001"
MEMORY_PAGES_CONTRACT_ADDRESS="0x000000000000000000000000000000000001dead"
PRIVATE_KEY="0xdead"
ETHEREUM_PRIVATE_KEY="0x000000000000000000000000000000000000000000000000000000000000beef"
# Private key of Test wallet provided by Anvil
ETHEREUM_PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
STARKNET_SOLIDITY_CORE_CONTRACT_ADDRESS="0x000000000000000000000000000000000002dead"

##### Config URLs #####
Expand All @@ -31,6 +32,12 @@ SETTLEMENT_LAYER="ethereum"
DATA_STORAGE="s3"
ALERTS="sns"
MONGODB_CONNECTION_STRING="mongodb://localhost:27017"
DEFAULT_SETTLEMENT_CLIENT_RPC="http://localhost:3000"

# Ethereum Settlement
DEFAULT_L1_CORE_CONTRACT_ADDRESS="0xc662c410C0ECf747543f5bA90660f6ABeBD9C8c4"
SHOULD_IMPERSONATE_ACCOUNT="true"
TEST_DUMMY_CONTRACT_ADDRESS="0xE5b6F5e695BA6E4aeD92B68c4CC8Df1160D69A81"

# Sharp Services
SHARP_CUSTOMER_ID="sharp_consumer_id"
Expand Down
31 changes: 25 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
name: Rust Test & Coverage

on:
workflow_dispatch:
pull_request_target:
branches:
- main
types: [opened, synchronize, reopened]
push:
branches-ignore:
- main
workflow_call:
workflow_dispatch:

jobs:
coverage:
Expand Down Expand Up @@ -40,6 +47,20 @@ jobs:
- name: Rust Cache
uses: Swatinem/rust-cache@v2

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Check Anvil Installation
run: |
if command -v anvil &> /dev/null
then
echo "Anvil is installed. Version information:"
anvil --version
else
echo "Anvil is not installed or not in PATH"
exit 1
fi
- name: Install cargo-llvm-cov & nextest
uses: taiki-e/install-action@cargo-llvm-cov

Expand All @@ -50,11 +71,9 @@ jobs:
run: |
wget -P ./crates/prover-services/sharp-service/tests/artifacts https://madara-orchestrator-sharp-pie.s3.amazonaws.com/238996-SN.zip
- name: Clean workspace
run: |
cargo clean --doc
- name: Run tests llvm-cov
- name: Run llvm-cov tests
env:
ETHEREUM_BLAST_RPC_URL: ${{ secrets.ETHEREUM_BLAST_RPC_URL }}
run: cargo llvm-cov nextest --release --lcov --output-path lcov.info --test-threads=1

- name: Coveralls
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linters-cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Task - Linters Cargo
on:
workflow_dispatch:
workflow_call:
push:

jobs:
cargo-lint:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Task - Linters
on:
workflow_dispatch:
workflow_call:
push:

jobs:
prettier:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
name: Workflow - Pull Request

on:
workflow_dispatch:
pull_request:
pull_request_target:
branches: [main]
push:
branches: [main]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Task - Build Rust
on:
workflow_dispatch:
workflow_call:
push:

jobs:
rust_build:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## Added

- alerts module.
- Tests for Settlement client.
- Worker queues to listen for trigger events.
- Tests for prover client.
- Added Rust Cache for Coverage Test CI.
Expand Down
Loading

0 comments on commit 39abe4b

Please sign in to comment.