Commit Graph

237 Commits

Author SHA1 Message Date
paritytech-subxt-pr-maker[bot] 93cf4b4da8 Update Artifacts (auto-generated) (#1950)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-03-10 09:44:41 +00:00
James Wilson c29edf6fef Bump frame-metadata to 20.0.0 (#1944) 2025-03-06 07:38:31 +01:00
James Wilson 23c0651c57 Add archive RPCs to subxt-rpcs (#1940)
* Add archive RPCs to subxt-rpcs

* Add tests for archive RPCs

* ".unwrap_*" to ".as_*"

* clippy

* Add proper unsub method for archive_unstable_storage
2025-03-05 15:23:50 +00:00
paritytech-subxt-pr-maker[bot] 2d5a70862a Update Artifacts (auto-generated) (#1938)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-03-03 12:08:57 +00:00
James Wilson 037d5178b8 Document generating interface from Runtime WASM and change feature to runtime-wasm-path (#1936)
* runtime_metadata_path => runtime_wasm_path and document this feature

* fix doc
2025-03-03 12:07:48 +00:00
wgyt 396762510a update copyright year (#1924)
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2025-02-24 16:07:29 +00:00
Niklas Adolfsson 69ce6d726f deps: remove polkadot-sdk umbrella crate (#1926)
* deps: get rid of polkadot-sdk umbrella crate

* fix nits

* Update subxt/src/backend/mod.rs

* Update subxt/src/events/events_client.rs

* Update metadata/src/utils/validation.rs

* cargo clippy fix

* fix ui tests
2025-02-24 12:38:21 +01:00
James Wilson 816a86423b Split RPCs into a separate crate (#1910)
* WIP extract RPCs into separate crate

* fmt

* Fix test

* Remove unused deps

* fix import

* WIP: Fix up errors and most tests. Start extracintg some tests/code to rpc crate

* MockRpcClient sync or async

* MockRpcClient only async but better type inference

* WIP MockRpcClient FnMuts and some test updates to use it

* Get all but one test working with new MockRpcClient

* WIP trying to debug failure

* WIP, Tests mostly fixed, need to add back oen more

* Get mock RPC tests working

* fmt

* fmt

* Clippy and comment tweak

* update CI to explicitly check subxt-rpc features

* clippy

* small tweaks after pass over

* feature flag rename

* update some docs

* Fix some examples

* fmt

* Fix features flags to work with web/wasm32

* Fix unused dep warning

* explicit targets in wasm CI

* Add better crate level docs

* fmt

* Address review comments

* Comment out flaky test for now and make more obvious how similar POlkadot and Substrate configs are

* Not a doc comment

* Remove unused imports
2025-02-18 12:07:00 +00:00
paritytech-subxt-pr-maker[bot] 333de953ec Update Artifacts (auto-generated) (#1922)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-02-17 11:44:47 +01:00
paritytech-subxt-pr-maker[bot] 28ffc3ebff Update Artifacts (auto-generated) (#1920)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-02-10 12:00:58 +00:00
James Wilson c96387c47d Prep to release 0.39.0 (#1918)
* Pre pto release 0.39.0

* Actually save updates in Cargo.toml

* Tweak changelog text
2025-02-05 11:00:09 +00:00
James Wilson 29bf00e209 Fix and test sr25519 signing in nostd (#1872)
* Fix and test sr25519 signing in nostd

* Remove sr25519 signing test on nostd for thumbabi target

* Don't use sr25519 feature in nostd tests

* Fix nits, remove WASM deps from nostd test, improve comments

* Change copypasted comment

* fmt

* Update CI to account for signer tests
2025-01-30 17:13:58 +00:00
James Wilson 94f4e7f39b preserve custom metadata when converting between Subxt metadata and frame_metadata (#1914) 2025-01-30 16:14:11 +00:00
paritytech-subxt-pr-maker[bot] 56c410cbe1 Update Artifacts (auto-generated) (#1908)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-01-27 11:10:55 +02:00
Niklas Adolfsson 39507c7eb4 fix: don't wrap rpc error in DisconnectedWillReconnect in reconnecting rpc client (#1904)
* fix: don't wrap rpc err in DisconnectedWillRecon

* add clarifying comment

* fix no-std-test build

* fix no-std-test build v2
2025-01-24 14:18:12 +01:00
James Wilson dff4dab65e Tweak test to look at holds, not locks after polkadot-sdk@f5673cf (#1896) 2025-01-20 15:38:13 +01:00
paritytech-subxt-pr-maker[bot] 2d9de19040 Update Artifacts (auto-generated) (#1894)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-01-15 17:43:06 +00:00
Niklas Adolfsson 2e3e9591c1 tests: add WeightReclaim signed ext (#1893) 2025-01-07 11:07:56 +01:00
Niklas Adolfsson 27e275fc42 fix: substrate runner, support new libp2p addr log (#1892) 2025-01-06 12:52:27 +01:00
paritytech-subxt-pr-maker[bot] 62752844fe Update Artifacts (auto-generated) (#1885)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-01-02 08:41:44 +01:00
Niklas Adolfsson f363f77a60 chore: fix clippy lints (#1882) 2024-12-10 13:08:40 +01:00
Niklas Adolfsson f5e9ce0d2c remove substrate compat (#1850)
* remove substrate compat

* add hacky example

* simplify substrate-compat example

* simplify substrate-compat example

* cargo fmt

* fix build

* add more examples

* fix nit

* fix test build

* Update subxt/examples/substrate_compat_signer.rs

Co-authored-by: James Wilson <james@jsdw.me>

* keep only polkadot signer example

* remove more substrate compat related stuff

* fix example

* link to substrate signer example in book

* Update subxt/src/book/usage/transactions.rs

* Update subxt/src/book/usage/transactions.rs

* address grumbles

* fix nits

---------

Co-authored-by: James Wilson <james@jsdw.me>
2024-11-27 16:46:38 +01:00
paritytech-subxt-pr-maker[bot] 09ab839ff2 Update Artifacts (auto-generated) (#1874)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2024-11-25 10:24:47 +02:00
James Wilson 0dbcdbdd9c Attempt to quickfix flaky legacy_and_unstable_block_subscription_reconnect (#1868)
* Attempt to quickfix flaky legacy_and_unstable_block_subscription_reconnect test

* Make test name match behaviour

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Timeout to 300s

---------

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-11-18 12:49:12 +00:00
paritytech-subxt-pr-maker[bot] cb9571d7a6 Update Artifacts (auto-generated) (#1860)
* Update Artifacts (auto-generated)

* fix assethub example

* update Cargo.lock for wasm tests

* cargo fmt

* fix subxt cli tests

* disable failing wasm tests

* add issue link for disabled test

---------

Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-11-11 18:34:02 +01:00
James Wilson 3219659f12 Fix substrate nightly (#1848) 2024-10-30 10:40:02 +01:00
paritytech-subxt-pr-maker[bot] b963b8fcae Update Artifacts (auto-generated) (#1844)
* Update Artifacts (auto-generated)

* fix ui tests

---------

Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-10-28 15:37:49 +01:00
James Wilson 9640ecc751 Prep to release v0.38.0 (#1841)
* Prep to release v0.38.0

* Remove entry from changelog
2024-10-24 15:45:02 +01:00
Niklas Adolfsson dc0795b3b9 move fetch metadata to a separate crate subxt_utils_fetchmetadata (#1829)
* macros: feature-gate jsonrpsee/fetch metadata url

* make CI happy

* Update codegen/src/error.rs

* extract `fetch-metdata` to separate crate

* add missing license headers

* introduce subxt-utils crate

* add missing files

* codegen: remove unused hex crate

* fix test build

* move subxt_utils -> subxt_utils_fetchmetadata

* cargo fmt

* runtime-path -> runtime-metadata-path

* Update utils/fetch-metadata/src/lib.rs
2024-10-24 14:45:39 +01:00
Niklas Adolfsson bcdf0bb054 light client tests: use ChainheadBackendBuilder::build_with_background_driver (#1823)
* backend rpc tests: use background task

* fix build
2024-10-14 12:02:12 +02:00
paritytech-subxt-pr-maker[bot] 77a36773ae Update Artifacts (auto-generated) (#1826)
Co-authored-by: tadeohepperle <62739623+tadeohepperle@users.noreply.github.com>
2024-10-14 09:15:18 +02:00
Niklas Adolfsson 0e86993cd7 deps: use polkadot-sdk umbrella crate (#1786)
* deps: unify usage of polkadot-sdk crates

* cargo fmt

* fix macro crate

* make tests compile

* fix more nits

* fix doc tests

* fix more nits

* more nits

* core: remove polkadot-sdk/std

* cargo fmt

* remove polkadot-sdk/std by default

* Update metadata/Cargo.toml

* remove more std

* Update Cargo.toml
2024-10-11 14:19:11 +02:00
paritytech-subxt-pr-maker[bot] fefb324b24 Update Artifacts (auto-generated) (#1815)
Co-authored-by: tadeohepperle <62739623+tadeohepperle@users.noreply.github.com>
2024-10-07 11:40:08 +03:00
Niklas Adolfsson 8f3c0b44fb stabilize reconnecting-rpc-client (#1803)
* stabilize reconnecting-rpc-client

* fix build

* remove missed unstable stuff
2024-10-03 20:03:16 +02: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
James Wilson b5209a162e Use frame-decode for core extrinsic decode logic (#1785)
* WIP using frame-decode for core extrinsic decode logic

* fmt

* Fix dependabot config

* clippy

* tidy some imports

* Fix a couple of tests

* Update to frame-decode 0.0.7

* fix docs

* Decode exts earlier to avoid doing it every iter/find step

* frame-decode to 0.1.0

* fmt

* clippy

* fix wasm example

* doc test fixes

* Fix test

* Fix a couple of subxt_core tests
2024-10-01 11:21:51 +01:00
Niklas Adolfsson 72db833def reconn-rpc-client: parse URL before connecting (#1789)
* reconn-rpc-client: parse URL before connecting

It was hard to figure whether one simply entered a faulty URL
and it tried to reconnect according to the retry policy.

With this change we first parse url and then try to reconnect.
This will detect invalid directly instead of waiting for the retry
to complete.

* clippy fix

* wasm: &str -> Url
2024-09-30 16:40:20 +02:00
paritytech-subxt-pr-maker[bot] 7dff932382 Update Artifacts (auto-generated) (#1790)
Co-authored-by: tadeohepperle <62739623+tadeohepperle@users.noreply.github.com>
2024-09-30 12:47:57 +03:00
Niklas Adolfsson 9db5a39013 substrate runner: increase line read + dump CLI output if parsing fails (#1781)
* substrate runner: dump CLI output parsing fails

* cargo fmt

* Update testing/substrate-runner/src/lib.rs

* fix grumbles

* disable flaky test

* ignore reconn test too

* ignore more tests

* fix tests

* improve log parsing

* Update testing/integration-tests/src/full_client/client/unstable_rpcs.rs

* Update testing/integration-tests/src/full_client/client/unstable_rpcs.rs

* fix nits

* fix reconn test
2024-09-24 15:33:08 +02:00
Pavlo Khrystenko 52252242b0 fix flaky test with temporary solution (#1768)
* fix flaky test with temporary solution

* clippy
2024-09-11 17:34:11 +02:00
Alexandru Vasile 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 74dd9d7cff.

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* tests: Comment chainspec

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* lightclient/wasm: Import IpAddr from core::net

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* tests: Enable all tests again

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* tests/wasm: Update cargo lock

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* tests: Add trace logs to easily reproduce problems

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cargo: Use released smoldot version

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* lightclient: Use chainspec and optionally make use of unstable backend

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* lightclient: Fix clippy

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* lightclient: Better trimming for log messages

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* lightclient: Remove max log size

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* lightclient: Use both backends for testing

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update Cargo.toml

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Update Cargo.toml

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Update testing/integration-tests/src/light_client/mod.rs

* Update testing/integration-tests/src/light_client/mod.rs

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-09-09 10:30:51 +03:00
paritytech-subxt-pr-maker[bot] 398d2a8605 Update Artifacts (auto-generated) (#1744)
Co-authored-by: tadeohepperle <62739623+tadeohepperle@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-09-03 10:26:34 +01:00
Niklas Adolfsson e4f6f08eb7 fix: nits in tests (#1750)
* fix: nits in tests

* fix filter nit
2024-09-02 14:13:27 +02:00
Pavlo Khrystenko 3866737b29 Add support for generating metadata from runtime wasm files (#1720)
closes #1660
2024-09-02 11:07:50 +02:00
Pavlo Khrystenko 9ea7b14fec Integration tests for unstable-reconnecting-rpc-client (#1711)
---------

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-08-30 10:16:39 +02:00
Niklas Adolfsson 6e01451684 fix: substrate-runner support several rpc endpoints (#1736)
* fix: support several rpc endpoints in substrate

Close #1735

* Update testing/substrate-runner/src/lib.rs

* Update testing/substrate-runner/src/lib.rs

* fix grumbles

* Update testing/substrate-runner/src/lib.rs
2024-08-29 17:39:32 +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
paritytech-subxt-pr-maker[bot] 270f74a0b3 Update Artifacts (auto-generated) (#1712)
Co-authored-by: tadeohepperle <62739623+tadeohepperle@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-08-21 17:07:29 +01:00
dependabot[bot] dbd05b4fd9 build(deps): bump js-sys from 0.3.69 to 0.3.70 (#1716)
* build(deps): bump js-sys from 0.3.69 to 0.3.70

Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.69 to 0.3.70.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: js-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* update Cargo.lock

* update Cargo.lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: Pavlo Khrystenko <45178695+pkhry@users.noreply.github.com>
2024-08-20 12:21:03 +02:00
dependabot[bot] 02ab50eee8 build(deps): bump wasm-bindgen from 0.2.92 to 0.2.93 (#1713)
* build(deps): bump wasm-bindgen from 0.2.92 to 0.2.93

Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.92 to 0.2.93.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/compare/0.2.92...0.2.93)

---
updated-dependencies:
- dependency-name: wasm-bindgen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* cargo update -p wasm-bindgen

* update Cargo.lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-08-20 11:23:54 +02:00