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
153 changes: 153 additions & 0 deletions Cargo.lock

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

10 changes: 9 additions & 1 deletion node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ pub struct Cli {
#[arg(long, default_value_t = 64, value_parser=kate_max_cells_size_upper_bound)]
pub kate_max_cells_size: usize,

/// The maximum size of the evaluation grid cache in MiB.
#[arg(long, default_value_t = 64)]
pub kate_eval_grid_size: u64,

/// The maximum size of the polynomial grid cache in MiB.
#[arg(long, default_value_t = 64)]
pub kate_poly_grid_size: u64,

/// The name of the network.
///
/// This parameter can be used to update the network name and id of the `dev` and `dev_tri` chains.
Expand All @@ -71,7 +79,7 @@ pub struct Cli {
pub tx_state_rpc_enabled: bool,

/// The maximum number of results the transaction state RPC will return for a transaction hash.
/// If a transaction hash appears in multiple blocks, the RPC will return only the top `X` transaction states.
/// If a transaction hash appears in multiple blocks, the RPC will return only the top `X` transaction states.
/// In most cases, the transaction hash is unique, so this parameter is usually irrelevant.
#[clap(long, default_value_t = 10)]
pub tx_state_rpc_max_search_results: usize,
Expand Down
4 changes: 4 additions & 0 deletions node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,17 @@ where
io.merge(KateApiMetricsServer::into_rpc(Kate::<C, Block>::new(
client.clone(),
kate_rpc_deps.max_cells_size,
kate_rpc_deps.eval_grid_size,
kate_rpc_deps.poly_grid_size,
)))?;
}

if is_dev_chain || kate_rpc_deps.rpc_enabled || kate_rpc_deps.rpc_metrics_enabled {
io.merge(KateApiServer::into_rpc(Kate::<C, Block>::new(
client,
kate_rpc_deps.max_cells_size,
kate_rpc_deps.eval_grid_size,
kate_rpc_deps.poly_grid_size,
)))?;
}

Expand Down
2 changes: 2 additions & 0 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ pub fn new_full(config: Configuration, cli: Cli) -> Result<TaskManager, ServiceE
max_cells_size: cli.kate_max_cells_size,
rpc_enabled: cli.kate_rpc_enabled,
rpc_metrics_enabled: cli.kate_rpc_metrics_enabled,
eval_grid_size: cli.kate_eval_grid_size,
poly_grid_size: cli.kate_poly_grid_size,
};
let tx_state_cli_deps = transaction_state::CliDeps {
max_search_results: cli.tx_state_rpc_max_search_results,
Expand Down
3 changes: 3 additions & 0 deletions rpc/kate-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ da-runtime.workspace = true
frame-system = { workspace = true, default-features = false }
avail-core = { workspace = true, default-features = false }
kate = { workspace = true, default-features = false }
kate-recovery = { workspace = true, default-features = false }

# 3rd party
jsonrpsee.workspace = true
log.workspace = true
rayon.workspace = true
moka = { workspace = true, features = ["future"] }

# Substrate
sp-api = { workspace = true, default-features = false }
Expand Down
Loading
Loading