repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/services/discovery.rs | crates/worker/src/services/discovery.rs | use anyhow::Result;
use shared::models::node::Node;
use shared::security::request_signer::sign_request_with_nonce;
use shared::web3::wallet::Wallet;
pub(crate) struct DiscoveryService {
wallet: Wallet,
base_urls: Vec<String>,
endpoint: String,
}
impl DiscoveryService {
pub(crate) fn new(wallet: Wallet... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/services/mod.rs | crates/worker/src/services/mod.rs | pub(crate) mod discovery;
pub(crate) mod discovery_updater;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/state/mod.rs | crates/worker/src/state/mod.rs | pub(crate) mod system_state;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/state/system_state.rs | crates/worker/src/state/system_state.rs | use anyhow::bail;
use anyhow::Result;
use directories::ProjectDirs;
use log::debug;
use log::error;
use serde::{Deserialize, Serialize};
use std::fs;
use std::path::Path;
use std::path::PathBuf;
use std::sync::Arc;
use tokio::sync::RwLock;
const STATE_FILENAME: &str = "heartbeat_state.toml";
fn get_default_state_dir(... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/docker/state.rs | crates/worker/src/docker/state.rs | use chrono::{DateTime, Utc};
use shared::models::task::{Task, TaskState};
use std::sync::Arc;
use tokio::sync::Mutex;
use uuid::Uuid;
pub(crate) struct DockerState {
current_task: Arc<Mutex<Option<Task>>>,
last_started: Arc<Mutex<Option<DateTime<Utc>>>>,
is_running: Arc<Mutex<bool>>,
}
impl DockerState {
... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/docker/service.rs | crates/worker/src/docker/service.rs | use super::docker_manager::ContainerInfo;
use super::DockerManager;
use super::DockerState;
use crate::console::Console;
use bollard::models::ContainerStateStatusEnum;
use chrono::{DateTime, Utc};
use log::debug;
use shared::models::heartbeat::TaskDetails;
use shared::models::node::GpuSpecs;
use shared::models::task::T... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/docker/mod.rs | crates/worker/src/docker/mod.rs | pub(crate) mod docker_manager;
pub(crate) mod service;
pub(crate) mod state;
pub(crate) mod task_container;
pub(crate) mod taskbridge;
pub(crate) use docker_manager::DockerManager;
pub(crate) use service::DockerService;
pub(crate) use state::DockerState;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/docker/task_container.rs | crates/worker/src/docker/task_container.rs | #[derive(Debug, Clone, PartialEq)]
pub(crate) struct TaskContainer {
pub task_id: String,
pub config_hash: String,
}
impl TaskContainer {
pub(crate) fn data_dir_name(&self) -> String {
format!("prime-task-{}", self.task_id)
}
}
impl std::str::FromStr for TaskContainer {
type Err = &'static... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/docker/docker_manager.rs | crates/worker/src/docker/docker_manager.rs | use crate::docker::task_container::TaskContainer;
use bollard::container::{
Config, CreateContainerOptions, ListContainersOptions, LogsOptions, StartContainerOptions,
};
use bollard::container::{InspectContainerOptions, LogOutput};
use bollard::errors::Error as DockerError;
use bollard::image::CreateImageOptions;
u... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | true |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/docker/taskbridge/json_helper.rs | crates/worker/src/docker/taskbridge/json_helper.rs | // Helper function to extract the next complete JSON object from a string
pub(super) fn extract_next_json(input: &[u8]) -> Option<(&str, usize)> {
// Skip any leading whitespace (including newlines)
let mut start_pos = 0;
while start_pos < input.len() && (input[start_pos] <= 32) {
// ASCII space and... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/docker/taskbridge/bridge.rs | crates/worker/src/docker/taskbridge/bridge.rs | use crate::docker::taskbridge::file_handler;
use crate::docker::taskbridge::json_helper;
use crate::metrics::store::MetricsStore;
use crate::state::system_state::SystemState;
use anyhow::bail;
use anyhow::Result;
use futures::future::BoxFuture;
use futures::stream::FuturesUnordered;
use futures::FutureExt;
use futures:... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/docker/taskbridge/mod.rs | crates/worker/src/docker/taskbridge/mod.rs | pub(crate) mod bridge;
pub(crate) mod file_handler;
mod json_helper;
pub(crate) use bridge::TaskBridge;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/docker/taskbridge/file_handler.rs | crates/worker/src/docker/taskbridge/file_handler.rs | use crate::state::system_state::SystemState;
use alloy::primitives::{Address, U256};
use anyhow::Context as _;
use anyhow::Result;
use log::{debug, error, info, warn};
use reqwest::header::HeaderValue;
use reqwest::Client;
use rust_ipfs::Ipfs;
use shared::models::node::Node;
use shared::models::storage::RequestUploadRe... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/metrics/store.rs | crates/worker/src/metrics/store.rs | use anyhow::Result;
use shared::models::metric::{MetricEntry, MetricKey};
use std::collections::HashMap;
use tokio::sync::RwLock;
#[derive(Debug)]
pub(crate) struct MetricsStore {
metrics: RwLock<HashMap<MetricKey, f64>>,
}
impl MetricsStore {
pub(crate) fn new() -> Self {
Self {
metrics: ... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/metrics/mod.rs | crates/worker/src/metrics/mod.rs | pub(crate) mod store;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/console/mod.rs | crates/worker/src/console/mod.rs | pub(crate) use console_logger::*;
mod console_logger;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/console/console_logger.rs | crates/worker/src/console/console_logger.rs | use console::{style, Term};
use std::cmp;
use unicode_width::UnicodeWidthStr;
pub(crate) struct Console;
impl Console {
/// Maximum content width for the box.
const MAX_WIDTH: usize = 80;
/// Calculates the content width for boxes.
/// It uses the available terminal width (minus a margin) and caps it... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/utils/mod.rs | crates/worker/src/utils/mod.rs | pub(crate) mod logging;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/utils/logging.rs | crates/worker/src/utils/logging.rs | use log::{debug, LevelFilter};
use tracing_subscriber::filter::EnvFilter as TracingEnvFilter;
use tracing_subscriber::fmt;
use tracing_subscriber::prelude::*;
use url::Url;
use crate::cli::command::Commands;
use crate::cli::Cli;
use anyhow::Result;
use std::time::{SystemTime, UNIX_EPOCH};
use time::macros::format_desc... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/operations/mod.rs | crates/worker/src/operations/mod.rs | pub(crate) mod compute_node;
pub(crate) mod heartbeat;
pub(crate) mod provider;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/operations/compute_node.rs | crates/worker/src/operations/compute_node.rs | use crate::{console::Console, state::system_state::SystemState};
use alloy::{primitives::utils::keccak256 as keccak, primitives::U256, signers::Signer};
use anyhow::Result;
use shared::web3::wallet::Wallet;
use shared::web3::{contracts::core::builder::Contracts, wallet::WalletProvider};
use std::sync::Arc;
use tokio::t... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/operations/provider.rs | crates/worker/src/operations/provider.rs | use crate::console::Console;
use alloy::primitives::utils::format_ether;
use alloy::primitives::{Address, U256};
use log::error;
use shared::web3::contracts::core::builder::Contracts;
use shared::web3::wallet::{Wallet, WalletProvider};
use std::io::Write;
use std::{fmt, io};
use tokio::time::{sleep, Duration};
use toki... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/operations/heartbeat/service.rs | crates/worker/src/operations/heartbeat/service.rs | use crate::docker::DockerService;
use crate::metrics::store::MetricsStore;
use crate::state::system_state::SystemState;
use crate::TaskHandles;
use log::info;
use reqwest::Client;
use shared::models::api::ApiResponse;
use shared::models::heartbeat::{HeartbeatRequest, HeartbeatResponse};
use shared::security::request_si... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/operations/heartbeat/mod.rs | crates/worker/src/operations/heartbeat/mod.rs | pub(crate) mod service;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/cli/command.rs | crates/worker/src/cli/command.rs | use crate::checks::hardware::HardwareChecker;
use crate::checks::issue::IssueReport;
use crate::checks::software::SoftwareChecker;
use crate::checks::stun::StunCheck;
use crate::console::Console;
use crate::docker::taskbridge::TaskBridge;
use crate::docker::DockerService;
use crate::metrics::store::MetricsStore;
use cr... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | true |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/cli/mod.rs | crates/worker/src/cli/mod.rs | pub(crate) mod command;
pub use command::{execute_command, Cli};
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/p2p/mod.rs | crates/worker/src/p2p/mod.rs | use anyhow::Context as _;
use anyhow::Result;
use futures::stream::FuturesUnordered;
use p2p::InviteRequestUrl;
use p2p::Node;
use p2p::NodeBuilder;
use p2p::PeerId;
use p2p::Response;
use p2p::{IncomingMessage, Libp2pIncomingMessage, OutgoingMessage};
use shared::web3::contracts::core::builder::Contracts;
use shared::... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/stun.rs | crates/worker/src/checks/stun.rs | use std::sync::Arc;
use std::time::Duration;
use tokio::net::UdpSocket;
use tokio::sync::mpsc;
use tokio::time::timeout;
use stun::agent::*;
use stun::client::*;
use stun::message::*;
use stun::xoraddr::*;
use tracing::{debug, error, info};
pub(crate) struct StunCheck {
pub timeout: Duration,
pub port: u16,
... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/issue.rs | crates/worker/src/checks/issue.rs | use crate::console::Console;
use std::fmt;
use std::sync::{Arc, RwLock};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum Severity {
Warning,
Error,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum IssueType {
NoGpu, // GPU required for compute
DockerNo... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/mod.rs | crates/worker/src/checks/mod.rs | pub(crate) mod hardware;
pub(crate) mod issue;
pub(crate) mod software;
pub(crate) mod stun;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/hardware/gpu.rs | crates/worker/src/checks/hardware/gpu.rs | use crate::console::Console;
use lazy_static::lazy_static;
use nvml_wrapper::Nvml;
use shared::models::node::GpuSpecs;
use std::sync::Mutex;
#[allow(dead_code)]
const BYTES_TO_MB: u64 = 1024 * 1024;
// Use lazy_static to initialize NVML once and reuse it
lazy_static! {
static ref NVML: Mutex<Option<Nvml>> = Mutex... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/hardware/memory.rs | crates/worker/src/checks/hardware/memory.rs | use crate::console::Console;
use sysinfo::System;
const BYTES_TO_GB: u64 = 1024 * 1024 * 1024;
pub(crate) fn get_memory_info(sys: &System) -> (u64, u64) {
let total_memory = sys.total_memory();
let free_memory = sys.available_memory();
(total_memory, free_memory)
}
pub(crate) fn convert_to_mb(memory: u64... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/hardware/storage_path.rs | crates/worker/src/checks/hardware/storage_path.rs | use super::storage;
use super::storage::APP_DIR_NAME;
use crate::{
checks::issue::{IssueReport, IssueType},
console::Console,
};
use log::info;
use std::sync::Arc;
use tokio::sync::RwLock;
pub(crate) struct StoragePathDetector {
issues: Arc<RwLock<IssueReport>>,
}
impl StoragePathDetector {
pub(crate)... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/hardware/interconnect.rs | crates/worker/src/checks/hardware/interconnect.rs | use rand::RngCore;
use reqwest::Client;
use std::time::Instant;
pub(crate) struct InterconnectCheck;
impl InterconnectCheck {
pub(crate) async fn check_speeds() -> Result<(f64, f64), Box<dyn std::error::Error>> {
let client = Client::new();
// Download test: Request a 10 MB file using the query p... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/hardware/storage.rs | crates/worker/src/checks/hardware/storage.rs | use crate::console::Console;
#[cfg(target_os = "linux")]
use libc::{statvfs, statvfs as statvfs_t};
use std::env;
#[cfg(target_os = "linux")]
use std::ffi::CString;
#[cfg(target_os = "linux")]
use std::fs;
pub(crate) const BYTES_TO_GB: f64 = 1024.0 * 1024.0 * 1024.0;
pub(crate) const APP_DIR_NAME: &str = "prime-worker"... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/hardware/mod.rs | crates/worker/src/checks/hardware/mod.rs | pub(crate) mod gpu;
pub(crate) mod hardware_check;
pub(crate) mod interconnect;
pub(crate) mod memory;
pub(crate) mod storage;
pub(crate) mod storage_path;
pub(crate) use hardware_check::HardwareChecker;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/hardware/hardware_check.rs | crates/worker/src/checks/hardware/hardware_check.rs | use super::{
gpu::detect_gpu,
interconnect::InterconnectCheck,
memory::{convert_to_mb, get_memory_info, print_memory_info},
storage::{get_storage_info, BYTES_TO_GB},
storage_path::StoragePathDetector,
};
use crate::{
checks::issue::{IssueReport, IssueType},
console::Console,
};
use shared::m... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/software/software_check.rs | crates/worker/src/checks/software/software_check.rs | use super::{docker::check_docker_installed, port::check_port_available};
use crate::checks::issue::IssueReport;
use crate::console::Console;
use shared::models::node::Node;
use std::sync::Arc;
use tokio::sync::RwLock;
pub(crate) struct SoftwareChecker {
issues: Arc<RwLock<IssueReport>>,
}
impl SoftwareChecker {
... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/software/docker.rs | crates/worker/src/checks/software/docker.rs | use crate::checks::issue::{IssueReport, IssueType};
use crate::console::Console;
use bollard::container::ListContainersOptions;
use bollard::Docker;
use std::sync::Arc;
use tokio::sync::RwLock;
pub(crate) async fn check_docker_installed(
issues: &Arc<RwLock<IssueReport>>,
) -> Result<(), Box<dyn std::error::Error>... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/software/port.rs | crates/worker/src/checks/software/port.rs | use crate::checks::issue::{IssueReport, IssueType};
use crate::console::Console;
use anyhow::Result;
use std::net::TcpListener;
use std::sync::Arc;
use tokio::sync::RwLock;
fn try_bind_port(port: u16) -> Result<()> {
let addr = format!("0.0.0.0:{port}");
// If bind succeeds, port is available; if it fails, por... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/worker/src/checks/software/mod.rs | crates/worker/src/checks/software/mod.rs | pub(crate) mod docker;
pub(crate) mod port;
pub(crate) mod software_check;
pub(crate) use software_check::SoftwareChecker;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/lib.rs | crates/orchestrator/src/lib.rs | mod api;
mod discovery;
mod metrics;
mod models;
mod node;
mod p2p;
mod plugins;
mod scheduler;
mod status_update;
mod store;
mod utils;
pub use api::server::start_server;
pub use discovery::monitor::DiscoveryMonitor;
pub use metrics::sync_service::MetricsSyncService;
pub use metrics::webhook_sender::MetricsWebhookSen... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/main.rs | crates/orchestrator/src/main.rs | use anyhow::Result;
use clap::Parser;
use log::debug;
use log::error;
use log::info;
use log::LevelFilter;
use shared::utils::google_cloud::GcsStorageProvider;
use shared::web3::contracts::core::builder::ContractBuilder;
use shared::web3::wallet::Wallet;
use std::sync::Arc;
use tokio::task::JoinSet;
use tokio_util::syn... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/discovery/mod.rs | crates/orchestrator/src/discovery/mod.rs | pub(crate) mod monitor;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/discovery/monitor.rs | crates/orchestrator/src/discovery/monitor.rs | use crate::models::node::NodeStatus;
use crate::models::node::OrchestratorNode;
use crate::plugins::StatusUpdatePlugin;
use crate::store::core::StoreContext;
use crate::utils::loop_heartbeats::LoopHeartbeats;
use alloy::primitives::Address;
use alloy::primitives::U256;
use anyhow::Error;
use anyhow::Result;
use chrono:... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/node/mod.rs | crates/orchestrator/src/node/mod.rs | pub(crate) mod invite;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/node/invite.rs | crates/orchestrator/src/node/invite.rs | use crate::models::node::NodeStatus;
use crate::models::node::OrchestratorNode;
use crate::p2p::InviteRequest as InviteRequestWithMetadata;
use crate::store::core::StoreContext;
use crate::utils::loop_heartbeats::LoopHeartbeats;
use alloy::primitives::utils::keccak256 as keccak;
use alloy::primitives::U256;
use alloy::... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/store/mod.rs | crates/orchestrator/src/store/mod.rs | pub(crate) mod core;
mod domains;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/store/domains/task_store.rs | crates/orchestrator/src/store/domains/task_store.rs | use crate::store::core::RedisStore;
use crate::NodeGroupsPlugin;
use anyhow::Result;
use futures::future;
use log::error;
use redis::AsyncCommands;
use shared::models::task::Task;
use std::sync::Arc;
use tokio::sync::Mutex;
const TASK_KEY_PREFIX: &str = "orchestrator:task:";
const TASK_LIST_KEY: &str = "orchestrator:t... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/store/domains/metrics_store.rs | crates/orchestrator/src/store/domains/metrics_store.rs | use crate::store::core::RedisStore;
use alloy::primitives::Address;
use anyhow::{anyhow, Result};
use log::error;
use redis::AsyncCommands;
use shared::models::metric::MetricEntry;
use std::collections::HashMap;
use std::sync::Arc;
const ORCHESTRATOR_NODE_METRICS_STORE: &str = "orchestrator:node_metrics";
pub struct ... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/store/domains/node_store.rs | crates/orchestrator/src/store/domains/node_store.rs | use crate::models::node::NodeStatus;
use crate::models::node::OrchestratorNode;
use crate::store::core::RedisStore;
use alloy::primitives::Address;
use anyhow::Result;
use chrono::{DateTime, Utc};
use log::info;
use redis::AsyncCommands;
use shared::models::heartbeat::TaskDetails;
use shared::models::node::NodeLocation... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/store/domains/heartbeat_store.rs | crates/orchestrator/src/store/domains/heartbeat_store.rs | use crate::store::core::RedisStore;
use alloy::primitives::Address;
use anyhow::{anyhow, Result};
use redis::AsyncCommands;
use shared::models::heartbeat::HeartbeatRequest;
use std::str::FromStr;
use std::sync::Arc;
const ORCHESTRATOR_UNHEALTHY_COUNTER_KEY: &str = "orchestrator:unhealthy_counter";
const ORCHESTRATOR_H... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/store/domains/mod.rs | crates/orchestrator/src/store/domains/mod.rs | pub(super) mod heartbeat_store;
pub(super) mod metrics_store;
pub(super) mod node_store;
pub(super) mod task_store;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/store/core/mod.rs | crates/orchestrator/src/store/core/mod.rs | pub(crate) mod context;
pub(crate) mod redis;
pub use context::StoreContext;
pub use redis::RedisStore;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/store/core/context.rs | crates/orchestrator/src/store/core/context.rs | use crate::store::core::RedisStore;
use crate::store::domains::heartbeat_store::HeartbeatStore;
use crate::store::domains::metrics_store::MetricsStore;
use crate::store::domains::node_store::NodeStore;
use crate::store::domains::task_store::TaskStore;
use std::sync::Arc;
pub struct StoreContext {
pub node_store: A... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/store/core/redis.rs | crates/orchestrator/src/store/core/redis.rs | #[cfg(test)]
use log::debug;
use log::info;
use redis::Client;
#[cfg(test)]
use redis_test::server::RedisServer;
#[cfg(test)]
use std::sync::Arc;
#[cfg(test)]
use std::thread;
#[cfg(test)]
use std::time::Duration;
#[derive(Clone)]
pub struct RedisStore {
pub client: Client,
#[allow(dead_code)]
#[cfg(test)]
... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/metrics/sync_service.rs | crates/orchestrator/src/metrics/sync_service.rs | use crate::metrics::MetricsContext;
use crate::plugins::node_groups::NodeGroupsPlugin;
use crate::store::core::StoreContext;
use crate::ServerMode;
use log::{debug, error, info};
use shared::models::task::Task;
use std::collections::HashMap;
use std::sync::Arc;
use std::time::Duration;
use tokio::time::interval;
pub s... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/metrics/webhook_sender.rs | crates/orchestrator/src/metrics/webhook_sender.rs | use crate::plugins::webhook::WebhookPlugin;
use crate::store::core::StoreContext;
use anyhow::Result;
use log::{error, info};
use std::collections::HashMap;
use std::sync::Arc;
use std::time::Duration;
use tokio::time::interval;
pub struct MetricsWebhookSender {
store_context: Arc<StoreContext>,
webhook_plugin... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/metrics/mod.rs | crates/orchestrator/src/metrics/mod.rs | use prometheus::{CounterVec, GaugeVec, HistogramOpts, HistogramVec, Opts, Registry, TextEncoder};
pub(crate) mod sync_service;
pub(crate) mod webhook_sender;
pub struct MetricsContext {
pub compute_task_gauges: GaugeVec,
pub task_info: GaugeVec,
pub pool_id: String,
pub registry: Registry,
pub file... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/models/node.rs | crates/orchestrator/src/models/node.rs | use alloy::primitives::Address;
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use shared::models::heartbeat::TaskDetails;
use shared::models::node::{ComputeSpecs, DiscoveryNode, NodeLocation};
use shared::models::task::TaskState;
use std::fmt::{self, Display};
use utoipa::ToSchema;
#[derive(Debug, ... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/models/mod.rs | crates/orchestrator/src/models/mod.rs | pub(crate) mod node;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/utils/loop_heartbeats.rs | crates/orchestrator/src/utils/loop_heartbeats.rs | use serde::Serialize;
use std::sync::atomic::{AtomicI64, Ordering};
use std::sync::Arc;
use std::time::{SystemTime, UNIX_EPOCH};
use utoipa::ToSchema;
use crate::ServerMode;
#[derive(Serialize, ToSchema)]
pub struct HealthStatus {
pub healthy: bool,
pub inviter_last_run_seconds_ago: i64,
pub monitor_last_... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/utils/mod.rs | crates/orchestrator/src/utils/mod.rs | pub(crate) mod loop_heartbeats;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/scheduler/mod.rs | crates/orchestrator/src/scheduler/mod.rs | use alloy::primitives::Address;
use shared::models::task::Task;
use std::sync::Arc;
use crate::plugins::{newest_task::NewestTaskPlugin, SchedulerPlugin};
use crate::store::core::StoreContext;
use anyhow::Result;
pub struct Scheduler {
store_context: Arc<StoreContext>,
plugins: Vec<SchedulerPlugin>,
}
impl Sch... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/status_update/mod.rs | crates/orchestrator/src/status_update/mod.rs | use crate::metrics::MetricsContext;
use crate::models::node::{NodeStatus, OrchestratorNode};
use crate::plugins::StatusUpdatePlugin;
use crate::store::core::StoreContext;
use crate::utils::loop_heartbeats::LoopHeartbeats;
use futures::stream::FuturesUnordered;
use log::{debug, error, info};
use shared::web3::contracts:... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | true |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/mod.rs | crates/orchestrator/src/api/mod.rs | pub(crate) mod routes;
pub(crate) mod server;
pub(crate) mod tests;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/server.rs | crates/orchestrator/src/api/server.rs | use crate::api::routes::groups::groups_routes;
use crate::api::routes::nodes::nodes_routes;
use crate::api::routes::storage::storage_routes;
use crate::api::routes::task::tasks_routes;
use crate::api::routes::{heartbeat::heartbeat_routes, metrics::metrics_routes};
use crate::metrics::MetricsContext;
use crate::models::... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/tests/helper.rs | crates/orchestrator/src/api/tests/helper.rs | #[cfg(test)]
use crate::api::server::AppState;
#[cfg(test)]
use crate::store::core::RedisStore;
#[cfg(test)]
use crate::store::core::StoreContext;
#[cfg(test)]
use actix_web::web::Data;
#[cfg(test)]
use shared::web3::contracts::core::builder::{ContractBuilder, Contracts};
#[cfg(test)]
use shared::web3::wallet::Wallet;
... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/tests/mod.rs | crates/orchestrator/src/api/tests/mod.rs | pub(crate) mod helper;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/routes/storage.rs | crates/orchestrator/src/api/routes/storage.rs | use crate::api::server::AppState;
use actix_web::{
web::{self, post, Data},
HttpRequest, HttpResponse, Scope,
};
use redis::AsyncCommands;
use shared::models::storage::RequestUploadRequest;
use std::time::Duration;
const MAX_FILE_SIZE: u64 = 100 * 1024 * 1024;
fn validate_file_name(file_name: &str) -> Result<... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/routes/mod.rs | crates/orchestrator/src/api/routes/mod.rs | pub(crate) mod groups;
pub(crate) mod heartbeat;
pub(crate) mod metrics;
pub(crate) mod nodes;
pub(crate) mod storage;
pub(crate) mod task;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/routes/nodes.rs | crates/orchestrator/src/api/routes/nodes.rs | use crate::api::server::AppState;
use actix_web::{
web::{self, get, post, Data, Query},
HttpResponse, Scope,
};
use alloy::primitives::Address;
use log::{error, info};
use serde::Deserialize;
use serde_json::json;
use std::str::FromStr;
#[derive(Deserialize)]
struct NodeQuery {
include_dead: Option<bool>,
... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/routes/task.rs | crates/orchestrator/src/api/routes/task.rs | use crate::api::server::AppState;
use crate::plugins::node_groups::get_task_topologies;
use actix_web::{
web::{self, delete, get, post, Data},
HttpResponse, Scope,
};
use serde_json::json;
use shared::models::task::Task;
use shared::models::task::TaskRequest;
#[utoipa::path(
get,
path = "/tasks",
r... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/routes/groups.rs | crates/orchestrator/src/api/routes/groups.rs | use crate::api::server::AppState;
use actix_web::{
web::{self, delete, get, post, Data},
HttpResponse, Scope,
};
use alloy::primitives::Address;
use futures::future::join_all;
use log::error;
use serde::{Deserialize, Serialize};
use serde_json::json;
use std::str::FromStr;
use std::time::Duration;
use utoipa::T... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/routes/metrics.rs | crates/orchestrator/src/api/routes/metrics.rs | use crate::api::server::AppState;
use actix_web::{
web::{self, delete, get, post, Data, Path},
HttpResponse, Scope,
};
use log::error;
use serde::Deserialize;
use serde_json::json;
use utoipa::ToSchema;
#[derive(Deserialize, ToSchema)]
struct ManualMetricEntry {
label: String,
value: f64,
}
#[derive(D... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/api/routes/heartbeat.rs | crates/orchestrator/src/api/routes/heartbeat.rs | use crate::{api::server::AppState, models::node::NodeStatus};
use actix_web::{
web::{self, post, Data},
HttpResponse, Scope,
};
use alloy::primitives::Address;
use log::error;
use serde_json::json;
use shared::models::{
api::ApiResponse,
heartbeat::{HeartbeatRequest, HeartbeatResponse},
};
use std::coll... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/plugins/mod.rs | crates/orchestrator/src/plugins/mod.rs | use crate::plugins::newest_task::NewestTaskPlugin;
use alloy::primitives::Address;
use anyhow::Result;
use shared::models::task::Task;
use std::sync::Arc;
use crate::{
models::node::{NodeStatus, OrchestratorNode},
plugins::node_groups::NodeGroupsPlugin,
plugins::webhook::WebhookPlugin,
};
pub(crate) mod n... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/plugins/newest_task/mod.rs | crates/orchestrator/src/plugins/newest_task/mod.rs | use anyhow::Result;
use shared::models::task::Task;
#[derive(Clone)]
pub struct NewestTaskPlugin;
impl NewestTaskPlugin {
pub(crate) fn filter_tasks(&self, tasks: &[Task]) -> Result<Vec<Task>> {
if tasks.is_empty() {
return Ok(vec![]);
}
// Find newest task based on created_at... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/plugins/node_groups/status_update_impl.rs | crates/orchestrator/src/plugins/node_groups/status_update_impl.rs | use crate::models::node::{NodeStatus, OrchestratorNode};
use crate::plugins::node_groups::NodeGroupsPlugin;
use anyhow::Error;
use anyhow::Result;
use log::info;
impl NodeGroupsPlugin {
pub(crate) async fn handle_status_change(&self, node: &OrchestratorNode) -> Result<(), Error> {
let node_addr = node.addr... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/plugins/node_groups/tests.rs | crates/orchestrator/src/plugins/node_groups/tests.rs | use crate::{
models::node::{NodeStatus, OrchestratorNode},
plugins::node_groups::{
NodeGroup, NodeGroupConfiguration, NodeGroupsPlugin, ProximityOptimizationPolicy,
TaskSwitchingPolicy, GROUP_KEY_PREFIX, NODE_GROUP_MAP_KEY,
},
store::core::{RedisStore, StoreContext},
};
use alloy::primi... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | true |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/plugins/node_groups/mod.rs | crates/orchestrator/src/plugins/node_groups/mod.rs | use super::webhook::WebhookPlugin;
use crate::models::node::{NodeStatus, OrchestratorNode};
use crate::store::core::{RedisStore, StoreContext};
use crate::utils::loop_heartbeats::LoopHeartbeats;
use anyhow::Error;
use anyhow::Result;
use log::{debug, error, info, warn};
use rand::seq::IteratorRandom;
use redis::{AsyncC... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | true |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/plugins/node_groups/scheduler_impl.rs | crates/orchestrator/src/plugins/node_groups/scheduler_impl.rs | use super::NodeGroupsPlugin;
use alloy::primitives::Address;
use anyhow::Result;
use log::{error, info};
use rand::seq::IteratorRandom;
use redis::AsyncCommands;
use shared::models::task::Task;
use std::str::FromStr;
impl NodeGroupsPlugin {
pub(crate) async fn filter_tasks(
&self,
tasks: &[Task],
... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/plugins/webhook/mod.rs | crates/orchestrator/src/plugins/webhook/mod.rs | use std::{sync::Arc, time::Duration};
use anyhow::Error;
use serde::{Deserialize, Serialize};
use crate::models::node::{NodeStatus, OrchestratorNode};
use log::{error, info, warn};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "event", content = "data")]
pub(crate) enum WebhookEvent {
#[serde(re... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/orchestrator/src/p2p/mod.rs | crates/orchestrator/src/p2p/mod.rs | use anyhow::{bail, Context as _, Result};
use futures::stream::FuturesUnordered;
use futures::FutureExt;
use p2p::{Keypair, Protocols};
use shared::p2p::OutgoingRequest;
use shared::p2p::Service as P2PService;
use shared::web3::wallet::Wallet;
use tokio::sync::mpsc::{Receiver, Sender};
use tokio_util::sync::Cancellatio... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/lib.rs | crates/validator/src/lib.rs | mod metrics;
mod p2p;
mod store;
mod validators;
pub use metrics::export_metrics;
pub use metrics::MetricsContext;
pub use p2p::Service as P2PService;
pub use store::redis::RedisStore;
pub use validators::hardware::HardwareValidator;
pub use validators::synthetic_data::types::InvalidationType;
pub use validators::synt... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/main.rs | crates/validator/src/main.rs | use actix_web::{web, App, HttpRequest, HttpResponse, HttpServer, Responder};
use alloy::primitives::utils::Unit;
use alloy::primitives::{Address, U256};
use anyhow::{Context, Result};
use clap::Parser;
use log::{debug, LevelFilter};
use log::{error, info};
use serde_json::json;
use shared::models::api::ApiResponse;
use... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/metrics.rs | crates/validator/src/metrics.rs | use lazy_static::lazy_static;
use prometheus::{
register_counter_vec, register_gauge_vec, register_histogram_vec, CounterVec, GaugeVec,
HistogramVec, TextEncoder,
};
lazy_static! {
pub static ref VALIDATION_LOOP_DURATION: HistogramVec = register_histogram_vec!(
"validator_validation_loop_duration_s... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/store/mod.rs | crates/validator/src/store/mod.rs | pub(crate) mod redis;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/store/redis.rs | crates/validator/src/store/redis.rs | #[cfg(test)]
use log::debug;
use log::info;
use redis::Client;
#[cfg(test)]
use redis_test::server::RedisServer;
#[cfg(test)]
use std::sync::Arc;
#[cfg(test)]
use std::thread;
#[cfg(test)]
use std::time::Duration;
#[derive(Clone)]
pub struct RedisStore {
pub client: Client,
#[allow(dead_code)]
#[cfg(test)]
... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/validators/hardware_challenge.rs | crates/validator/src/validators/hardware_challenge.rs | use alloy::primitives::Address;
use anyhow::{bail, Context as _, Result};
use log::{error, info};
use rand::{rng, Rng};
use shared::models::node::DiscoveryNode;
use std::str::FromStr;
use crate::p2p::HardwareChallengeRequest;
pub(crate) struct HardwareChallenge {
challenge_tx: tokio::sync::mpsc::Sender<HardwareCh... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/validators/hardware.rs | crates/validator/src/validators/hardware.rs | use alloy::primitives::Address;
use anyhow::bail;
use anyhow::Result;
use log::{debug, error, info};
use shared::{
models::node::DiscoveryNode,
web3::{contracts::core::builder::Contracts, wallet::WalletProvider},
};
use crate::p2p::HardwareChallengeRequest;
use crate::validators::hardware_challenge::HardwareCh... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/validators/mod.rs | crates/validator/src/validators/mod.rs | pub(crate) mod hardware;
pub(crate) mod hardware_challenge;
pub(crate) mod synthetic_data;
| rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/validators/synthetic_data/types.rs | crates/validator/src/validators/synthetic_data/types.rs | use anyhow::Error;
use regex::Regex;
use serde::{Deserialize, Serialize};
use shared::web3::contracts::implementations::work_validators::synthetic_data_validator::WorkInfo;
use std::fmt;
use std::str::FromStr;
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
pub(crate) enum ValidationResult {
Accept,
... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/validators/synthetic_data/chain_operations.rs | crates/validator/src/validators/synthetic_data/chain_operations.rs | use super::*;
impl SyntheticDataValidator<WalletProvider> {
#[cfg(test)]
pub fn soft_invalidate_work(&self, work_key: &str) -> Result<(), Error> {
info!("Soft invalidating work: {}", work_key);
if self.disable_chain_invalidation {
info!("Chain invalidation is disabled, skipping wor... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/validators/synthetic_data/mod.rs | crates/validator/src/validators/synthetic_data/mod.rs | use crate::metrics::MetricsContext;
use crate::store::redis::RedisStore;
use crate::validators::synthetic_data::types::{InvalidationType, RejectionInfo};
use alloy::primitives::U256;
use anyhow::{Context as _, Error, Result};
use futures::future;
use log::{debug, warn};
use log::{error, info};
use redis::AsyncCommands;... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | true |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/validators/synthetic_data/toploc.rs | crates/validator/src/validators/synthetic_data/toploc.rs | use crate::metrics::MetricsContext;
use super::ValidationResult;
use anyhow::Error;
use log::{debug, warn};
use log::{error, info};
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ToplocConfig {
pub server_url: String,
pub auth_token: Option<... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/validators/synthetic_data/tests/mod.rs | crates/validator/src/validators/synthetic_data/tests/mod.rs | use crate::metrics::export_metrics;
use super::*;
use alloy::primitives::Address;
use anyhow::Ok;
use mockito::Server;
use shared::utils::MockStorageProvider;
use shared::web3::contracts::core::builder::{ContractBuilder, Contracts};
use shared::web3::wallet::Wallet;
use std::str::FromStr;
use url::Url;
fn test_store(... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | true |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/validator/src/p2p/mod.rs | crates/validator/src/p2p/mod.rs | use anyhow::{bail, Context as _, Result};
use futures::stream::FuturesUnordered;
use p2p::{Keypair, Protocols};
use shared::p2p::OutgoingRequest;
use shared::p2p::Service as P2PService;
use shared::web3::wallet::Wallet;
use tokio::sync::mpsc::{Receiver, Sender};
use tokio_util::sync::CancellationToken;
pub struct Serv... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/p2p/src/lib.rs | crates/p2p/src/lib.rs | use anyhow::Context;
use anyhow::Result;
use libp2p::noise;
use libp2p::swarm::SwarmEvent;
use libp2p::tcp;
use libp2p::yamux;
use libp2p::Swarm;
use libp2p::SwarmBuilder;
use libp2p::{identity, Transport};
use log::debug;
use std::time::Duration;
mod behaviour;
mod message;
mod protocol;
use behaviour::Behaviour;
p... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
PrimeIntellect-ai/protocol | https://github.com/PrimeIntellect-ai/protocol/blob/d389f2035ec2c3c485c6b3e270625f86c7609d50/crates/p2p/src/behaviour.rs | crates/p2p/src/behaviour.rs | use anyhow::Context as _;
use anyhow::Result;
use libp2p::autonat;
use libp2p::connection_limits;
use libp2p::connection_limits::ConnectionLimits;
use libp2p::identify;
use libp2p::identity;
use libp2p::kad;
// use libp2p::kad::store::MemoryStore;
use libp2p::mdns;
use libp2p::ping;
use libp2p::request_response;
use li... | rust | Apache-2.0 | d389f2035ec2c3c485c6b3e270625f86c7609d50 | 2026-01-04T20:18:07.676063Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.