Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(node-loader): Fix anoying error with too large RPC data #3162

Merged
merged 3 commits into from
Aug 24, 2023
Merged
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
6 changes: 6 additions & 0 deletions gsdk/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use subxt::{

const DEFAULT_GEAR_ENDPOINT: &str = "wss://rpc-node.gear-tech.io:443";
const DEFAULT_TIMEOUT: u64 = 60_000;
const ONE_HUNDRED_MEGA_BYTES: u32 = 100 * 1024 * 1024;
techraed marked this conversation as resolved.
Show resolved Hide resolved

struct Params(Option<Box<RawValue>>);

Expand All @@ -63,6 +64,11 @@ impl RpcClient {
if url.starts_with("ws") {
Ok(Self::Ws(
WsClientBuilder::default()
// Actually that stand for the response too.
// *WARNING*:
// After updating jsonrpsee to 0.20.0 and higher
// use another method created only for that.
.max_request_body_size(ONE_HUNDRED_MEGA_BYTES)
.connection_timeout(Duration::from_millis(timeout))
.request_timeout(Duration::from_millis(timeout))
.build(url)
Expand Down
Loading