-
Notifications
You must be signed in to change notification settings - Fork 563
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
Miguel/ava 405 rpc not working with scripts #102
Miguel/ava 405 rpc not working with scripts #102
Conversation
…thub.com-miguelDD1:maticnetwork/avail into miguel/ava-397-compatibility-issue-between-10-11
AVA-405 RPC not working with scripts
We have custom kate RPCs enabled from the substrate node. Its now working with the changes done in the explorer where we have added rpc field to the definitions(Overridebundledefinitions). But there are still concern regarding the message passing parameter needs to be initialised which is a bit complex case( ex: NumberOrHex). But can be solved with proper definitions for those fields. The main problem that is happening is that the custom RPC should be working the with js/ts scripts if initialised as the same way we declare the custom header in the CreateApi() function. So as per the polkadot's documentation we should be able to call
But its actually failing with the following error
This is not a new case for the api and the closest regarding this is mentioned in this issue. The solution mentioned in the issue is not really a solution for our script it seems. |
Codecov ReportBase: 50.77% // Head: 50.56% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #102 +/- ##
===========================================
- Coverage 50.77% 50.56% -0.22%
===========================================
Files 52 52
Lines 8930 8906 -24
===========================================
- Hits 4534 4503 -31
- Misses 4396 4403 +7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…com-miguelDD1:maticnetwork/avail into miguel/ava-405-rpc-not-working-with-scripts
|
||
#[rpc(name = "kate_queryDataProof")] | ||
fn query_data_proof(&self, block_number: NumberOrHex, index: u32) -> Result<Vec<H256>>; | ||
fn query_data_proof(&self, data_index: u32, at: Option<HashOf<Block>>) -> Result<DataProof>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this mean the API now accepts both block number or hash instead of block number earlier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it only accepts the hash
. It is a kind of de-facto standard in RPC calls on substrate.
* Use custom branch * Use header extensions * Fix fmt * Data Root without hardcode decoding * Use `avail-core` tag * Bump `avail-core` dep * Comment from codereview * RPC minor fixes * Use temporay branch for `avail-core` * RPC `query_data_proof` uses runtime extractor * Rollback to tagged `avail-core` & disable VTest * Update `avail-core` deps * Fix `BlockLength` decodification bug * Data Proof RPC uses block instead runtime
* Use substrate v0.9.29 - Partial * Revert "Bump Runtime and Node versions (#88)" This reverts commit 86af7d1. * Revert "Use substrate v0.9.29 - Partial" This reverts commit 58d4a96. * Add nomad v1 pallets (#84) * add nomad primitives * patch dependencies to fix build issues * remove tiny keccak from merkle * add tiny keccak back to merkle and use to avoid extra allocation in left/right hash * port nomad pallets, build failing * add node and runtime changes * add subxt changes * fix compact block header and add specs to node for genesis info * add new script for submitting data and header * rename enqueue_data_root to dispatch_data_root * rebase on primitive changes and change da-bridge message and TypedMessage to use BoundedVec * fix failing home test after max message len change * rebase on merged primitives * remove unnecessary methods and add da-bridge docs * update metadata and have home tree put default * make da-bridge message type struct-based not vector-based * remove panic in da bridge message * remove finalized block hash mapping * fix vec dependency after rebase on post-primitives PR * make non body length public for tests * Safety review * Add benchmarks to `Nomad-home` * Code review changes - New Benchmarks for `nomad/da-bridge` - Add header hash to `try_dispatch_data_root`. - Add assertions to `verify` section in benchmarks. * Update `avail-subxt` examples * Full header is needed * Fmt fix * fix double import and missing let after rebase * fix subxt scripts with new da-bridge header metadata * fix home update pallet weight Co-authored-by: Miguel <[email protected]> Co-authored-by: miguelDD1 <[email protected]> * release change * Miguel/ava 141 hard fork on plonk update 3 (#96) * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Add 1.64 toolchain to git workflow * Coverage support on stable compiler * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Add 1.64 toolchain to git workflow * Coverage support on stable compiler * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Coverage support on stable compiler * Update `Kate/v0.2.1` * Header Forward Compatibility (#99) * Use new versioned header extensions * Data Root without hardcode decoding * Fix header format for avail-subxt. * Miguel/ava 405 rpc not working with scripts (#102) * Use custom branch * Use header extensions * Fix fmt * Data Root without hardcode decoding * Use `avail-core` tag * Bump `avail-core` dep * Comment from codereview * RPC minor fixes * Use temporay branch for `avail-core` * RPC `query_data_proof` uses runtime extractor * Rollback to tagged `avail-core` & disable VTest * Update `avail-core` deps * Fix `BlockLength` decodification bug * Data Proof RPC uses block instead runtime * Fix header format for avail-subxt. (#103) * Use `subxt-cli` to generate `api_dev.rs` * New E2E tool: Run examples using an avail-node * Add `README.md` * Fix some merge issues * Update `avail-subxt` doc * Add decoding support to Extrinsics * Bump some version * Increase Epoch to 1h (#108) * Uses the right version of `subxt` (#109) * Empty-Commit * Use substrate v0.9.29 - Partial * Revert "Bump Runtime and Node versions (#88)" This reverts commit 86af7d1. * Revert "Use substrate v0.9.29 - Partial" This reverts commit 58d4a96. * Add nomad v1 pallets (#84) * add nomad primitives * patch dependencies to fix build issues * remove tiny keccak from merkle * add tiny keccak back to merkle and use to avoid extra allocation in left/right hash * port nomad pallets, build failing * add node and runtime changes * add subxt changes * fix compact block header and add specs to node for genesis info * add new script for submitting data and header * rename enqueue_data_root to dispatch_data_root * rebase on primitive changes and change da-bridge message and TypedMessage to use BoundedVec * fix failing home test after max message len change * rebase on merged primitives * remove unnecessary methods and add da-bridge docs * update metadata and have home tree put default * make da-bridge message type struct-based not vector-based * remove panic in da bridge message * remove finalized block hash mapping * fix vec dependency after rebase on post-primitives PR * make non body length public for tests * Safety review * Add benchmarks to `Nomad-home` * Code review changes - New Benchmarks for `nomad/da-bridge` - Add header hash to `try_dispatch_data_root`. - Add assertions to `verify` section in benchmarks. * Update `avail-subxt` examples * Full header is needed * Fmt fix * fix double import and missing let after rebase * fix subxt scripts with new da-bridge header metadata * fix home update pallet weight Co-authored-by: Miguel <[email protected]> Co-authored-by: miguelDD1 <[email protected]> * release change * Miguel/ava 141 hard fork on plonk update 3 (#96) * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Add 1.64 toolchain to git workflow * Coverage support on stable compiler * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Add 1.64 toolchain to git workflow * Coverage support on stable compiler * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Coverage support on stable compiler * Update `Kate/v0.2.1` * Header Forward Compatibility (#99) * Use new versioned header extensions * Data Root without hardcode decoding * Fix header format for avail-subxt. * Use `subxt-cli` to generate `api_dev.rs` * New E2E tool: Run examples using an avail-node * Add `README.md` * Miguel/ava 405 rpc not working with scripts (#102) * Use custom branch * Use header extensions * Fix fmt * Data Root without hardcode decoding * Use `avail-core` tag * Bump `avail-core` dep * Comment from codereview * RPC minor fixes * Use temporay branch for `avail-core` * RPC `query_data_proof` uses runtime extractor * Rollback to tagged `avail-core` & disable VTest * Update `avail-core` deps * Fix `BlockLength` decodification bug * Data Proof RPC uses block instead runtime * Fix header format for avail-subxt. (#103) * Fix some merge issues * Update `avail-subxt` doc * Add decoding support to Extrinsics * Bump some version * Increase Epoch to 1h (#108) * Uses the right version of `subxt` (#109) * Empty-Commit * Js script header changes (#112) * api file addition (cherry picked from commit 921616f) * empty comit * Minor fixes for non-JS users Co-authored-by: miguelDD1 <[email protected]> Co-authored-by: Luke Tchang <[email protected]> Co-authored-by: Miguel <[email protected]> Co-authored-by: Kailas <[email protected]> Co-authored-by: Luka Borkovic <[email protected]> Co-authored-by: luka-ethernal <[email protected]>
* Release 1.3.0 (#111) * Use substrate v0.9.29 - Partial * Revert "Bump Runtime and Node versions (#88)" This reverts commit 86af7d1. * Revert "Use substrate v0.9.29 - Partial" This reverts commit 58d4a96. * Add nomad v1 pallets (#84) * add nomad primitives * patch dependencies to fix build issues * remove tiny keccak from merkle * add tiny keccak back to merkle and use to avoid extra allocation in left/right hash * port nomad pallets, build failing * add node and runtime changes * add subxt changes * fix compact block header and add specs to node for genesis info * add new script for submitting data and header * rename enqueue_data_root to dispatch_data_root * rebase on primitive changes and change da-bridge message and TypedMessage to use BoundedVec * fix failing home test after max message len change * rebase on merged primitives * remove unnecessary methods and add da-bridge docs * update metadata and have home tree put default * make da-bridge message type struct-based not vector-based * remove panic in da bridge message * remove finalized block hash mapping * fix vec dependency after rebase on post-primitives PR * make non body length public for tests * Safety review * Add benchmarks to `Nomad-home` * Code review changes - New Benchmarks for `nomad/da-bridge` - Add header hash to `try_dispatch_data_root`. - Add assertions to `verify` section in benchmarks. * Update `avail-subxt` examples * Full header is needed * Fmt fix * fix double import and missing let after rebase * fix subxt scripts with new da-bridge header metadata * fix home update pallet weight Co-authored-by: Miguel <[email protected]> Co-authored-by: miguelDD1 <[email protected]> * release change * Miguel/ava 141 hard fork on plonk update 3 (#96) * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Add 1.64 toolchain to git workflow * Coverage support on stable compiler * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Add 1.64 toolchain to git workflow * Coverage support on stable compiler * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Coverage support on stable compiler * Update `Kate/v0.2.1` * Header Forward Compatibility (#99) * Use new versioned header extensions * Data Root without hardcode decoding * Fix header format for avail-subxt. * Miguel/ava 405 rpc not working with scripts (#102) * Use custom branch * Use header extensions * Fix fmt * Data Root without hardcode decoding * Use `avail-core` tag * Bump `avail-core` dep * Comment from codereview * RPC minor fixes * Use temporay branch for `avail-core` * RPC `query_data_proof` uses runtime extractor * Rollback to tagged `avail-core` & disable VTest * Update `avail-core` deps * Fix `BlockLength` decodification bug * Data Proof RPC uses block instead runtime * Fix header format for avail-subxt. (#103) * Use `subxt-cli` to generate `api_dev.rs` * New E2E tool: Run examples using an avail-node * Add `README.md` * Fix some merge issues * Update `avail-subxt` doc * Add decoding support to Extrinsics * Bump some version * Increase Epoch to 1h (#108) * Uses the right version of `subxt` (#109) * Empty-Commit * Use substrate v0.9.29 - Partial * Revert "Bump Runtime and Node versions (#88)" This reverts commit 86af7d1. * Revert "Use substrate v0.9.29 - Partial" This reverts commit 58d4a96. * Add nomad v1 pallets (#84) * add nomad primitives * patch dependencies to fix build issues * remove tiny keccak from merkle * add tiny keccak back to merkle and use to avoid extra allocation in left/right hash * port nomad pallets, build failing * add node and runtime changes * add subxt changes * fix compact block header and add specs to node for genesis info * add new script for submitting data and header * rename enqueue_data_root to dispatch_data_root * rebase on primitive changes and change da-bridge message and TypedMessage to use BoundedVec * fix failing home test after max message len change * rebase on merged primitives * remove unnecessary methods and add da-bridge docs * update metadata and have home tree put default * make da-bridge message type struct-based not vector-based * remove panic in da bridge message * remove finalized block hash mapping * fix vec dependency after rebase on post-primitives PR * make non body length public for tests * Safety review * Add benchmarks to `Nomad-home` * Code review changes - New Benchmarks for `nomad/da-bridge` - Add header hash to `try_dispatch_data_root`. - Add assertions to `verify` section in benchmarks. * Update `avail-subxt` examples * Full header is needed * Fmt fix * fix double import and missing let after rebase * fix subxt scripts with new da-bridge header metadata * fix home update pallet weight Co-authored-by: Miguel <[email protected]> Co-authored-by: miguelDD1 <[email protected]> * release change * Miguel/ava 141 hard fork on plonk update 3 (#96) * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Add 1.64 toolchain to git workflow * Coverage support on stable compiler * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Add 1.64 toolchain to git workflow * Coverage support on stable compiler * Header builder can use `Kate 0.1.0` and `0.2.0` - `Kate` & `da-primitives` have been moved out to another repo. - New version of `header_builder::build` which uses `Kate 0.2.0`. Version 1 is still available. * `Kate` deps to tags and bump RT version * Keep unstable fmt * Coverage support on stable compiler * Update `Kate/v0.2.1` * Header Forward Compatibility (#99) * Use new versioned header extensions * Data Root without hardcode decoding * Fix header format for avail-subxt. * Use `subxt-cli` to generate `api_dev.rs` * New E2E tool: Run examples using an avail-node * Add `README.md` * Miguel/ava 405 rpc not working with scripts (#102) * Use custom branch * Use header extensions * Fix fmt * Data Root without hardcode decoding * Use `avail-core` tag * Bump `avail-core` dep * Comment from codereview * RPC minor fixes * Use temporay branch for `avail-core` * RPC `query_data_proof` uses runtime extractor * Rollback to tagged `avail-core` & disable VTest * Update `avail-core` deps * Fix `BlockLength` decodification bug * Data Proof RPC uses block instead runtime * Fix header format for avail-subxt. (#103) * Fix some merge issues * Update `avail-subxt` doc * Add decoding support to Extrinsics * Bump some version * Increase Epoch to 1h (#108) * Uses the right version of `subxt` (#109) * Empty-Commit * Js script header changes (#112) * api file addition (cherry picked from commit 921616f) * empty comit * Minor fixes for non-JS users Co-authored-by: miguelDD1 <[email protected]> Co-authored-by: Luke Tchang <[email protected]> Co-authored-by: Miguel <[email protected]> Co-authored-by: Kailas <[email protected]> Co-authored-by: Luka Borkovic <[email protected]> Co-authored-by: luka-ethernal <[email protected]> * ops(ci): Switching to nightly rust for build * ops(security): Adding Security CI Files * fix: adding wasm32 * fix: switching wasm32 to nightly as well * Add RPC for app data rows fetching. * Disable security workflow. * Update versions. Co-authored-by: Luke Tchang <[email protected]> Co-authored-by: Miguel <[email protected]> Co-authored-by: Kailas <[email protected]> Co-authored-by: Luka Borkovic <[email protected]> Co-authored-by: luka-ethernal <[email protected]> Co-authored-by: John Hilliard <[email protected]> Co-authored-by: Aleksandar Terentić <[email protected]> Co-authored-by: aterentic-ethernal <[email protected]>
…bstrate-sdk Bump polkadot sdk version
Description
The
query_data_proof
RPC now uses the new way to filter, extract, and decode thedata
field fromDataAvailability::submit_data
calls (submitted_call::call_proof
), and it is aligned with the code used inside the runtime, removing duplications.