Skip to content
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
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Sertn Dev",
"name": "Inference Dev",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// Built from https://github.com/inference-labs-inc/tensor-tools/blob/main/bittensor-devcontainer/Dockerfile
// "image": "ghcr.io/inference-labs-inc/bittensor-devcontainer:latest",
Expand Down Expand Up @@ -52,4 +52,4 @@
"type": "bind"
}
]
}
}
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CHAINID=31337


# Make sure to update this if the strategy address changes
# check in contracts/script/output/${CHAINID}/sertn_avs_deployment_output.json
# check in contracts/script/output/${CHAINID}/inference_network_deployment_output.json
STRATEGY_ADDRESS=0x7a2088a1bFc9d81c55368AE168C2C02570cB814F

# Path to the ezkl binary (specifically for GH actions, for local development, do not set this)
Expand Down
160 changes: 80 additions & 80 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Tests

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
test:
Expand All @@ -14,81 +14,81 @@ jobs:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Cache UV packages
uses: actions/cache@v4
with:
path: |
~/.cache/uv
.venv
key: ${{ runner.os }}-uv-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-uv-${{ matrix.python-version }}-

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install dependencies
working-directory: ./client
run: |
uv venv
source .venv/bin/activate
uv pip install -e ".[test]"

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

- name: Create .env file
run: cp .env.example .env

- name: Build contracts
run: make build-contracts

- name: Run foundry tests
working-directory: ./contracts/test
run: forge test

- name: Install ezkl
env:
EZKL_DIR: /home/runner/.ezkl
run: curl https://raw.githubusercontent.com/zkonduit/ezkl/main/install_ezkl_cli.sh | bash -s v22.0.1
continue-on-error: true

- name: Check ezkl version
run: /home/runner/.ezkl/ezkl --version

- name: Generate srs file
working-directory: /home/runner/.ezkl
run: |
mkdir -p srs
/home/runner/.ezkl/ezkl gen-srs --logrows 19 --srs-path srs/kzg19.srs

- name: Generate pk.key with ezkl setup
working-directory: ./client/src/models/models/model_0
run: /home/runner/.ezkl/ezkl setup

- name: Start anvil local blockchain
run: make start-anvil-background

- name: Deploy eigenlayer contracts
run: make deploy-eigenlayer-contracts

- name: Deploy sertn contracts
run: make deploy-sertn-contracts

- name: Init local workers
run: make init-local-workers

- name: Run tests
run: make test-client

- name: Stop anvil local blockchain
run: make stop-anvil
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Cache UV packages
uses: actions/cache@v4
with:
path: |
~/.cache/uv
.venv
key: ${{ runner.os }}-uv-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-uv-${{ matrix.python-version }}-

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install dependencies
working-directory: ./client
run: |
uv venv
source .venv/bin/activate
uv pip install -e ".[test]"

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

- name: Create .env file
run: cp .env.example .env

- name: Build contracts
run: make build-contracts

- name: Run foundry tests
working-directory: ./contracts/test
run: forge test

- name: Install ezkl
env:
EZKL_DIR: /home/runner/.ezkl
run: curl https://raw.githubusercontent.com/zkonduit/ezkl/main/install_ezkl_cli.sh | bash -s v22.0.1
continue-on-error: true

- name: Check ezkl version
run: /home/runner/.ezkl/ezkl --version

- name: Generate srs file
working-directory: /home/runner/.ezkl
run: |
mkdir -p srs
/home/runner/.ezkl/ezkl gen-srs --logrows 19 --srs-path srs/kzg19.srs

- name: Generate pk.key with ezkl setup
working-directory: ./client/src/models/models/model_0
run: /home/runner/.ezkl/ezkl setup

- name: Start anvil local blockchain
run: make start-anvil-background

- name: Deploy eigenlayer contracts
run: make deploy-eigenlayer-contracts

- name: Deploy inference contracts
run: make deploy-inference-contracts

- name: Init local workers
run: make init-local-workers

- name: Run tests
run: make test-client

- name: Stop anvil local blockchain
run: make stop-anvil
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-holesky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Output URLs
if: steps.deploy.outputs.serviceManager != ''
run: |
echo "Sertn AVS URL: https://holesky.eigenlayer.xyz/avs/${{ steps.deploy.outputs.serviceManager }}"
echo "Inference AVS URL: https://holesky.eigenlayer.xyz/avs/${{ steps.deploy.outputs.serviceManager }}"

- name: Output Error
if: steps.deploy.outputs.serviceManager == ''
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ ___CONTRACTS___: ##

build-contracts: ## builds all contracts and generates ABIs
cd contracts && forge build
cd contracts && forge inspect SertnTaskManager abi --json > ../abis/SertnTaskManager.abi.json
cd contracts && forge inspect SertnServiceManager abi --json > ../abis/SertnServiceManager.abi.json
cd contracts && forge inspect InferenceTaskManager abi --json > ../abis/InferenceTaskManager.abi.json
cd contracts && forge inspect InferenceServiceManager abi --json > ../abis/InferenceServiceManager.abi.json
cd contracts && forge inspect StrategyBase abi --json > ../abis/StrategyBase.abi.json
cd contracts && forge inspect ERC20Mock abi --json > ../abis/ERC20Mock.abi.json
cd contracts && forge inspect ERC20 abi --json > ../abis/ERC20.abi.json
Expand All @@ -42,15 +42,15 @@ build-contracts: ## builds all contracts and generates ABIs
cd contracts && forge inspect AllocationManager abi --json > ../abis/AllocationManager.abi.json
cd contracts && forge inspect ModelRegistry abi --json > ../abis/ModelRegistry.abi.json
cd contracts && forge inspect RewardsCoordinator abi --json > ../abis/RewardsCoordinator.abi.json
cd contracts && forge inspect SertnNodesManager abi --json > ../abis/SertnNodesManager.abi.json
cd contracts && forge inspect InferenceNodesManager abi --json > ../abis/InferenceNodesManager.abi.json

deploy-eigenlayer-contracts:
@chmod +x ./contracts/anvil/deploy-el.sh
./contracts/anvil/deploy-el.sh

deploy-sertn-contracts:
@chmod +x ./contracts/anvil/deploy-sertn.sh
./contracts/anvil/deploy-sertn.sh
deploy-inference-contracts:
@chmod +x ./contracts/anvil/deploy-inference.sh
./contracts/anvil/deploy-inference.sh

init-local-workers: # init operator and aggregator for local testing
@chmod +x ./contracts/anvil/init-local-workers.sh
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SERTN AVS
# INFERENCE NETWORK

## Project Structure

Expand Down Expand Up @@ -40,7 +40,7 @@ uv pip install -e .
```bash
make build-contracts
make deploy-eigenlayer-contracts
make deploy-sertn-contracts
make deploy-inference-contracts
```

### Running the Services
Expand All @@ -49,7 +49,7 @@ The operator and aggregator services can be managed through the CLI:

```bash
# From the client directory with venv activated
sertn --help
inference --help
```

### Development
Expand Down
Loading