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 |
|---|---|---|---|---|---|---|---|---|
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-metrics/src/memory_profiler.rs | linera-metrics/src/memory_profiler.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Safe jemalloc memory profiling with jemalloc_pprof integration
//!
//! This module provides HTTP endpoints for pprof format profiles using pull model.
//! Profiles are generated on-demand when endpoints are requested by Grafana Alloy.
use... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-metrics/src/monitoring_server.rs | linera-metrics/src/monitoring_server.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::fmt::Debug;
use axum::{http::StatusCode, response::IntoResponse, routing::get, Router};
use tokio::net::ToSocketAddrs;
use tokio_util::sync::CancellationToken;
use tracing::info;
#[cfg(feature = "memory-profiling")]
use crate::memor... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/build.rs | linera-client/build.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
fn main() {
cfg_aliases::cfg_aliases! {
web: { all(target_arch = "wasm32", feature = "web") },
with_testing: { any(test, feature = "test") },
with_metrics: { all(not(target_arch = "wasm32"), feature = "metrics") },
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/config.rs | linera-client/src/config.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::iter::IntoIterator;
use linera_base::{
crypto::{AccountPublicKey, BcsSignable, CryptoHash, ValidatorPublicKey, ValidatorSecretKey},
data_types::{
Amount, Blob, Chain... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/client_context.rs | linera-client/src/client_context.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::sync::Arc;
use futures::{Future, StreamExt as _, TryStreamExt as _};
use linera_base::{
crypto::{CryptoHash, ValidatorPublicKey},
data_types::{Epoch, Timestamp},
identifiers::{Account, AccountOwner, ChainId},
ownershi... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/lib.rs | linera-client/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module provides a convenient library for writing a Linera client application.
#![recursion_limit = "256"]
#![allow(async_fn_in_trait)]
pub mod chain_listener;
pub mod client_context;
pub use client_context::ClientContext;
#[cfg(not(... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/benchmark.rs | linera-client/src/benchmark.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
collections::HashMap,
path::Path,
sync::{
atomic::{AtomicUsize, Ordering},
Arc,
},
};
use linera_base::{
data_types::Amount,
identifiers::{Account, AccountOwner, ApplicationId, ChainId},
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/error.rs | linera-client/src/error.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
crypto::ValidatorPublicKey, data_types::NetworkDescription, identifiers::ChainId,
};
use linera_core::node::NodeError;
use linera_version::VersionInfo;
use thiserror_context::Context;
#[cfg(not(web))]
use crate::benchma... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/util.rs | linera-client/src/util.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{collections::HashSet, num::ParseIntError, str::FromStr};
use futures::future;
use linera_base::{
crypto::CryptoError,
data_types::{TimeDelta, Timestamp},
identifiers::{ApplicationId, ChainId, GenericApplicationId},
t... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/client_options.rs | linera-client/src/client_options.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{collections::HashSet, fmt, iter};
use linera_base::{
data_types::{ApplicationPermissions, TimeDelta},
identifiers::{AccountOwner, ApplicationId, ChainId, GenericApplicationId},
ownership::{ChainOwnership, TimeoutConfig},... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/client_metrics.rs | linera-client/src/client_metrics.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use hdrhistogram::Histogram;
use linera_core::client::TimingType;
use tokio::{sync::mpsc, task, time};
use tracing::{debug, info, warn};
#[derive(Debug, Clone)]
pub struct TimingConfig {
pub enabled: bool,
pub report_interval_secs: u6... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/chain_listener.rs | linera-client/src/chain_listener.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
collections::{btree_map::Entry, BTreeMap, BTreeSet},
sync::Arc,
time::Duration,
};
use futures::{
future::{join_all, select_all},
lock::Mutex,
Future, FutureExt as _, StreamExt,
};
use linera_base::{
cry... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/unit_tests/mod.rs | linera-client/src/unit_tests/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
mod chain_listener;
| rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-client/src/unit_tests/chain_listener.rs | linera-client/src/unit_tests/chain_listener.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{sync::Arc, time::Duration};
use futures::{lock::Mutex, FutureExt as _};
use linera_base::{
crypto::{AccountPublicKey, InMemorySigner},
data_types::{Amount, BlockHeight, Epoch, TimeDelta, Timestamp},
identifiers::{Account... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-explorer/src/entrypoint.rs | linera-explorer/src/entrypoint.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use serde::Serialize;
use serde_json::Value;
use serde_wasm_bindgen::from_value;
use wasm_bindgen::prelude::*;
use super::js_utils::{getf, js_to_json, setf, SER};
use crate::reqwest_client;
/// Auxiliary recursive function for `forge_arg`.
f... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-explorer/src/lib.rs | linera-explorer/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module provides web files to run a block explorer from Linera service node and Linera indexer.
#![recursion_limit = "256"]
mod entrypoint;
mod graphql;
mod input_type;
mod js_utils;
use std::str::FromStr;
use anyhow::{anyhow, Cont... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-explorer/src/input_type.rs | linera-explorer/src/input_type.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use wasm_bindgen::prelude::*;
use super::js_utils::{getf, unproxy};
/// Adds an input line for lists.
#[wasm_bindgen]
pub fn append_input(component: JsValue) {
let element = getf(&component, "elt");
let input: js_sys::Array = getf(&e... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-explorer/src/js_utils.rs | linera-explorer/src/js_utils.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
// use serde::Serialize;
use serde_wasm_bindgen::Serializer;
use wasm_bindgen::prelude::*;
/// JS special serializer
pub(crate) const SER: Serializer =
serde_wasm_bindgen::Serializer::new().serialize_large_number_types_as_bigints(true);
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-explorer/src/graphql.rs | linera-explorer/src/graphql.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use anyhow::Result;
use serde_json::Value;
use crate::reqwest_client;
pub async fn introspection(url: &str) -> Result<Value> {
let client = reqwest_client();
let graphql_query =
"query { \
__schema { \
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/build.rs | linera-core/build.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
fn main() {
cfg_aliases::cfg_aliases! {
web: { all(target_arch = "wasm32", feature = "web") },
with_testing: { any(test, feature = "test") },
with_metrics: { all(not(target_arch = "wasm32"), feature = "metrics") },
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/node.rs | linera-core/src/node.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#[cfg(not(web))]
use futures::stream::BoxStream;
#[cfg(web)]
use futures::stream::LocalBoxStream as BoxStream;
use futures::stream::Stream;
use linera_base::{
crypto::{CryptoError, Crypto... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/lib.rs | linera-core/src/lib.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module defines the core Linera protocol.
#![recursion_limit = "256"]
// We conditionally add autotraits to the traits here.
#![allow(async_fn_in_trait)]
mod chain_worker;
pub mod c... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/join_set_ext.rs | linera-core/src/join_set_ext.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! An extension trait to allow determining at compile time how tasks are spawned on the Tokio
//! runtime.
//!
//! In most cases the [`Future`] task to be spawned should implement [`Send`], but that's
//! not possible when compiling for the W... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/notifier.rs | linera-core/src/notifier.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::sync::Arc;
use linera_base::identifiers::ChainId;
use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender};
use tracing::trace;
use crate::worker;
// TODO(#2171): replace this with a Tokio broadcast channel
/// A `Notifier` hol... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/value_cache.rs | linera-core/src/value_cache.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! A least-recently used cache of values.
#[cfg(test)]
#[path = "unit_tests/value_cache_tests.rs"]
mod unit_tests;
#[cfg(with_metrics)]
use std::any::type_name;
use std::{borrow::Cow, hash::Hash, num::NonZeroUsize, sync::Mutex};
use linera... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/worker.rs | linera-core/src/worker.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque},
sync::{Arc, Mutex, RwLock},
time::Duration,
};
use futures::future::Either;
use linera_base::{
crypt... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/local_node.rs | linera-core/src/local_node.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
collections::{BTreeMap, HashMap, VecDeque},
sync::Arc,
};
use futures::{stream::FuturesUnordered, TryStreamExt as _};
use linera_base::{
crypto::{CryptoHash, Validator... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/remote_node.rs | linera-core/src/remote_node.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::{HashSet, VecDeque};
use custom_debug_derive::Debug;
use futures::future::try_join_all;
use linera_base::{
crypto::ValidatorPublicKey,
data_types::{Blob, BlockHeight},
ensure,
identifiers::{BlobId, ChainI... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/data_types.rs | linera-core/src/data_types.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{collections::BTreeMap, fmt, ops::Not};
use custom_debug_derive::Debug;
use linera_base::{
crypto::{
BcsSignable, CryptoError, CryptoHash, ValidatorPublicKey, ValidatorS... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/updater.rs | linera-core/src/updater.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
collections::{BTreeMap, BTreeSet, HashMap},
fmt,
hash::Hash,
mem,
sync::Arc,
};
use futures::{
stream::{FuturesUnordered, TryStreamExt},
Future, Stream... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/unit_tests/worker_tests.rs | linera-core/src/unit_tests/worker_tests.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![allow(clippy::large_futures)]
#[path = "./wasm_worker_tests.rs"]
mod wasm;
use std::{
collections::BTreeMap,
iter,
sync::{Arc, Mutex},
time::Duration,
};
use assert_matc... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/unit_tests/test_helpers.rs | linera-core/src/unit_tests/test_helpers.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use assert_matches::assert_matches;
use linera_chain::{ChainError, ChainExecutionContext};
use linera_execution::ExecutionError;
use crate::{client::chain_client, local_node::LocalNodeError, worker::WorkerError};
/// Asserts that an error is... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/unit_tests/test_utils.rs | linera-core/src/unit_tests/test_utils.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
collections::{BTreeMap, HashMap, HashSet},
sync::Arc,
time::Duration,
vec,
};
use async_trait::async_trait;
use futures::{
future::Either,
lock::{Mutex, MutexGuard},
Future,
};
use linera_base::{
cry... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/unit_tests/client_tests.rs | linera-core/src/unit_tests/client_tests.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
mod test_helpers;
#[path = "./wasm_client_tests.rs"]
mod wasm;
use std::collections::{BTreeMap, BTreeSet};
use assert_matches::assert_matches;
use futures::StreamExt;
use linera_base::{
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/unit_tests/wasm_client_tests.rs | linera-core/src/unit_tests/wasm_client_tests.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Wasm specific client tests.
//!
//! These tests only run if a Wasm runtime has been configured by enabling either the `wasmer` or
//! the `wasmtime` feature flags.
// Tests for `RocksDb`, `DynamoDb`, `ScyllaDb` and `Service` are currently... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/unit_tests/wasm_worker_tests.rs | linera-core/src/unit_tests/wasm_worker_tests.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Wasm specific worker tests.
//!
//! These tests only run if a Wasm runtime has been configured by enabling either the `wasmer` or
//! the `wasmtime` feature flags.
#![allow(clippy::large... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/unit_tests/value_cache_tests.rs | linera-core/src/unit_tests/value_cache_tests.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{borrow::Cow, collections::BTreeSet};
use linera_base::{
crypto::CryptoHash,
data_types::{BlockHeight, Epoch},
hashed::Hashed,
identifiers::ChainId,
};
use linera_chain::types::Timeout;
use super::ValueCache;
/// Te... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/chain_worker/config.rs | linera-core/src/chain_worker/config.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Configuration parameters for the chain worker.
use std::sync::Arc;
use linera_base::{crypto::ValidatorSecretKey, time::Duration};
use crate::CHAIN_INFO_MAX_RECEIVED_LOG_ENTRIES;
/// Configuration parameters for the [`ChainWorkerState`]... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/chain_worker/delivery_notifier.rs | linera-core/src/chain_worker/delivery_notifier.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module contains a helper type to notify when cross-chain messages have been
//! delivered.
//!
//! Keeping it in a separate module ensures that only the chain worker is able to call its
//! methods.
use std::{
collections::BTreeM... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/chain_worker/actor.rs | linera-core/src/chain_worker/actor.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! An actor that runs a chain worker.
use std::{
collections::{BTreeMap, HashMap, HashSet},
fmt,
sync::{self, Arc, RwLock},
};
use custom_debug_derive::Debug;
use futures::FutureExt;
use linera_base::{
crypto::{CryptoHash, V... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/chain_worker/state.rs | linera-core/src/chain_worker/state.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! The state and functionality of a chain worker.
use std::{
borrow::Cow,
collections::{BTreeMap, BTreeSet, HashMap, HashSet},
sync::{self, Arc},
};
use futures::future::Either;
#[cfg(with_metrics)]
use linera_base::prometheus_u... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/chain_worker/mod.rs | linera-core/src/chain_worker/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! A worker to handle a single chain.
mod actor;
mod config;
mod delivery_notifier;
mod state;
pub(super) use self::delivery_notifier::DeliveryNotifier;
#[cfg(test)]
pub(crate) use self::state::CrossChainUpdateHelper;
pub(crate) use self::{... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/environment/mod.rs | linera-core/src/environment/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
pub mod wallet;
use linera_base::util::traits::AutoTraits;
trait_set::trait_set! {
pub trait Network = crate::node::ValidatorNodeProvider + AutoTraits;
pub trait Signer = linera_base::crypto::Signer + AutoTraits;
// TODO(#5064): ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/environment/wallet/memory.rs | linera-core/src/environment/wallet/memory.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use futures::{Stream, StreamExt as _};
use linera_base::identifiers::ChainId;
use super::{Chain, Wallet};
/// A basic implementation of `Wallet` that doesn't persist anything and merely tracks the
/// chains in memory.
///
/// This can be us... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/environment/wallet/mod.rs | linera-core/src/environment/wallet/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::ops::Deref;
use futures::{Stream, StreamExt as _, TryStreamExt as _};
use linera_base::{
crypto::CryptoHash,
data_types::{BlockHeight, ChainDescription, Epoch, Timestamp},
identifiers::{AccountOwner, ChainId},
};
use cra... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/received_log.rs | linera-core/src/client/received_log.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::{BTreeMap, BTreeSet};
use linera_base::{crypto::ValidatorPublicKey, data_types::BlockHeight, identifiers::ChainId};
use linera_chain::data_types::ChainAndHeight;
/// Struct keeping track of the blocks sending messages t... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/mod.rs | linera-core/src/client/mod.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
cmp::Ordering,
collections::{BTreeMap, BTreeSet, HashSet},
sync::{Arc, RwLock},
};
use custom_debug_derive::Debug;
use futures::{
future::Future,
stream::{self... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/validator_trackers.rs | linera-core/src/client/validator_trackers.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::{BTreeMap, HashMap, VecDeque};
use linera_base::{crypto::ValidatorPublicKey, data_types::BlockHeight, identifiers::ChainId};
use linera_chain::data_types::ChainAndHeight;
use super::received_log::ReceivedLogs;
/// Keep... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/chain_client/state.rs | linera-core/src/client/chain_client/state.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{collections::BTreeSet, sync::Arc};
use linera_base::data_types::Blob;
use linera_chain::data_types::ProposedBlock;
use tokio::sync::Mutex;
use super::super::PendingProposal;
use c... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/chain_client/mod.rs | linera-core/src/client/chain_client/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
mod state;
use std::{
collections::{hash_map, BTreeMap, BTreeSet, HashMap},
convert::Infallible,
iter,
sync::Arc,
};
use custom_debug_derive::Debug;
use futures::{
future::{self, Either, FusedFuture, Future, FutureExt},
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/requests_scheduler/node_info.rs | linera-core/src/client/requests_scheduler/node_info.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use custom_debug_derive::Debug;
use super::scoring::ScoringWeights;
use crate::{environment::Environment, remote_node::RemoteNode};
/// Tracks performance metrics and request capacity for a validator node using
/// Exponential Moving Average... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/requests_scheduler/in_flight_tracker.rs | linera-core/src/client/requests_scheduler/in_flight_tracker.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{collections::HashMap, fmt::Debug, sync::Arc};
use linera_base::time::{Duration, Instant};
use tokio::sync::broadcast;
use super::{
cache::SubsumingKey,
request::{RequestKey, RequestResult},
};
use crate::node::NodeError;
/... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/requests_scheduler/scoring.rs | linera-core/src/client/requests_scheduler/scoring.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
/// Configurable weights for the scoring algorithm.
///
/// These weights determine the relative importance of different metrics
/// when calculating a node's performance score. All weights should sum to 1.0.
///
/// # Examples
///
/// ```igno... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/requests_scheduler/mod.rs | linera-core/src/client/requests_scheduler/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module manages communication with validator nodes, including connection pooling,
//! load balancing, request deduplication, caching, and performance tracking.
mod cache;
mod in_flight_tracker;
mod node_info;
mod request;
mod schedule... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/requests_scheduler/request.rs | linera-core/src/client/requests_scheduler/request.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
data_types::{Blob, BlobContent, BlockHeight},
identifiers::{BlobId, ChainId},
};
use linera_chain::types::ConfirmedBlockCertificate;
use crate::client::requests_scheduler::cache::SubsumingKey;
/// Unique identifier... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/requests_scheduler/cache.rs | linera-core/src/client/requests_scheduler/cache.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{collections::HashMap, sync::Arc};
use linera_base::time::{Duration, Instant};
#[cfg(with_metrics)]
use super::scheduler::metrics;
/// Cached result entry with timestamp for TTL expiration
#[derive(Debug, Clone)]
pub(super) struct ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/src/client/requests_scheduler/scheduler.rs | linera-core/src/client/requests_scheduler/scheduler.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
collections::BTreeMap,
future::Future,
sync::{
atomic::{AtomicU32, Ordering},
Arc,
},
};
use custom_debug_derive::Debug;
use futures::stream::{FuturesUnordered, StreamExt};
use linera_base::{
cry... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/benches/recorder.rs | linera-core/benches/recorder.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashSet;
use criterion::measurement::{Measurement, ValueFormatter};
use prometheus::proto::MetricType;
/// A `BenchRecorder` together with a set of counter names. This can be used in benchmarks that
/// measure the sum ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/benches/client_benchmarks.rs | linera-core/benches/client_benchmarks.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use criterion::{criterion_group, criterion_main, measurement::Measurement, BatchSize, Criterion};
use linera_base::{
crypto::InMemorySigner,
data_types::Amount,
identifiers::{Account, AccountOwner},
time::Duration,
};
use liner... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-core/benches/hashing_benchmarks.rs | linera-core/benches/hashing_benchmarks.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use alloy_primitives::Keccak256;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use sha3::{Digest, Sha3_256};
fn keccak(i: u8) {
let mut hasher = Keccak256::new();
hasher.update([i; 32]);
hasher.finalize()... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/plugins/src/lib.rs | linera-indexer/plugins/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Plugins for Linera indexer.
pub mod operations;
| rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/plugins/src/template.rs | linera-indexer/plugins/src/template.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_indexer::{plugin, common::IndexerError};
use linera_views::{
map_view::MapView,
register_view::RegisterView,
views::{RootView, View},
};
// A plugin is centered around a RootView
#[derive(RootView)]
pub struct Template<... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/plugins/src/operations.rs | linera-indexer/plugins/src/operations.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
cmp::{Ordering, PartialOrd},
sync::Arc,
};
use async_graphql::{OneofObject, SimpleObject};
use axum::Router;
use linera_base::{crypto::CryptoHash, data_types::BlockHeight, doc_scalar, identifiers::ChainId};
use linera_chain... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/graphql-client/src/lib.rs | linera-indexer/graphql-client/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! A GraphQL client for the indexer.
pub mod indexer;
pub mod operations;
| rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/graphql-client/src/operations.rs | linera-indexer/graphql-client/src/operations.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use graphql_client::GraphQLQuery;
use linera_base::{crypto::CryptoHash, data_types::BlockHeight, identifiers::ChainId};
use serde::{Deserialize, Serialize};
#[cfg(target_arch = "wasm32")]
pub type Operation = serde_json::Value;
#[cfg(not(tar... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/graphql-client/src/indexer.rs | linera-indexer/graphql-client/src/indexer.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use graphql_client::GraphQLQuery;
use linera_base::{crypto::CryptoHash, data_types::BlockHeight, identifiers::ChainId};
#[derive(GraphQLQuery)]
#[graphql(
schema_path = "gql/indexer_schema.graphql",
query_path = "gql/indexer_requests.... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/graphql-client/tests/test.rs | linera-indexer/graphql-client/tests/test.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::io::Read;
use linera_base::command::resolve_binary;
use tempfile::tempdir;
use tokio::process::Command;
#[test_log::test(tokio::test)]
async fn test_check_indexer_schema() {
let tmp_dir = tempdir().unwrap();
let path = resol... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/example/src/main.rs | linera-indexer/example/src/main.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! An example of an indexer with the operations plugin.
use linera_indexer::{common::IndexerError, plugin::Plugin, rocks_db::RocksDbRunner};
use linera_indexer_plugins::operations::OperationsPlugin;
#[tokio::main]
async fn main() -> Result<... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/example/src/grpc_main.rs | linera-indexer/example/src/grpc_main.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! An example of a gRPC indexer server with multiple database backend support.
use clap::Parser;
use linera_indexer::{
common::IndexerError,
db::{postgres::PostgresDatabase, sqlite::SqliteDatabase},
grpc::IndexerGrpcServer,
};
#... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/example/tests/test.rs | linera-indexer/example/tests/test.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![cfg(any(
feature = "storage-service",
feature = "dynamodb",
feature = "scylladb"
))]
use std::{str::FromStr, sync::LazyLock, time::Duration};
use linera_base::{
command::resolve_binary,
data_types::Amount,
identifi... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/build.rs | linera-indexer/lib/build.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_prost_build::compile_protos("proto/indexer.proto")?;
Ok(())
}
| rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/scylla_db.rs | linera-indexer/lib/src/scylla_db.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_views::{
lru_prefix_cache::StorageCacheConfig,
scylla_db::{ScyllaDbDatabase, ScyllaDbStoreConfig, ScyllaDbStoreInternalConfig},
store::KeyValueDatabase,
};
use crate::{
common::IndexerError,
runner::{IndexerConf... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/rocks_db.rs | linera-indexer/lib/src/rocks_db.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::path::PathBuf;
use clap::Parser as _;
use linera_views::{
lru_prefix_cache::StorageCacheConfig,
rocks_db::{
PathWithGuard, RocksDbDatabase, RocksDbSpawnMode, RocksDbStoreConfig,
RocksDbStoreInternalConfig,
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/lib.rs | linera-indexer/lib/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module defines the linera-indexer library including:
//! - the indexer connection to the node service (service.rs)
//! - the block processing (indexer.rs)
//! - the generic plugin trait (plugin.rs)
//! - the runner struct (runner.rs)
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/runner.rs | linera-indexer/lib/src/runner.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module defines the trait for indexer runners.
use linera_base::identifiers::ChainId;
use linera_views::store::{KeyValueDatabase, KeyValueStore};
use tokio::select;
use tracing::{info, warn};
use crate::{common::IndexerError, indexer... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/service.rs | linera-indexer/lib/src/service.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module defines the service client for the indexer.
use async_tungstenite::{
tokio::connect_async,
tungstenite::{client::IntoClientRequest, http::HeaderValue},
};
use futures::{
task::{FutureObj, Spawn, SpawnError},
St... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/common.rs | linera-indexer/lib/src/common.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::net::AddrParseError;
use async_graphql::http::GraphiQLSource;
use axum::{
http::Uri,
response::{self, IntoResponse},
};
use linera_base::crypto::CryptoHash;
use reqwest::header::InvalidHeaderValue;
use thiserror::Error;
use ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/mock_database.rs | linera-indexer/lib/src/mock_database.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Mock database implementations for testing.
use std::{collections::HashMap, sync::RwLock};
use async_trait::async_trait;
use linera_base::{
crypto::CryptoHash,
data_types::BlockHeight,
identifiers::{BlobId, ChainId},
};
use li... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/indexer.rs | linera-indexer/lib/src/indexer.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module defines the base component of linera-indexer.
use std::{collections::BTreeMap, sync::Arc};
use allocative::Allocative;
use async_graphql::{EmptyMutation, EmptySubscription, Schema, SimpleObject};
use async_graphql_axum::{Grap... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/plugin.rs | linera-indexer/lib/src/plugin.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module defines the trait for indexer plugins.
use std::sync::Arc;
use async_graphql::{EmptyMutation, EmptySubscription, ObjectType, Schema};
use axum::Router;
use linera_chain::types::ConfirmedBlock;
use linera_views::{
context:... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/db/tests.rs | linera-indexer/lib/src/db/tests.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Mock database implementations for testing.
use std::{collections::HashMap, sync::RwLock};
use async_trait::async_trait;
use linera_base::{
crypto::CryptoHash,
data_types::{BlockHeight, Timestamp},
identifiers::{BlobId, ChainI... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/db/mod.rs | linera-indexer/lib/src/db/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Database trait for the indexer.
#[cfg(test)]
pub(crate) mod tests;
pub mod common;
pub mod postgres;
pub mod sqlite;
use async_trait::async_trait;
use linera_base::{
crypto::CryptoHash,
data_types::{BlockHeight, Timestamp},
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/db/common.rs | linera-indexer/lib/src/db/common.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Common utilities for database implementations.
use linera_base::data_types::Amount;
use linera_execution::{Message, MessageKind, SystemMessage};
/// Classification result for a Message with denormalized SystemMessage fields
#[derive(Debu... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/db/postgres/consts.rs | linera-indexer/lib/src/db/postgres/consts.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! PostgreSQL schema definitions and constants.
/// SQL schema for creating the blocks table with denormalized fields
pub const CREATE_BLOCKS_TABLE: &str = r#"
CREATE TABLE IF NOT EXISTS blocks (
hash TEXT PRIMARY KEY NOT NULL,
chain... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/db/postgres/tests.rs | linera-indexer/lib/src/db/postgres/tests.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use dockertest::{waitfor, DockerTest, Image, Source, TestBodySpecification};
use linera_base::{
crypto::{CryptoHash, TestString},
data_types::{Amount, Blob, BlockHeight, Epoch, Timestamp},
hashed::Hashed,
identifiers::{Applicat... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/db/postgres/mod.rs | linera-indexer/lib/src/db/postgres/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! PostgreSQL database module for storing blocks and blobs.
mod consts;
#[cfg(test)]
mod tests;
use std::str::FromStr;
use async_trait::async_trait;
use consts::{
CREATE_BLOBS_TABLE, CREATE_BLOCKS_TABLE, CREATE_EVENTS_TABLE, CREATE_INC... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/db/sqlite/consts.rs | linera-indexer/lib/src/db/sqlite/consts.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! SQLite schema definitions and constants.
/// SQL schema for creating the blocks table with denormalized fields
pub const CREATE_BLOCKS_TABLE: &str = r#"
CREATE TABLE IF NOT EXISTS blocks (
hash TEXT PRIMARY KEY NOT NULL,
chain_id ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/db/sqlite/tests.rs | linera-indexer/lib/src/db/sqlite/tests.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
crypto::{CryptoHash, TestString},
data_types::{Amount, Blob, BlockHeight, Epoch, Timestamp},
hashed::Hashed,
identifiers::{ApplicationId, ChainId},
};
use linera_chain::{
block::{Block, BlockBody, BlockHe... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/db/sqlite/mod.rs | linera-indexer/lib/src/db/sqlite/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! SQLite database module for storing blocks and blobs.
mod consts;
#[cfg(test)]
mod tests;
use std::str::FromStr;
use async_trait::async_trait;
use consts::{
CREATE_BLOBS_TABLE, CREATE_BLOCKS_TABLE, CREATE_EVENTS_TABLE, CREATE_INCOMIN... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/grpc/tests.rs | linera-indexer/lib/src/grpc/tests.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashMap;
use super::*;
use crate::{
db::tests::{MockFailingDatabase, MockSuccessDatabase},
indexer_api::{element::Payload, Element},
};
fn test_blob_element() -> Element {
let test_blob = Blob::new_data(b"te... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-indexer/lib/src/grpc/mod.rs | linera-indexer/lib/src/grpc/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! gRPC server implementation for the indexer.
#[cfg(test)]
mod tests;
use std::{collections::HashMap, pin::Pin, sync::Arc};
use async_trait::async_trait;
use futures::{stream::BoxStream, Stream, StreamExt};
use linera_base::{data_types::Bl... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/examples/crowd-funding/src/contract.rs | examples/crowd-funding/src/contract.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(target_arch = "wasm32", no_main)]
mod state;
use crowd_funding::{CrowdFundingAbi, InstantiationArgument, Message, Operation};
use fungible::FungibleTokenAbi;
use linera_sdk::{
abis::fungible::FungibleOperation,
linera_bas... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/examples/crowd-funding/src/lib.rs | examples/crowd-funding/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
/*! ABI of the Crowd-funding Example Application */
use async_graphql::{Request, Response, SimpleObject};
use linera_sdk::{
graphql::GraphQLMutationRoot,
linera_base_types::{AccountOwner, Amount, ContractAbi, ServiceAbi, Timestamp},
}... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/examples/crowd-funding/src/state.rs | examples/crowd-funding/src/state.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use async_graphql::scalar;
use crowd_funding::InstantiationArgument;
use linera_sdk::{
linera_base_types::{AccountOwner, Amount},
views::{linera_views, MapView, RegisterView, RootView, ViewStorageContext},
};
use serde::{Deserialize, S... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/examples/crowd-funding/src/service.rs | examples/crowd-funding/src/service.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(target_arch = "wasm32", no_main)]
mod state;
use std::sync::Arc;
use async_graphql::{EmptySubscription, Request, Response, Schema};
use crowd_funding::Operation;
use linera_sdk::{
graphql::GraphQLMutationRoot as _,
liner... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/examples/crowd-funding/tests/campaign_lifecycle.rs | examples/crowd-funding/tests/campaign_lifecycle.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Integration tests for the Fungible Token application.
#![cfg(not(target_arch = "wasm32"))]
use std::iter;
use crowd_funding::{CrowdFundingAbi, InstantiationArgument, Operation};
use fungible::FungibleTokenAbi;
use linera_sdk::{
line... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/examples/controller/src/contract.rs | examples/controller/src/contract.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(target_arch = "wasm32", no_main)]
mod state;
use std::collections::HashSet;
use async_graphql::ComplexObject;
use linera_sdk::{
abis::controller::{
ControllerAbi, ControllerCommand, ManagedServiceId, Operation, Worke... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/examples/controller/src/state.rs | examples/controller/src/state.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashSet;
use linera_sdk::{
abis::controller::{ManagedServiceId, Worker},
linera_base_types::{AccountOwner, ChainId},
views::{linera_views, MapView, RegisterView, RootView, SetView, ViewStorageContext},
};
//... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/examples/controller/src/service.rs | examples/controller/src/service.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![cfg_attr(target_arch = "wasm32", no_main)]
mod state;
use std::sync::Arc;
use async_graphql::{ComplexObject, Context, EmptySubscription, Schema};
use linera_sdk::{
abis::controller::{ControllerAbi, LocalWorkerState, ManagedService, O... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/examples/controller/tests/single_chain.rs | examples/controller/tests/single_chain.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Integration testing for the controller application.
#![cfg(not(target_arch = "wasm32"))]
use linera_sdk::{
abis::controller::ControllerAbi,
test::{QueryOutcome, TestValidator},
};
/// Tests basic application instantiation and que... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.