Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
3dd7d70
ability to automatically set shm size based on sys memory
JannikSt Feb 6, 2025
f37c729
clippy
JannikSt Feb 6, 2025
d4057b6
bump version
JannikSt Feb 6, 2025
4026d74
support ability to restore metrics via orchestrator (#112)
JannikSt Feb 6, 2025
2d1fe13
bump version
JannikSt Feb 6, 2025
e8bdc8f
improve resiliency of validator (#114)
JannikSt Feb 6, 2025
06eaa3a
add improvement to metrics reporting (#119)
JannikSt Feb 12, 2025
3b5cc30
very basic validator functionality
mattdf Feb 4, 2025
329e90b
fmt
mattdf Feb 4, 2025
96e9182
add signature ...
mattdf Feb 4, 2025
bc32adc
use sign_request
mattdf Feb 4, 2025
ea44a9a
use custom serializer for consistency
mattdf Feb 5, 2025
958db87
add validator arg to miner, implement rounding robust partial eq
mattdf Feb 5, 2025
1fdbe2f
fmt, clippy fix
mattdf Feb 5, 2025
ca71eed
fix remote makefile entry
mattdf Feb 5, 2025
a10652f
misc makefile fixes
mattdf Feb 5, 2025
68601ef
fix clippy
mattdf Feb 12, 2025
ba9f714
fix fmt...
mattdf Feb 12, 2025
9557b2f
make app_state unused
mattdf Feb 12, 2025
3fcc54a
minor readme adjustment
JannikSt Feb 13, 2025
11127a0
remove redundant files
JannikSt Feb 13, 2025
7f1c96b
basic adjustment of readme, add security, add contributing and docs (…
JannikSt Feb 13, 2025
2e28ddc
fix worker naming in readme
JannikSt Feb 13, 2025
6d2096f
add readme images (#125)
JannikSt Feb 14, 2025
54969b8
add disclosure
JannikSt Feb 14, 2025
12d71bc
add video to remote gpu setup in docs (#128)
JannikSt Feb 26, 2025
765b909
fix submodule setup (#129)
JannikSt Feb 27, 2025
cb4d70f
Fix/submodule path (#130)
JannikSt Feb 27, 2025
bf778dd
do not run format on xl-runner
JannikSt Mar 7, 2025
6180b15
fix runner setup
JannikSt Mar 7, 2025
be66b79
add shared volume to containers to support model downloads (#134)
JannikSt Mar 7, 2025
22dcd6c
- Readme improvements (#131)
burnpiro Mar 7, 2025
639df75
feature/toploc-integration (#127)
JannikSt Mar 10, 2025
1249fe4
align smart contract module (#135)
JannikSt Mar 12, 2025
83a78f5
support dynamic staking system and ability to automatically increase …
JannikSt Mar 12, 2025
bf40499
fix worker unit formatting (#138)
JannikSt Mar 15, 2025
313a910
remove s3 from release pipeline (#141)
JannikSt Mar 15, 2025
9d5a4ef
support new env vars in validator docker (#143)
JannikSt Mar 15, 2025
df9299f
improve orchestrator docker image (#144)
JannikSt Mar 15, 2025
acc1862
fix stake setting approach (#142)
JannikSt Mar 15, 2025
ee77127
Feature/docker compose setup (#145)
JannikSt Mar 17, 2025
7f06cec
add basic ability to generate new wallets from worker cli (#147)
JannikSt Mar 18, 2025
5546e2a
support toploc-server auth (#146)
JannikSt Mar 19, 2025
e9ba206
move private keys into env files rather than cli args (#150)
JannikSt Mar 19, 2025
e405f4a
only allow discovery svc upload if you have ai token (#149)
JannikSt Mar 19, 2025
63ed6c5
support setting penalty in validator arg (#137)
JannikSt Mar 19, 2025
d04e43f
Feature/discovery blacklist detection (#139)
JannikSt Mar 19, 2025
0f749c1
Improvement/discovery security check (#151)
JannikSt Mar 19, 2025
8b24d9e
update email in security.md (#154)
JohannesHa Mar 20, 2025
e37fd2a
add install scripts (#155)
JannikSt Mar 20, 2025
729aa44
Feature/node chain sync (#148)
JannikSt Mar 21, 2025
5e29253
improve boot sequence (#157)
JannikSt Mar 21, 2025
0ca1d73
Improvement/manual transcation approval (#152)
JannikSt Mar 21, 2025
3f267f8
fix typo (#158)
samsja Mar 21, 2025
b73bcde
support legacy private key setup (#160)
JannikSt Mar 22, 2025
739a1fd
disable spinner (#161)
JannikSt Mar 22, 2025
0e09be3
add ability to sign message from CLI (#163)
JannikSt Mar 23, 2025
9a0f6f4
fix permission issue with installer (#162)
JannikSt Mar 23, 2025
67a6b41
add balance cmd and improve registration flow (#164)
JannikSt Mar 24, 2025
168a800
improve README & general setup info (#165)
JannikSt Mar 24, 2025
869b58b
improve stake approval ux by showing response immediatly (#167)
JannikSt Mar 25, 2025
3f3fede
Feature: interconnect check w. issue tracker (#166)
JannikSt Mar 25, 2025
b342d02
Create generate-node-wallet command to skip generating provider walle…
manveerxyz Mar 25, 2025
434c987
Run cargo fmt
manveerxyz Mar 25, 2025
506dbe9
Preserve folder structure for toploc-validator (#168)
JannikSt Mar 26, 2025
8965ff3
add timestamp to latest status change for node (#170)
JannikSt Mar 26, 2025
0aba8c8
Discovery state change tests (#171)
JannikSt Mar 26, 2025
17c5957
adjust beta versioning (#172)
JannikSt Mar 26, 2025
7607566
Improvement/dev release versioning - fix indentation (#173)
JannikSt Mar 26, 2025
2bf31bb
Fix: node recovery edge case (#174)
JannikSt Mar 26, 2025
aaf521c
add creation and update timestamps, add sorting to discovery output, …
JannikSt Mar 26, 2025
2311612
Fix: work validation improvements & cleanup (#176)
JannikSt Mar 27, 2025
8eec8e8
fix install script with new dev tagging (#177)
JannikSt Mar 27, 2025
14c55d6
whitelist provider info in doc
JannikSt Mar 27, 2025
0726c30
add info reg. whitelist provider
JannikSt Mar 27, 2025
cb1a0ab
Fix: chainsync can break on old data (#178)
JannikSt Mar 27, 2025
9e2e616
Fix: discovery wrong status on missing pool (#179)
JannikSt Mar 27, 2025
308bbb0
Improvement/log level (#180)
JannikSt Mar 27, 2025
10e1bb7
Synthetic Data Validator: Sequential and without cache (#187)
JannikSt Mar 28, 2025
448cc39
load validator addresses from contract (#181)
JannikSt Mar 28, 2025
c9b106c
add discovery upload retries (#182)
JannikSt Mar 28, 2025
91b929d
fix api returning false when no task exists, hide tasks when ejected …
JannikSt Mar 29, 2025
7dd4123
fix makefile for remote worker (#193)
JannikSt Mar 30, 2025
8fddfef
refactor: rename ignore_issues flag (#195)
spaghettic0de Mar 30, 2025
e9b2f8a
Fix: validator docker missing env (#196)
JannikSt Mar 31, 2025
9cb8cb9
Fix/validator parameters (#197)
JannikSt Mar 31, 2025
5543e08
Fix/validator parameters (#198)
JannikSt Mar 31, 2025
2b60798
Fix/validator parameters (#199)
JannikSt Mar 31, 2025
c025d56
improve toploc time tracking (#200)
JannikSt Mar 31, 2025
b99cdf3
align contracts repo (#203)
JannikSt Apr 3, 2025
f22e710
align smart contracts (#205)
JannikSt Apr 5, 2025
539a1e7
fix makefile bug (#206)
JannikSt Apr 5, 2025
206448f
add healthcheck to discovery svc (#207)
JannikSt Apr 5, 2025
32e6ace
improve concurrency handling for synthetic data (#202)
JannikSt Apr 5, 2025
1c112e5
fix validator port mapping in dockerfile (#208)
JannikSt Apr 6, 2025
f73525c
Improvement/orchestrator health (#209)
JannikSt Apr 6, 2025
d3a7187
Add additional Makefile commands to test work submission/invalidation…
manveerxyz Apr 6, 2025
a3bce16
Feature: Orchestrator helm chart (#211)
JannikSt Apr 6, 2025
e5a171d
fix fmt in hw check (#212)
JannikSt Apr 6, 2025
6eb4e4f
Improvement: ability to disable hw validation (#213)
JannikSt Apr 6, 2025
293b7d4
add chart to deploy validator (#214)
JannikSt Apr 6, 2025
1d91806
add address env to worker, add address in toploc submission (#215)
JannikSt Apr 7, 2025
d9d6f76
adjust dockerfile for validator to exclude pool ids (#216)
JannikSt Apr 7, 2025
3340729
fix file upload issue when bucketname includes subfolder (#217)
JannikSt Apr 7, 2025
d348080
Fix: validator duplicate env (#218)
JannikSt Apr 7, 2025
61096f7
make validator penatly adjustable (#220)
JannikSt Apr 7, 2025
c376bd5
increase min storage to 1tb (#221)
JannikSt Apr 7, 2025
f6f8505
Fix: permission detection (#219)
JannikSt Apr 7, 2025
aee821e
fix delete container and file removal - better logging and retry fold…
JannikSt Apr 8, 2025
cd05909
Pr 190 (#227)
JannikSt Apr 8, 2025
2948b41
show newest nodes first in discovery sorting (#223)
JannikSt Apr 8, 2025
7cb892f
Fix/orchestrator invite edge case (#224)
JannikSt Apr 8, 2025
6865047
add proper timeout and thread handling (#222)
JannikSt Apr 8, 2025
33385fd
Improvement/discovery resiliency (#228)
JannikSt Apr 8, 2025
e5d18f7
Fix: Taskbridge improvement to allow more objects (#225)
JannikSt Apr 8, 2025
a8e88d8
taskbridge info in log
JannikSt Apr 8, 2025
e42c4d2
Fix: early reader abort (#229)
JannikSt Apr 9, 2025
47774b5
make taskbridge even more robust and add concurrent samples (#230)
JannikSt Apr 9, 2025
324edf9
reuse client and add timeout to node invite (#231)
JannikSt Apr 9, 2025
66fe066
add timeout to validator fetching from discovery (#233)
JannikSt Apr 9, 2025
577dec2
add orchestrator logging (#234)
JannikSt Apr 9, 2025
1f4566c
fix orchestrator discovered edgecase (#235)
JannikSt Apr 9, 2025
96a5bae
Fix orchestrator address to string parsing (#236)
JannikSt Apr 9, 2025
fc9fbe7
Improvement: validator health loop link (#237)
JannikSt Apr 9, 2025
ab73405
add more explicit logging to bridge (#238)
JannikSt Apr 9, 2025
08c98f2
Refactor/bridge upload handling (#239)
JannikSt Apr 9, 2025
5761f54
Cleanup: bridge logging (#241)
JannikSt Apr 10, 2025
5db8eb1
fix edge case where node is stuck in waiting for heartbeat (#242)
JannikSt Apr 10, 2025
1b06ec6
show critical error when no storage mount is found (#243)
JannikSt Apr 10, 2025
a622357
orchestrator healthcheck depending on running threads (#247)
JannikSt Apr 11, 2025
b3a56d6
update validator penalty to 2e20 (#246)
mattdf Apr 11, 2025
1b2640e
make logging of worker less noisy (#249)
JannikSt Apr 12, 2025
e1b9c92
Chore: contract alignment (#248)
JannikSt Apr 12, 2025
ff9f810
update addresses (#251)
JannikSt Apr 12, 2025
96fbd9a
improve & automate slash handling (#250)
JannikSt Apr 12, 2025
bcf50a4
bump version (#252)
JannikSt Apr 12, 2025
54d5208
Merge branch 'main' into develop
JannikSt Apr 12, 2025
9dc3cc8
improve helm chart setup (#253)
JannikSt Apr 12, 2025
dcd0bbd
add docker check in install check (#256)
JannikSt Apr 14, 2025
52e0574
Feature: tracing setup (#260)
JannikSt Apr 14, 2025
6a3061f
improve resiliency of docker service (#254)
JannikSt Apr 14, 2025
b67114a
Feature: s3 upload ratelimiter (#261)
JannikSt Apr 14, 2025
098f8e1
Improvement/ux wallet generation (#262)
JannikSt Apr 14, 2025
816ef50
Improvements: Worker stability & security (#263)
JannikSt Apr 14, 2025
abeeb5c
allow parsing compute specs from string (#244)
JannikSt Apr 14, 2025
ff81bf7
remove shutdown logging
JannikSt Apr 14, 2025
1c559f5
Merge branch 'main' into develop
JannikSt Apr 15, 2025
178ebf0
Fix: pool invite adjustment (#265)
JannikSt Apr 15, 2025
c426fff
handle double work submission error due to latency (#266)
JannikSt Apr 15, 2025
44c0c28
Improvement: Discovery heartbeat based on chainsync (#267)
JannikSt Apr 15, 2025
3a152dc
add size limit to auth middleware
mattdf Apr 15, 2025
202d6b9
fmt
mattdf Apr 15, 2025
074091b
add timeouts to auth
mattdf Apr 15, 2025
0bbb2ac
add timeouts to worker-dest calls
mattdf Apr 15, 2025
fd7aa83
update to use suggested limits
mattdf Apr 15, 2025
415f883
Merge branch 'main' into develop
JannikSt Apr 15, 2025
4055777
Chore: Issue templates (#270)
JannikSt Apr 15, 2025
141cc7b
Merge pull request #269 from PrimeIntellect-ai/fix/improve-service-re…
mattdf Apr 15, 2025
0f243ed
add ability to eject nodes (#272)
JannikSt Apr 15, 2025
98b9fa9
fix eth display
JannikSt Apr 16, 2025
a1a81ab
clippy
JannikSt Apr 16, 2025
f3d08a0
fix worker
JannikSt Apr 16, 2025
041237b
adjust makefile
JannikSt Apr 16, 2025
46bc4cc
Merge pull request #273 from PrimeIntellect-ai/fix/eth-balance-display
mattdf Apr 16, 2025
44a1625
bump version
JannikSt Apr 16, 2025
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
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug Report
about: Report a problem with the worker or general protocol
title: '[BUG] '
labels: bug
assignees: ''
---

## Environment
- OS:
- Version:
- Hardware Specs: [CPU model, RAM, GPU]

## Bug Description
A clear description of what the bug is.

## Steps To Reproduce
1. Configure worker with '...'
2. Connect to '...'
3. See error

## Expected Behavior
What you expected to happen.

## Actual Behavior
What actually happened (include any error messages, logs, screenshots).

## Additional Context
Add any other relevant information here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Community Discord
url: https://discord.gg/primeintellect
about: For quick questions and community support, join our Discord
- name: Documentation
url: https://docs.primeintellect.ai
about: Check our documentation for setup guides and FAQs
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/general_question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: General Question
about: Ask a general question about the protocol or worker
title: '[QUESTION] '
labels: question
assignees: ''
---

## Question
A clear and concise description of your question.

## Context
Any relevant context that might help us understand your question better.

## Environment (if relevant)
- OS:
- Version:
- Hardware Specs: [CPU model, RAM, GPU]

## Additional Information
Any other information that might be helpful.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/setup_help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Setup Help
about: Questions about setting up or configuring the worker
title: '[SETUP] '
labels: help-wanted, documentation
assignees: ''
---

## Environment
- OS: [e.g. Ubuntu 22.04]
- Worker Version: [e.g. v1.2.3]
- Hardware Specs: [CPU model, RAM, GPU]

## What have you tried so far?
Steps you've already taken to configure your setup.

## Specific Questions
Your specific questions about configuration or setup.

## Logs/Configuration (if applicable)
8 changes: 4 additions & 4 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 @@ -3,7 +3,7 @@ members = ["discovery", "worker", "validator", "shared", "orchestrator", "dev-ut
resolver = "2"

[workspace.package]
version = "0.2.2"
version = "0.2.3"
edition = "2021"

[workspace.features]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mint-ai-tokens-to-federator:

transfer-eth-to-provider:
set -a; source ${ENV_FILE}; set +a; \
cargo run -p dev-utils --example transfer_eth -- --address $${PROVIDER_ADDRESS} --key $${PRIVATE_KEY_FEDERATOR} --rpc-url $${RPC_URL} --amount 1000000000000000000
cargo run -p dev-utils --example transfer_eth -- --address $${PROVIDER_ADDRESS} --key $${PRIVATE_KEY_FEDERATOR} --rpc-url $${RPC_URL} --amount 10000000000000000

transfer-eth-to-pool-owner:
set -a; source ${ENV_FILE}; set +a; \
Expand Down
12 changes: 11 additions & 1 deletion orchestrator/src/api/routes/heartbeat.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use crate::api::server::AppState;
use crate::{api::server::AppState, models::node::NodeStatus};
use actix_web::{
web::{self, post, Data},
HttpResponse, Scope,
};
use alloy::primitives::Address;
use serde_json::json;
use shared::models::heartbeat::{HeartbeatRequest, HeartbeatResponse};
use std::str::FromStr;

Expand All @@ -13,6 +14,15 @@ async fn heartbeat(
) -> HttpResponse {
let task_info = heartbeat.clone();
let node_address = Address::from_str(&heartbeat.address).unwrap();
let node = app_state.store_context.node_store.get_node(&node_address);
if let Some(node) = node {
if node.status == NodeStatus::Banned {
return HttpResponse::BadRequest().json(json!({
"success": false,
"error": "Node is banned"
}));
}
}

app_state.store_context.node_store.update_node_task(
node_address,
Expand Down
58 changes: 58 additions & 0 deletions orchestrator/src/api/routes/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ use actix_web::{
HttpResponse, Scope,
};
use alloy::primitives::Address;
use log::info;
use serde_json::json;
use shared::security::request_signer::sign_request;
use std::str::FromStr;
use std::time::Duration;

// Timeout for node operations in seconds
const NODE_REQUEST_TIMEOUT: u64 = 30;

async fn get_nodes(app_state: Data<AppState>) -> HttpResponse {
let nodes = app_state.store_context.node_store.get_nodes();
Expand Down Expand Up @@ -52,6 +57,7 @@ async fn restart_node_task(node_id: web::Path<String>, app_state: Data<AppState>

match reqwest::Client::new()
.post(restart_url)
.timeout(Duration::from_secs(NODE_REQUEST_TIMEOUT))
.headers(headers)
.body(payload.to_string())
.send()
Expand Down Expand Up @@ -121,6 +127,7 @@ async fn get_node_logs(node_id: web::Path<String>, app_state: Data<AppState>) ->

match reqwest::Client::new()
.get(logs_url)
.timeout(Duration::from_secs(NODE_REQUEST_TIMEOUT))
.headers(headers)
.send()
.await
Expand Down Expand Up @@ -156,12 +163,63 @@ async fn get_node_metrics(node_id: web::Path<String>, app_state: Data<AppState>)
HttpResponse::Ok().json(json!({"success": true, "metrics": metrics}))
}

async fn ban_node(node_id: web::Path<String>, app_state: Data<AppState>) -> HttpResponse {
info!("banning node: {}", node_id);
let node_address = match Address::from_str(&node_id) {
Ok(address) => address,
Err(_) => {
return HttpResponse::BadRequest().json(json!({
"success": false,
"error": format!("Invalid node address: {}", node_id)
}));
}
};

let node = app_state.store_context.node_store.get_node(&node_address);
match node {
Some(node) => {
app_state
.store_context
.node_store
.update_node_status(&node.address, crate::models::node::NodeStatus::Banned);

// Attempt to eject from pool
if let Some(contracts) = &app_state.contracts {
match contracts
.compute_pool
.eject_node(app_state.pool_id, node.address)
.await
{
Ok(_) => HttpResponse::Ok().json(json!({
"success": true,
"message": format!("Node {} successfully ejected", node_id)
})),
Err(e) => HttpResponse::InternalServerError().json(json!({
"success": false,
"error": format!("Failed to eject node from pool: {}", e)
})),
}
} else {
HttpResponse::InternalServerError().json(json!({
"success": false,
"error": "Contracts not found"
}))
}
}
None => HttpResponse::NotFound().json(json!({
"success": false,
"error": format!("Node not found: {}", node_id)
})),
}
}

pub fn nodes_routes() -> Scope {
web::scope("/nodes")
.route("", get().to(get_nodes))
.route("/{node_id}/restart", post().to(restart_node_task))
.route("/{node_id}/logs", get().to(get_node_logs))
.route("/{node_id}/metrics", get().to(get_node_metrics))
.route("/{node_id}/ban", post().to(ban_node))
}

#[cfg(test)]
Expand Down
7 changes: 7 additions & 0 deletions orchestrator/src/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use log::info;
use serde_json::json;
use shared::security::api_key_middleware::ApiKeyMiddleware;
use shared::security::auth_signature_middleware::{ValidateSignature, ValidatorState};
use shared::web3::contracts::core::builder::Contracts;
use shared::web3::wallet::Wallet;
use std::sync::Arc;

Expand All @@ -24,6 +25,8 @@ pub struct AppState {
pub heartbeats: Arc<LoopHeartbeats>,
pub redis_store: Arc<RedisStore>,
pub hourly_upload_limit: i64,
pub contracts: Option<Arc<Contracts>>,
pub pool_id: u32,
}

#[allow(clippy::too_many_arguments)]
Expand All @@ -38,6 +41,8 @@ pub async fn start_server(
heartbeats: Arc<LoopHeartbeats>,
redis_store: Arc<RedisStore>,
hourly_upload_limit: i64,
contracts: Option<Arc<Contracts>>,
pool_id: u32,
) -> Result<(), Error> {
info!("Starting server at http://{}:{}", host, port);
let app_state = Data::new(AppState {
Expand All @@ -48,6 +53,8 @@ pub async fn start_server(
heartbeats,
redis_store,
hourly_upload_limit,
contracts,
pool_id,
});
let node_store = app_state.store_context.node_store.clone();
let node_store_clone = node_store.clone();
Expand Down
2 changes: 2 additions & 0 deletions orchestrator/src/api/tests/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ pub async fn create_test_app_state() -> Data<AppState> {
let store_context = Arc::new(StoreContext::new(store.clone()));
Data::new(AppState {
store_context: store_context.clone(),
contracts: None,
pool_id: 1,
wallet: Arc::new(
Wallet::new(
"0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97",
Expand Down
5 changes: 3 additions & 2 deletions orchestrator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,13 @@ async fn main() -> Result<()> {
// It also ejects nodes when they are dead.
let status_update_store_context = store_context.clone();
let status_update_heartbeats = heartbeats.clone();
let status_update_contracts = contracts.clone();
tasks.spawn(async move {
let status_updater = NodeStatusUpdater::new(
status_update_store_context.clone(),
15,
None,
contracts.clone(),
status_update_contracts.clone(),
compute_pool_id,
args.disable_ejection,
status_update_heartbeats.clone(),
Expand All @@ -188,7 +189,7 @@ async fn main() -> Result<()> {

let server_store_context = store_context.clone();
tokio::select! {
res = start_server("0.0.0.0", port, server_store_context.clone(), server_wallet, args.admin_api_key, args.s3_credentials, args.bucket_name, heartbeats.clone(), store.clone(), args.hourly_s3_upload_limit) => {
res = start_server("0.0.0.0", port, server_store_context.clone(), server_wallet, args.admin_api_key, args.s3_credentials, args.bucket_name, heartbeats.clone(), store.clone(), args.hourly_s3_upload_limit, Some(contracts.clone()), compute_pool_id) => {
if let Err(e) = res {
error!("Server error: {}", e);
}
Expand Down
1 change: 1 addition & 0 deletions orchestrator/src/models/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ pub enum NodeStatus {
Unhealthy,
Dead,
Ejected,
Banned,
}
7 changes: 6 additions & 1 deletion orchestrator/src/node/invite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ use std::time::SystemTime;
use std::time::UNIX_EPOCH;
use tokio::time::{interval, Duration};

// Timeout constants
const REQUEST_TIMEOUT: u64 = 15; // 15 seconds for HTTP requests
const CONNECTION_TIMEOUT: u64 = 10; // 10 seconds for establishing connections

pub struct NodeInviter<'a> {
wallet: &'a Wallet,
pool_id: u32,
Expand Down Expand Up @@ -51,7 +55,8 @@ impl<'a> NodeInviter<'a> {
store_context,
heartbeats,
client: Client::builder()
.timeout(Duration::from_secs(15))
.timeout(Duration::from_secs(REQUEST_TIMEOUT))
.connect_timeout(Duration::from_secs(CONNECTION_TIMEOUT))
.build()
.unwrap(),
}
Expand Down
Loading