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
2 changes: 1 addition & 1 deletion .github/workflows/bento-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
env:
RISC0_TOOLCHAIN_VERSION: 1.88.0
RISC0_CRATE_VERSION: "3.0.3"
RUST_VERSION: "1.88.0"
RUST_VERSION: "1.91.1"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/broker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
env:
RISC0_TOOLCHAIN_VERSION: 1.88.0
RISC0_CRATE_VERSION: "3.0.3"
RUST_VERSION: "1.88.0"
RUST_VERSION: "1.91.1"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FOUNDRY_VERSION: v1.2.3
Expand Down
18 changes: 14 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,27 @@
"CARGO_TARGET_DIR": "target/analyzer"
},
"rust-analyzer.check.command": "clippy",
"rust-analyzer.check.extraArgs": ["--target-dir=target/analyzer"],
"rust-analyzer.check.extraArgs": [
"--target-dir=target/analyzer"
],
"rust-analyzer.linkedProjects": [
"./Cargo.toml",
"./crates/boundless-cli/Cargo.toml",
"./crates/broker/Cargo.toml",
"./bento/Cargo.toml",
// "./crates/guest/assessor/assessor-guest/Cargo.toml",
// "./crates/guest/util/echo/Cargo.toml",
// "./crates/guest/util/identity/Cargo.toml",
// "./examples/counter/Cargo.toml",
// "./examples/smart-contract-requestor/Cargo.toml",
// "./examples/counter-with-callback/Cargo.toml"
],
"rust-analyzer.files.exclude": ["./lib/", "./contracts/out/"],
"rust-analyzer.files.exclude": [
// Exclude solidity artifacts and dependencies
"./lib/",
"./contracts/out/",
"./out/",
],
"[javascript][javascriptreact][typescript][typescriptreact][github-actions-workflow][json][css]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
Expand All @@ -32,11 +40,13 @@
"biome.rename": true,
"biome.enabled": true,
"biome.lspBin": "documentation/node_modules/.bin/biome",
"cSpell.words": ["offchain"],
"cSpell.words": [
"offchain"
],
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ impl ProverGenerateConfig {
prices_per_mcycle.sort_by(|a, b| a.partial_cmp(b).unwrap_or(std::cmp::Ordering::Equal));

// Calculate median (50th percentile)
let median_price = if prices_per_mcycle.len() % 2 == 0 {
let median_price = if prices_per_mcycle.len().is_multiple_of(2) {
let mid = prices_per_mcycle.len() / 2;
(prices_per_mcycle[mid - 1] + prices_per_mcycle[mid]) / 2.0
} else {
Expand Down
53 changes: 0 additions & 53 deletions crates/boundless-cli/src/indexer_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,45 +236,6 @@ pub struct PaginationInfo {
pub limit: u32,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct StakingEntry {
pub staker_address: String,
pub epoch: u64,
pub staked_amount: String,
pub staked_amount_formatted: String,
pub is_withdrawing: bool,
pub rewards_generated: String,
pub rewards_generated_formatted: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub rank: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub rewards_delegated_to: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub votes_delegated_to: Option<String>,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct StakingSummary {
pub staker_address: String,
pub total_staked: String,
pub total_staked_formatted: String,
pub is_withdrawing: bool,
pub epochs_participated: u64,
pub total_rewards_generated: String,
pub total_rewards_generated_formatted: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub rewards_delegated_to: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub votes_delegated_to: Option<String>,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct StakingHistoryResponse {
pub entries: Vec<StakingEntry>,
pub pagination: PaginationInfo,
pub summary: Option<StakingSummary>,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct EpochStakingSummary {
pub epoch: u64,
Expand All @@ -293,13 +254,6 @@ pub struct EpochStakingSummary {
pub last_updated_at: Option<String>,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct EpochStakingResponse {
pub entries: Vec<StakingEntry>,
pub pagination: PaginationInfo,
pub summary: Option<EpochStakingSummary>,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct PovwEntry {
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down Expand Up @@ -349,13 +303,6 @@ pub struct EpochPovwSummary {
pub last_updated_at: Option<String>,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct EpochPovwResponse {
pub entries: Vec<PovwEntry>,
pub pagination: PaginationInfo,
pub summary: Option<EpochPovwSummary>,
}

///Data for a specific address in a specific epoch
#[derive(Debug, Deserialize, Serialize)]
pub struct EpochPovwAddressData {
Expand Down
18 changes: 4 additions & 14 deletions crates/broker/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,25 +166,20 @@ mod defaults {
}

/// Order pricing priority mode for determining which orders to price first
#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
#[derive(Default, Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
#[serde(rename_all = "snake_case")]
pub enum OrderPricingPriority {
/// Process orders in random order to distribute competition among provers
#[default]
Random,
/// Process orders in the order they were observed (FIFO)
ObservationTime,
/// Process orders by shortest expiry first (earliest deadline)
ShortestExpiry,
}

impl Default for OrderPricingPriority {
fn default() -> Self {
Self::Random
}
}

/// Order commitment priority mode for determining which orders to commit to first
#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
#[derive(Default, Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)]
#[serde(rename_all = "snake_case")]
pub enum OrderCommitmentPriority {
/// Process orders in random order to distribute competition among provers
Expand All @@ -194,15 +189,10 @@ pub enum OrderCommitmentPriority {
/// Process lock-and-fulfill orders by highest ETH payment, then fulfill-after-lock-expire random weighted by collateral reward
Price,
/// Process lock-and-fulfill orders by highest ETH price per cycle, then fulfill-after-lock-expire random weighted by collateral reward
#[default]
CyclePrice,
}

impl Default for OrderCommitmentPriority {
fn default() -> Self {
Self::CyclePrice
}
}

/// All configuration related to markets mechanics
#[derive(Debug, Deserialize, Serialize)]
#[non_exhaustive]
Expand Down
1 change: 1 addition & 0 deletions crates/lambdas/indexer-api/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

/// Health check response
#[allow(dead_code)]
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct HealthResponse {
pub status: String,
Expand Down
2 changes: 1 addition & 1 deletion crates/lambdas/indexer-api/tests/local_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl SharedTestEnv {
}

// Print progress every 5 seconds
if start.elapsed().as_secs() % 5 == 0 {
if start.elapsed().as_secs().is_multiple_of(5) {
let size = std::fs::metadata(db_path).map(|m| m.len()).unwrap_or(0);
debug!(
"Still indexing... (elapsed: {}s, DB size: {} bytes)",
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/agent.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ENV RUSTUP_HOME=/usr/local/rustup \
# Install rust and target version (should match rust-toolchain.toml for best speed)
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
&& chmod -R a+w $RUSTUP_HOME $CARGO_HOME \
&& rustup install 1.88
&& rustup install 1.91.1

# Install protoc
RUN curl -o protoc.zip -L https://github.com/protocolbuffers/protobuf/releases/download/v31.1/protoc-31.1-linux-x86_64.zip \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/agent.prebuilt.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV PATH="/root/.cargo/bin:${PATH}"
# Install rust and target version (should match rust-toolchain.toml for best speed)
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
&& chmod -R a+w $RUSTUP_HOME $CARGO_HOME \
&& rustup install 1.88
&& rustup install 1.91.1

# Install RISC0 specifically for groth16 component - this layer will be cached unless RISC0_HOME changes
RUN curl -L https://risczero.com/install | bash && \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/bento_cli.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
ARG RUST_IMG=rust:1.88-bookworm
ARG RUST_IMG=rust:1.91.1-bookworm
ARG S3_CACHE_PREFIX="public/rust-cache-docker-Linux-X64/sccache"

FROM ${RUST_IMG} AS rust-builder
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/broker.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.88.0-bookworm AS init
FROM rust:1.91.1-bookworm AS init

RUN apt-get -qq update && \
apt-get install -y -q clang
Expand Down Expand Up @@ -64,7 +64,7 @@ SHELL ["/bin/bash", "-c"]
RUN cargo build --release --bin broker && \
cp /src/target/release/broker /src/broker

FROM rust:1.88.0-bookworm AS runtime
FROM rust:1.91.1-bookworm AS runtime

RUN mkdir /app/

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/distributor.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM rust:1.88.0-bookworm AS init
FROM rust:1.91.1-bookworm AS init

RUN apt-get -qq update && \
apt-get install -y -q clang
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/market-indexer.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM rust:1.88.0-bookworm AS init
FROM rust:1.91.1-bookworm AS init

RUN apt-get -qq update && \
apt-get install -y -q clang
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/order_generator.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM rust:1.88.0-bookworm AS init
FROM rust:1.91.1-bookworm AS init

RUN apt-get -qq update && \
apt-get install -y -q clang
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/order_stream.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.88.0-bookworm AS init
FROM rust:1.91.1-bookworm AS init

RUN apt-get -qq update && \
apt-get install -y -q clang
Expand Down Expand Up @@ -64,7 +64,7 @@ SHELL ["/bin/bash", "-c"]
RUN cargo build --release -p order-stream --bin order_stream && \
cp /src/target/release/order_stream /src/order_stream

FROM rust:1.88.0-bookworm AS runtime
FROM rust:1.91.1-bookworm AS runtime

RUN mkdir /app/

Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/rest_api.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG S3_CACHE_PREFIX="public/rust-cache-docker-Linux-X64/sccache"

FROM rust:1.85.0-bookworm AS builder
FROM rust:1.91.1-bookworm AS builder

RUN apt-get -qq update && apt-get install -y -q clang

Expand All @@ -23,7 +23,7 @@ RUN --mount=type=secret,id=ci_cache_creds,target=/root/.aws/credentials \
cp bento/target/release/rest_api /src/rest_api && \
sccache --show-stats

FROM rust:1.85.0-bookworm AS runtime
FROM rust:1.91.1-bookworm AS runtime

RUN mkdir /app/ && \
apt -qq update && \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/rewards-indexer.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM rust:1.88.0-bookworm AS init
FROM rust:1.91.1-bookworm AS init

RUN apt-get -qq update && \
apt-get install -y -q clang
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/slasher.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM rust:1.88.0-bookworm AS init
FROM rust:1.91.1-bookworm AS init

RUN apt-get -qq update && \
apt-get install -y -q clang
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.89"
channel = "1.91.1"
components = ["clippy", "rustfmt", "rust-src"]
profile = "minimal"
Loading