mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 15:37:56 +00:00
09ab839ff266e2abd6cf766d677e175ecb54fa43
7 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cbf05d1999 | fix: error message on rpc errors (#1804) | ||
|
|
1cf206f671 |
chore(deps): Update smoldot to the latest version (#1400)
* Update smoldot to 0.17 and smoldot-light to 0.15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update cargo lock
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Add generic platform for AddedChain
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* debug: Finalized heads
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Use generic TPlat for chainSuccess
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Trim response for logs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Backup
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests/lightclient: Switch to localnode for testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Point smoldot to crates.io
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Solve merge conflicts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Add subxt macro for tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient/wasm: Impl log of the PlatformRef
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Use git dep
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "tests/lightclient: Switch to localnode for testing" + max log
size
This reverts commit
|
||
|
|
b069c4425a |
Rework light client (#1475)
* WIP second pass over light client code for simpler API * First pass new light client * pub(crate) LightClientRpc::new_raw(), and fmt * Update examples and add back a way to configure boot nodes and fetch chainspec from a URL * Fix light client examples * remove unused deps and tidy lightclient feature flags * fix wasm error * LightClientRpc can be cloned * update light client tests * Other small fixes * exclude mod unless jsonrpsee * Fix wasm-lightclient-tests * add back docsrs bit and web+native feature flag compile error * update book and light client example names * fix docs |
||
|
|
437ff7ee41 |
generate docs for feature gated items (#1332)
* generate docs for feature-gated items on crates.io * add newline in Cargo.toml * unify newlines * fix clippy * introduce macros for features * commit missing file * Update subxt/src/lib.rs * make it compile |
||
|
|
14b71279ba |
cargo: Switch to workspace lints (#1299)
* subxt: Remove unstable lints that cause compile warnings Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cargo: Switch to workspace lints Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cargo: Fix codec package at root level Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cargo: Move profiles to the root level Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Fix lightclient and metadata crates Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Revert "cargo: Fix codec package at root level" This reverts commit cdf9e1628d708a972673eb3a9e967b6896edbd73. * Fix complexity clippy Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cargo: Remove lints to be replaced by `cargo machete` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cargo: Remove unused dependencies (detected by machete) Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Add machete step Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cargo: Bump rust version Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Rename machete step Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Rename cargo machete step Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> |
||
|
|
34ff3da37d |
lightclient: Add support for multi-chain usecase (#1238)
* lightclient: Make `smoldot::chainID` part of the RPC requests Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Make `BackgroundTask` generic over `PlatformRef` and chain Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Construct from raw smoldot and target different chains Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * testing: Update cargo lock for wasm tests Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Reuse `new_from_client` method and removed unused imports Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Reexport smoldot client and RPC objects used in pub interface Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Adjust `new_from_client` interface Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Extend background to poll over multiple RPC objects Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Build light client from raw and target different chains Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * artifacts: Add demo chain specs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * artifacts: Move artifacts to dedicated folder Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Use SelectAll to drive all streams Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Fetch initial data from the target chain Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Reexport other smoldot objects Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Target chain with potentially different config Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt/rpc: Log chainID for debugging Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt/examples: Add smoldot client with parachain example Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Propagate chain ID together with rpc responses object Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Multiplex responses by request ID and chain ID Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Add raw light client builder Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Add cargo feature flag for parachains example Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Derive default for internal structure Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Guard reexports by std feature flag Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update subxt/src/client/light_client/mod.rs Co-authored-by: James Wilson <james@jsdw.me> * lightclient: Update the builder pattern and chain targetting Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Fix documentation Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Provide more insightful docs wrt native/wasm panics Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * examples: Adjust comment location Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Refactor UniqueChainId into the background task Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update lightclient/src/background.rs Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> * Update subxt/src/client/light_client/builder.rs Co-authored-by: James Wilson <james@jsdw.me> * lightclient: Update docs wrt panics Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Update docs wrt to smoldot instance -> client Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Use IntoIter instead of Iterator Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Adjsut docs wrt [`Self::new_from_client`] Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Remove RawRpc from LightClient in favor of chainID Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Reexport everything under smoldot module Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * artifacts: Use stateRootHash instead of genesis.raw Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: James Wilson <james@jsdw.me> Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com> |
||
|
|
4bda673847 |
Add light client platform WASM compatible (#1026)
* Cargo update in prep for wasm build Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Add light client test Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Implement low level socket Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Add native platform primitives Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Add wasm platform primitives Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Implement smoldot platform Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Adjust code to use custom platform Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Adjust feature flags Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * tests: Adjust wasm endpoint to accept ws for p2p Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Adjust wasm socket Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Book mention of wasm Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Propagate env variable properly Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Revert to native feature flags Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * cli: Use tokio rt-multi-thread feature Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Add tokio feature flags for native platform Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * wasm: Use polkadot live for wasm testing Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * wasm: Add support for DNS p2p addresses Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * wasm: Disable logs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * wasm: Run wasm test for firefox driver Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * wasm: Reenable chrome driver Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Move lightclient RPC to dedicated crate for better feature flags and modularity Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Use subxt-lightclient low level RPC crate Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Apply cargo fmt Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Enable default:native feature for cargo check Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Extra step for subxt-lightclient similar to signer crate Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Remove native platform code and use smoldot instead Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Enable tokio/multi-threads Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * lightclient: Refactor modules Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Adjust testing crates Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Run light-client WASM tests Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * wasm-rpc: Remove light-client imports Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * testing: Update wasm cargo.lock files Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * ci: Spawn substrate node with deterministic p2p address for WASM tests Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * wasm_socket: Use rc and refcell Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * wasm_socket: Switch back to Arc<Mutex<>> Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Add comments Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> |