-
Notifications
You must be signed in to change notification settings - Fork 248
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
failed call mmr_generateProof
on rococo testnet
#829
Comments
Hey, Can you run the example with let params = rpc_params![block_numner]; but yeah not sure what's happening here |
have been try, also have problem. 2023-02-18T15:45:37.246320Z TRACE method_call{method="mmr_generateProof"}: jsonrpsee_core::tracing: send="{\"jsonrpc\":\"2.0\",\"id\":10,\"method\":\"mmr_generateProof\",\"params\":[[0,1,2]]}"
2023-02-18T15:45:37.246363Z TRACE jsonrpsee_client_transport::ws: send: {"jsonrpc":"2.0","id":10,"method":"mmr_generateProof","params":[[0,1,2]]}
2023-02-18T15:45:37.248076Z DEBUG jsonrpsee_core::client::async_client: [backend]: Client dropped
Error: Rpc(ClientError(Call(Custom(ErrorObject { code: ServerError(8000), message: "Runtime trapped", data: Some(RawValue("Application(Execution(AbortedDueToTrap(MessageWithBacktrace { message: \"wasm trap: wasm `unreachable` instruction executed\", backtrace: Some(Backtrace { backtrace_string: \"\\n 0: 0x3297a0 - <unknown>!rust_begin_unwind\\n 1: 0x5659 - <unknown>!core::panicking::panic_fmt::hd6942e22a1490f82\\n 2: 0x1f3c08 - <unknown>!MmrApi_generate_proof\\n\" }) })))")) }))))
on rococo test occur this 2023-02-18 23:45:37 Accepting new connection 1/100
2023-02-18 23:45:37 panicked at 'Bad input data provided to generate_proof: Codec error', /Users/lisagunn/polkadot/runtime/rococo/src/lib.rs:963:1
2023-02-18 23:45:37 💤 Idle (1 peers), best: #15 (0xe748…9584), finalized #12 (0xb835…68c5), ⬇ 0.6kiB/s ⬆ 0.3kiB/s |
This is really just an incorrect use of the runtime API/MMR RPC in substrate and not a subxt issue. Sorry if I lead down a incorrect path. It looks like you are using it wrong, for historical state you have to provide a best block according to https://github.com/paritytech/substrate/blob/master/primitives/merkle-mountain-range/src/lib.rs#L432-#L438. Try this instead: let block_nums: Vec<BlockNumber> = vec![0u32.into(),1u32.into(), 2u32.into()];
let best_block = Some(3);
let params = rpc_params![block_nums, best_block]; If ☝️ doesn't work then I would regard it as substrate/rococo issue and please move/open a new issue in substrate. |
Yet, It also don't work. |
Offhand this sounds like a Substrate issue/thing then and not a Subxt one, so any objections if I close this? |
Let's close this, apparently it has been around for a while paritytech/substrate#12864 |
I use this command can get data.
but I used subxt, I cannot get successful response. here, is example call code.
and example git repo: https://github.com/DaviRain-Su/example-subxt
rococo should report this error:
The text was updated successfully, but these errors were encountered: