Skip to content

Strange parsing error when storing code #31

@0xForerunner

Description

@0xForerunner
    let client = TendermintRPC::new(&chain_info.rpc_endpoint.clone().unwrap()).unwrap();
    let cosm_tome = CosmTome::new(chain_info, client);
    let wasm_data = std::fs::read(path)?;
    let tx_options = TxOptions { timeout_height: None, fee: None, memo: "wasm_deploy".into() };
    let req = StoreCodeRequest { wasm_data, instantiate_perms: None };
    let response = cosm_tome.wasm_store(req, &key, &tx_options).await?; // <== error occurs in this line

full error message

serde parse error

Caused by:
    missing field `id` at line 8 column 1

Location:
    /Users/ewoolsey/.cargo/registry/src/github.com-1ecc6299db9ec823/flex-error-0.4.4/src/tracer_impl/eyre.rs:10:9

and the trace logs

[2022-12-23T22:30:49Z TRACE hyper::proto::h1::conn] maybe_notify; read_from_io blocked
[2022-12-23T22:30:49Z TRACE want] signal: Want
[2022-12-23T22:30:49Z TRACE hyper::proto::h1::conn] flushed({role=client}): State { reading: Init, writing: Init, keep_alive: Idle }
[2022-12-23T22:30:49Z TRACE want] signal: Want
[2022-12-23T22:30:49Z TRACE hyper::proto::h1::conn] flushed({role=client}): State { reading: Init, writing: Init, keep_alive: Idle }
[2022-12-23T22:30:49Z TRACE hyper::client::pool] put; add idle connection for ("http", 167.99.177.244:26657)
[2022-12-23T22:30:49Z DEBUG hyper::client::pool] pooling idle connection for ("http", 167.99.177.244:26657)
[2022-12-23T22:30:49Z DEBUG tendermint_rpc::client::transport::http::sealed] Incoming response: {
      "jsonrpc": "2.0",
      "error": {
        "code": -32600,
        "message": "Invalid Request",
        "data": "error reading request body: http: request body too large"
      }
    }
serde parse error

Caused by:
    missing field `id` at line 8 column 1

Location:
    /Users/ewoolsey/.cargo/registry/src/github.com-1ecc6299db9ec823/flex-error-0.4.4/src/tracer_impl/eyre.rs:10:9

Everything works fine with small .wasm files < 300kB

Large ones > 530kB cause this error. The exact same message is working on a different build using tendermint_rpc 0.27

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions