Skip to content

Commit f1a8028

Browse files
Merge branch 'main' into vbrunet/2025_11_30-airdrop-contract
2 parents 0c7a2ec + 714ed0e commit f1a8028

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2473
-251
lines changed

.github/workflows/build-run-manager.yml

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,28 @@ name: Build run-manager
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- dy/tool-run-manager # TODO remove once merged to main
8-
workflow_dispatch: # Allow manual triggering of the workflow
5+
paths:
6+
- 'tools/rust-tools/run-manager/**'
7+
- '.github/workflows/build-run-manager.yml'
8+
workflow_dispatch: # Allow manual triggering
99

1010
jobs:
1111
build:
12-
runs-on: ubuntu-latest
12+
# If we use ubuntu-latest it will link against a newer version of glibc making
13+
# the binary non-portable to our 22.04 servers, so use this for compatibility.
14+
runs-on: ubuntu-22.04
1315

1416
steps:
1517
- name: Checkout repository
1618
uses: actions/checkout@v4
1719

18-
- name: Free disk space
19-
uses: jlumbroso/free-disk-space@main
20-
with:
21-
tool-cache: true
22-
android: true
23-
dotnet: true
24-
haskell: true
25-
large-packages: true
26-
docker-images: false
27-
swap-storage: false
28-
29-
- name: Install Nix
30-
uses: nixbuild/nix-quick-install-action@v31
31-
with:
32-
nix_conf: |
33-
experimental-features = nix-command flakes
34-
accept-flake-config = true
35-
substituters = https://cache.nixos.org https://cache.garnix.io https://nix-community.cachix.org
36-
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
20+
- name: Install system dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y build-essential pkg-config libssl-dev perl
24+
25+
- name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@stable
3727

3828
- name: Cache Cargo build artifacts
3929
uses: actions/cache@v4
@@ -49,10 +39,11 @@ jobs:
4939
${{ runner.os }}-cargo-run-manager-
5040
${{ runner.os }}-cargo-
5141
52-
- name: Build run-manager with Cargo in Nix shell
42+
- name: Build run-manager binary
5343
run: |
54-
nix develop --command cargo build --release -p run-manager
44+
cargo build --release --package run-manager
5545
ls -lh target/release/run-manager
46+
ldd target/release/run-manager
5647
5748
- name: Upload binary artifact
5849
uses: actions/upload-artifact@v4

.github/workflows/push-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
2626
- name: Download image from Garnix cache
2727
run: |
28-
nix build --max-jobs 0 .#docker-psyche-solana-client --no-link --print-out-paths > image-path.txt
28+
nix build .#docker-psyche-solana-client --no-link --print-out-paths > image-path.txt
2929
3030
- name: Login to Docker Hub
3131
uses: docker/login-action@v3

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ psyche-core = { path = "./shared/core" }
2424
psyche-client = { path = "./shared/client" }
2525
psyche-data-provider = { path = "./shared/data-provider" }
2626
psyche-eval = { path = "./shared/eval" }
27+
psyche-inference = { path = "./shared/inference" }
2728
psyche-network = { path = "./shared/network" }
2829
psyche-modeling = { path = "./shared/modeling" }
2930
psyche-python-extension = { path = "./python" }

architectures/decentralized/RELEASES.md

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Client versioning in Runs
2+
3+
There are two ways to specify the client version for a run:
4+
5+
- Via the docker `RepoId` hash
6+
- Via a docker version tag
7+
8+
## Docker RepoId hash
9+
10+
Once the client docker image is uploaded to DockerHub, a `RepoId` hash is associated with that image. This string is what should be used for
11+
setting the client version in a run, toguether with the "sha256" part. For example, "sha256:ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb".
12+
13+
## Docker version tag
14+
15+
For setting a docker version tag, the image should be built with that tag set beforehand. This should be done in the `docker.nix` file, changing the `tag` field in the `docker-psyche-solana-client` docker package.
16+
17+
## Updating client docker version for a run
18+
19+
Once the new docker image uploaded to DockerHub and some version selected, you can update the client version required
20+
for a particular run with the following command:
21+
22+
[!] You should have the run owner solana key to successfully run this command
23+
[!] The run must be paused beforehand to do the client version update
24+
25+
```bash
26+
cargo run --release --bin psyche-solana-client \
27+
-- update-config \
28+
--wallet-private-key-path <path_to_run_owner_private_key> \
29+
--run-id <your_run_id> \
30+
--client-version <new_version>
31+
```

architectures/decentralized/solana-client/src/command/can_join.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ pub async fn command_can_join_execute(
4949
authorizer,
5050
);
5151
if backend.get_balance(&authorization).await? == 0 {
52-
bail!("Authorization does not exist for authorizer: {authorizer:?} and user: {address}");
52+
bail!(
53+
"Authorization does not exist for authorizer: {authorizer:?} (authorization address: {authorization:?}, join authority: {0:?}). Authorizer must be set to grantee pubkey for permissioned runs",
54+
coordinator_instance_state.join_authority
55+
);
5356
}
5457
if !backend
5558
.get_authorization(&authorization)

psyche-book/src/SUMMARY.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
- [Intro to Psyche](./intro.md)
44

5-
- [Psyche in depth](./explain/index.md)
6-
- [General workflow](./explain/general-workflow.md)
7-
- [Data provider](./explain/data-provider.md)
8-
- [Model sharing](./explain/model-sharing.md)
9-
- [Rewards](./explain/rewards.md)
10-
- [Glossary](./explain/glossary.md)
11-
125
- [End-user usage](./enduser/index.md)
136
- [Joining a run](./enduser/join-run.md)
147
- [Creating a run](./enduser/create-run.md)
158
- [Run configuration](./enduser/run-config.md)
169
- [Authentication](./enduser/authentication.md)
1710
- [Client FAQ](./enduser/client-faq.md)
1811

12+
- [Psyche in depth](./explain/index.md)
13+
- [General workflow](./explain/general-workflow.md)
14+
- [Data provider](./explain/data-provider.md)
15+
- [Model sharing](./explain/model-sharing.md)
16+
- [Rewards](./explain/rewards.md)
17+
- [Glossary](./explain/glossary.md)
18+
1919
- [Development](./development/index.md)
2020
- [Setup & Useful Commands](./development/setup.md)
2121
- [Running on-chain](./development/running-onchain.md)

psyche-book/src/development/setup.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,11 @@ If you can't / don't want to use Nix, it's also possible to manually install all
1111

1212
#### Installing Nix
1313

14-
To install `nix`, simply run `curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install` or find it at your local package manager.
14+
To install Nix, simply run the `./setup-nix.sh` script. This will install Nix and configure it appropriately.
1515

16-
You may need to add the following line to `~/.config/nix/nix.conf` or `/etc/nix/nix.conf`
17-
18-
```
19-
experimental-features = nix-command flakes
20-
```
21-
22-
#### Binary cache
16+
##### Binary cache
2317

18+
If you already have Nix installed, or are installing it manually,
2419
To speed up your builds & your local dev shell, we recommend enabling the binary cache from `garnix`, our CI provider.
2520

2621
In order to use the cache that garnix provides, change your `nix.conf`, adding `https://cache.garnix.io` to substituters, and `cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=` to `trusted-public-keys`.

0 commit comments

Comments
 (0)