Skip to content
Draft
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,739 changes: 1,547 additions & 1,192 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async-graphql-derive = "=7.0.17"
async-graphql-value = { version = "=7.0.17", features = ["raw_value"] }
async-lock = "3.3.0"
async-trait = "0.1.77"
async-tungstenite = { version = "0.22", features = ["tokio-runtime"] }
async-tungstenite = { version = "0.28", features = ["tokio-runtime"] }
axum = "0.8.4"
base64 = "0.22.0"
bcs = "0.1.6"
Expand Down Expand Up @@ -178,7 +178,7 @@ num-format = "0.4.4"
num-traits = "0.2.18"
octocrab = "0.42.1"
oneshot = "0.1.6"
op-alloy-network = { version = "0.22.0", default-features = false }
op-alloy-network = { version = "=0.22.0", default-features = false }
opentelemetry = { version = "0.30.0", features = ["trace"] }
opentelemetry-http = "0.30.0"
opentelemetry-otlp = { version = "0.30.0", features = [
Expand All @@ -193,7 +193,7 @@ pprof_util = { version = "0.8.0", features = ["flamegraph", "symbolize"] }
prettyplease = "0.2.16"
proc-macro-error = "1.0.4"
proc-macro2 = "1.0"
prometheus = "0.13.3"
prometheus = { version = "0.13.3", default-features = false }
prometheus-parse = "0.2.5"
proptest = { version = "1.6.0", default-features = false, features = ["alloc"] }
prost = "0.14"
Expand Down
7 changes: 0 additions & 7 deletions examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/llm/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl Service for LlmService {
));
let raw_weights = response.body;
assert_eq!(
Sha3_256::digest(&raw_weights).as_slice(),
&*Sha3_256::digest(&raw_weights),
WEIGHTS_HASH,
"Incorrect model was fetched"
);
Expand All @@ -106,7 +106,7 @@ impl Service for LlmService {
));
let tokenizer_bytes = response.body;
assert_eq!(
Sha3_256::digest(&tokenizer_bytes).as_slice(),
&*Sha3_256::digest(&tokenizer_bytes),
TOKENIZER_HASH,
"Incorrect tokenizer was fetched"
);
Expand Down
2 changes: 1 addition & 1 deletion linera-explorer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ crate-type = ["cdylib"]
anyhow.workspace = true
console_error_panic_hook = "0.1"
futures.workspace = true
graphql_client = { version = "0.13", features = ["reqwest-rustls"] }
graphql_client = { version = "0.16", features = ["reqwest-rustls"] }
hex.workspace = true
js-sys = "0.3"
linera-base.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion linera-indexer/graphql-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ version.workspace = true
workspace = true

[dependencies]
graphql_client = { version = "0.13", features = ["reqwest-rustls"] }
graphql_client = { version = "0.16", features = ["reqwest-rustls"] }
linera-base.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
Expand Down
7 changes: 5 additions & 2 deletions linera-indexer/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ bcs.workspace = true
bincode.workspace = true
clap.workspace = true
futures.workspace = true
graphql-ws-client = { version = "0.5", features = ["client-graphql-client"] }
graphql_client = { version = "0.13", features = ["reqwest-rustls"] }
graphql-ws-client = { version = "0.13", features = [
"client-graphql-client",
"tungstenite-0.24",
] }
graphql_client = { version = "0.16", features = ["reqwest-rustls"] }
linera-base = { workspace = true, features = ["test"] }
linera-chain.workspace = true
linera-core.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion linera-indexer/lib/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
use std::net::AddrParseError;

use async_graphql::http::GraphiQLSource;
use async_tungstenite::tungstenite::http::header::InvalidHeaderValue;
use axum::{
http::Uri,
response::{self, IntoResponse},
};
use linera_base::crypto::CryptoHash;
use reqwest::header::InvalidHeaderValue;
use thiserror::Error;

use crate::db::sqlite::SqliteError;
Expand Down
23 changes: 3 additions & 20 deletions linera-indexer/lib/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,20 @@ use async_tungstenite::{
tokio::connect_async,
tungstenite::{client::IntoClientRequest, http::HeaderValue},
};
use futures::{
task::{FutureObj, Spawn, SpawnError},
StreamExt,
};
use futures::StreamExt;
use graphql_client::reqwest::post_graphql;
use graphql_ws_client::{graphql::StreamingOperation, GraphQLClientClientBuilder};
use graphql_ws_client::{graphql::StreamingOperation, Client};
use linera_base::{
crypto::CryptoHash, data_types::BlockHeight, identifiers::ChainId, time::Duration,
};
use linera_chain::types::ConfirmedBlock;
use linera_core::worker::Reason;
use linera_service_graphql_client::{block, chains, notifications, Block, Chains, Notifications};
use linera_views::store::{KeyValueDatabase, KeyValueStore};
use tokio::runtime::Handle;
use tracing::error;

use crate::{common::IndexerError, indexer::Indexer};

struct TokioSpawner(Handle);

impl Spawn for TokioSpawner {
fn spawn_obj(&self, obj: FutureObj<'static, ()>) -> Result<(), SpawnError> {
self.0.spawn(obj);
Ok(())
}
}

pub enum Protocol {
Http,
WebSocket,
Expand Down Expand Up @@ -139,13 +126,9 @@ impl Listener {
HeaderValue::from_str("graphql-transport-ws")?,
);
let (connection, _) = connect_async(request).await?;
let (sink, stream) = connection.split();
let mut client = GraphQLClientClientBuilder::new()
.build(stream, sink, TokioSpawner(Handle::current()))
.await?;
let operation: StreamingOperation<Notifications> =
StreamingOperation::new(notifications::Variables { chain_id });
let mut stream = client.streaming_operation(operation).await?;
let mut stream = Client::build(connection).subscribe(operation).await?;
while let Some(item) = stream.next().await {
match item {
Ok(response) => {
Expand Down
16 changes: 8 additions & 8 deletions linera-metrics/src/runtime_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ impl Collector for TokioRuntimeCollector {
}

fn gauge_family(desc: &Desc, value: f64) -> MetricFamily {
let mut gauge = Gauge::new();
let mut gauge = Gauge::default();
gauge.set_value(value);
let mut metric = Metric::new();
let mut metric = Metric::default();
metric.set_gauge(gauge);
let mut family = MetricFamily::new();
let mut family = MetricFamily::default();
family.set_name(desc.fq_name.clone());
family.set_help(desc.help.clone());
family.set_field_type(MetricType::GAUGE);
Expand All @@ -134,24 +134,24 @@ fn gauge_family(desc: &Desc, value: f64) -> MetricFamily {
}

fn counter_family(desc: &Desc) -> MetricFamily {
let mut family = MetricFamily::new();
let mut family = MetricFamily::default();
family.set_name(desc.fq_name.clone());
family.set_help(desc.help.clone());
family.set_field_type(MetricType::COUNTER);
family
}

fn counter_metric(value: f64, labels: &[LabelPair]) -> Metric {
let mut counter = Counter::new();
let mut counter = Counter::default();
counter.set_value(value);
let mut metric = Metric::new();
let mut metric = Metric::default();
metric.set_counter(counter);
metric.set_label(labels.to_vec().into());
metric.set_label(labels.to_vec());
metric
}

fn worker_label(i: usize) -> [LabelPair; 1] {
let mut lp = LabelPair::new();
let mut lp = LabelPair::default();
lp.set_name("worker".into());
lp.set_value(i.to_string());
[lp]
Expand Down
7 changes: 0 additions & 7 deletions linera-sdk/tests/fixtures/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion linera-service-graphql-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ scylladb = ["linera-service/scylladb"]
storage-service = ["linera-service/storage-service"]

[dependencies]
graphql_client = { version = "0.13", features = ["reqwest-rustls"] }
graphql_client = { version = "0.16", features = ["reqwest-rustls"] }
hex.workspace = true
linera-base.workspace = true
reqwest.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion linera-service/src/cli_wrappers/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::{
use anyhow::{bail, ensure, Context, Result};
use async_graphql::InputType;
use async_tungstenite::tungstenite::{client::IntoClientRequest as _, http::HeaderValue};
use futures::{SinkExt as _, Stream, StreamExt as _, TryStreamExt as _};
use futures::{Stream, StreamExt as _, TryStreamExt as _};
use heck::ToKebabCase;
use linera_base::{
abi::ContractAbi,
Expand Down
Loading