James Wilson
21b3f52191
Metadata V16: Be more dynamic over which hasher is used. ( #1974 )
...
* Use DynamicHasher256 to support Blake2 or Keccack depending on chain
* remove Config::Hash associated type, replace with HashFor<Config> alias
* Fix doc links
* fix wasm tests
* Don't strip system pallet associated types. check System.Hashing, not Hash. Rename BlockHash trait to Hash
* Tweak comment
* fmt
* fix merge
* Fix typo
2025-04-23 10:12:48 +01:00
Niklas Adolfsson
3807b29f36
rpc: stabilize chainhead backend ( #1802 )
...
* rpc: stabilize ChainHeadBackend
* remove noise from example
* add missing features
* make tests compile
* make tests compile v2
* revert stop event
* feature-gate runtime
* Update subxt/Cargo.toml
* add docsrs feature stuff
* Update subxt/src/backend/chain_head/mod.rs
* Update subxt/src/backend/chain_head/mod.rs
* Update subxt/src/backend/chain_head/mod.rs
2024-10-03 18:14:38 +02:00
Niklas Adolfsson
4bc27d4977
refactor: replace reconnecting-jsonrpsee-ws-client with subxt-reconnecting-rpc-client ( #1705 )
...
* feat: add native subxt rpc reconn client
* add jsonrpsee dep to reconnecting-client
* Update subxt/src/backend/rpc/reconnecting_rpc_client/tests.rs
* fix grumbles
* add simple wasm test for reconnecting client
* fix test build
* cargo fmt
* remove reconnect apis
* Update testing/wasm-rpc-tests/tests/wasm.rs
* Update subxt/src/backend/rpc/reconnecting_rpc_client/tests.rs
* Update subxt/src/backend/rpc/reconnecting_rpc_client/tests.rs
2024-08-27 15:18:06 +02:00
James Wilson
fa2a75a3a9
Try a few RPC nodes in case one of them is not working
2024-01-18 12:02:27 +00:00
James Wilson
d7124b56f7
Introduce Backend trait to allow different RPC (or other) backends to be implemented ( #1126 )
...
* WIP backend trait
* WIP converting higher level stuff to using Backend impl
* more implementing new backend trait, mainly storage focused
* Get core code compiling with new backend bits
* subxt crate checks passing
* fix tests
* cargo fmt
* clippy/fixes
* merging and other fixes
* fix test
* fix lightclient code
* Fix some broken doc links
* another book link fix
* fix broken test when moving default_rpc_client
* fix dry_run test
* fix more tests; lightclient and wasm
* fix wasm tests
* fix some doc examples
* use next() instead of next_item()
* missing next_item() -> next()s
* move legacy RPc methods to LegacyRpcMethods type to host generic param instead of RpcClient
* standardise on all RpcClient types prefixed with Rpc, and 'raw' trait types prefixed with RawRpc so it's less ocnfusing which is which
* rename fixes
* doc fixes
* Add back system_dryRun RPC method and rename tx.dry_run() to tx.validate(), to signal that the calls are different
* Add a test that we return the correct extrinsic hash from submit()
* add TransactionValid details back, and protect against out of range bytes
* add test for decoding transaction validation from empty bytes
* fix clippy warning
2023-08-22 12:32:22 +01:00
Alexandru Vasile
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 >
2023-07-18 14:27:16 +03:00