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
1,520 changes: 1,221 additions & 299 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name = "chainql"
chainql-core = { path = "./crates/chainql-core", version = "0.4.10" }
frame-metadata = { package = "chainql-frame-metadata", path = "./frame-metadata/frame-metadata", version = "0.4.10" }

tokio = { version = "1.38.0", features = ["rt-multi-thread"] }
tokio = { version = "1.47.1", features = ["rt-multi-thread", "macros"] }
jrsonnet-evaluator = { version = "0.5.0-pre97", features = ["exp-destruct", "exp-bigint", "exp-object-iteration", "exp-preserve-order"] }
jrsonnet-stdlib = { version = "0.5.0-pre97", features = ["exp-bigint", "exp-preserve-order"] }
jrsonnet-cli = { version = "0.5.0-pre97", features = ["exp-bigint", "exp-preserve-order"] }
Expand Down
3 changes: 3 additions & 0 deletions cmds/chainql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ tokio.workspace = true
jrsonnet-evaluator.workspace = true
jrsonnet-stdlib.workspace = true
jrsonnet-cli.workspace = true
tracing = "0.1.41"
tracing-subscriber = "0.3.20"
tracing-indicatif = "0.3.13"
18 changes: 18 additions & 0 deletions cmds/chainql/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ use clap::Parser;
use jrsonnet_cli::{InputOpts, MiscOpts, StdOpts, TlaOpts, TraceOpts};
use jrsonnet_evaluator::{apply_tla, bail, error::Result, manifest::JsonFormat, State};
use tokio::runtime::Handle;
use tracing_indicatif::{filter::{hide_indicatif_span_fields, IndicatifFilter}, IndicatifLayer};
use tracing_subscriber::{
fmt::{format::DefaultFields, writer::MakeWriterExt}, layer::SubscriberExt, util::SubscriberInitExt, Layer,
};

/// chainql
#[derive(Parser)]
Expand All @@ -23,6 +27,20 @@ struct Opts {
}
/// Set up Jrsonnet.
fn main_jrsonnet(opts: Opts) -> Result<String> {
let indicatif_layer = IndicatifLayer::new()
.with_span_field_formatter(hide_indicatif_span_fields(DefaultFields::new()));

tracing_subscriber::registry()
.with(
tracing_subscriber::fmt::layer().without_time().with_writer(
indicatif_layer
.get_stderr_writer()
.with_max_level(tracing::Level::INFO),
),
)
.with(indicatif_layer.with_filter(IndicatifFilter::new(false)))
.init();

let import_resolver = opts.misc.import_resolver();

let mut sb = State::builder();
Expand Down
33 changes: 18 additions & 15 deletions crates/chainql-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,26 @@ tokio.workspace = true
jrsonnet-evaluator.workspace = true
jrsonnet-gcmodule.workspace = true
hex = "0.4.3"
jsonrpsee = { version = "0.24.7", features = ["macros", "ws-client"] }
parity-scale-codec = { version = "3.6.12", features = ["derive"] }
scale-info = "2.11.3"
serde = "1.0.203"
serde_json = "1.0.117"
thiserror = "1.0.61"
parity-scale-codec = { version = "3.7.5", features = ["derive"] }
scale-info = "2.11.6"
serde = "1.0.219"
serde_json = "1.0.143"
thiserror = "2.0.16"
peg = "0.8.3"
num-traits = "0.2.19"
num-bigint = "0.4.5"
cumulus-primitives-proof-size-hostfunction = "0.11.0"
sp-io = "39.0.0"
sp-core = { version = "35.0.0", default-features = false, features = ["std"] }
sc-executor = "0.41.0"
sp-state-machine = "0.44.0"
hyper = "1.3.1"
http = "1.1.0"
num-bigint = "0.4.6"
cumulus-primitives-proof-size-hostfunction = "0.14.0"
sp-io = "42.0.0"
sp-core = { version = "38.0.0", default-features = false, features = ["std"] }
sc-executor = "0.44.0"
sp-state-machine = "0.47.0"
libsecp256k1 = "0.7.1"
sp-runtime = "40.0.0"
sp-runtime = "43.0.0"
directories = "6.0.0"
futures = "0.3.31"
reqwest = { version = "0.12.23", features = ["json"] }
url = "2.5.7"
tracing = "0.1.41"
tracing-indicatif = "0.3.13"
jsonrpsee = { version = "0.26.0", features = ["macros", "ws-client"] }
async-trait = "0.1.89"
9 changes: 4 additions & 5 deletions crates/chainql-core/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ use frame_metadata::RuntimeMetadataV14;
use jrsonnet_evaluator::runtime_error;
use jrsonnet_gcmodule::Trace;

mod rpc;
mod rpc_http;
mod rpc_ws;

pub mod dump;
pub mod live;

Expand Down Expand Up @@ -42,7 +46,6 @@ pub trait ClientT {
fn contains_key(&self, key: &[u8]) -> Result<bool> {
Ok(self.get_storage(key)?.is_some())
}
fn next(&self) -> Result<Client>;
}

#[derive(Clone, Trace)]
Expand Down Expand Up @@ -72,8 +75,4 @@ impl ClientT for Client {
fn contains_data_for(&self, prefix: &[u8]) -> Result<bool> {
self.0.contains_data_for(prefix)
}

fn next(&self) -> Result<Client> {
self.0.next()
}
}
4 changes: 0 additions & 4 deletions crates/chainql-core/src/client/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,4 @@ impl ClientT for ClientDump {
fn get_metadata(&self) -> super::Result<RuntimeMetadataV14> {
Ok(self.meta.clone())
}

fn next(&self) -> super::Result<super::Client> {
Err(Error::NoNextBlock.into())
}
}
Loading