Commit Graph

98 Commits

Author SHA1 Message Date
dependabot[bot] 29bf752b78 build(deps): bump actions/checkout from 5 to 6 (#2128)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 10:15:20 +00:00
James Wilson 8203679cbd Merge v0.50.x to master (#2127)
* v0.50.0: Integrate frame-decode, redo storage APIs and break up Error. (#2100)

* WIP integrating new frame-decode and working out new storage APIS

* WIP: first pass adding new storage things to subxt-core

* Second pass over Address type and start impl in Subxt

* WIP new storage APIs

* WIP New storage APIs roughly completed, lots of errors still

* Remove PlainorMap enum; plain and map values now use same struct to simplify usage

* Begin 'fixing' errors

* WIP splitting errors and tidying payload/address traits

* Get subxt-core compiling

* Small fixes in subxt-core and remove metadata mod

* subxt-core: cargo check --all-targets passes

* Fix test

* WIP starting to update subxt from subxt-core changes

* WIP splitting up subxt errors into smaller variants

* WIP errors: add DispatchError errors

* Port new Storage APIs to subxt-core

* cargo check -p subxt passes

* Quick-fix errors in subxt-cli (explore subcommand)

* fmt

* Finish fixing codegen up and start fixing examples

* get Subxt examples compiling and bytes_at for constants

* Add some arcs to limit lifetimes in subxt/subxt-core storage APIs

* A little Arcing to allow more method chaining in Storage APIs, aligning with Subxt

* Update codegen test

* cargo check --all-targets passing

* cargo check --features 'unstable-light-client' passing

* clippy

* Remove unused dep in subxt

* use published frame-decode

* fix wasm-example

* Add new tx extension to fix daily tests

* Remove unused subxt_core::dynamic::DecodedValue type

* Update book to match changes

* Update docs to fix more broken bits

* Add missing docs

* fmt

* allow larger result errs for now

* Add missing alloc imports in subxt-core

* Fix doc tests and fix bug getting constant info

* Fix V14 -> Metadata transform for storage & constants

* Fix parachain example

* Fix FFI example

* BlockLength decodes t ostruct, not u128

* use fetch/iter shorthands rather than entry in most storage tests

* Fix some integration tests

* Fix Runtime codegen tests

* Expose the dynamic custom_value selecter and use in a UI test

* Update codegen metadata

* Tidy CLI storage query and support (str,str) as a storage address

* Add (str,str) as valid constant address too

* Show string tuple in constants example

* Via the magic of traits, avoid needing any clones of queries/addresses and accept references to them

* clippy

* [v0.50] update scale-info-legacy and frame-decode to latest (#2119)

* bump scale-info-legacy and frame-decode to latest

* Remove something we don't need in this PR

* Fully remove unused for now dep

* [v0.50] Convert historic metadata to subxt::Metadata (#2120)

* First pass converting historic metadatas to our subxt::Metadata type

* use published frame-decode

* fmt and rename legacy metadata macro

* Enable legacy feature where needed in subxt_metadata so it compiles on its own

* Use cargo hack more in CI and fix subxt-metadata features

* Add tests for metadata conversion (need to optimise; some too expensive right now

* Address performance and equality issues in metadata conversion testing

* fmt

* fmt all

* clippy

* Fix a doc link

* Test codegen and fixes to make it work

* Remove local frame-decode patch

* bump frame-decode to latest

* [v0.50.0] Allow visiting extrinsic fields in subxt_historic (#2124)

* Allow visiting extrinsic fields

* fmt

* Don't use local scale-decode dep

* Clippy and tidy

* Extend 'subxt codegen' CLI to work with legacy metadatas

* Simplify historic extrinsics example now that AccountId32s have paths/names

* clippy

* clippy

* clippy..

* Allow visiting storage values, too, and clean up extrinsic visiting a little by narrowing lifetime

* Try to fix flaky test

* Add custom value decode to extrinsics example

* Remove useless else branch ra thought I needed

* Simplify examples

* Prep to release v0.0.5 (#2126)
2025-11-22 10:44:03 +00:00
dependabot[bot] d2099772ca build(deps): bump Swatinem/rust-cache in /.github/workflows (#2093)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.7.8 to 2.8.1.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/9d47c6ad4b02e050fd481d890b2ea34778fd09d6...f13886b937689c021905a6b90929199931d60db1)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-version: 2.8.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 10:17:44 +01:00
James Wilson b13b8ec8d0 [subxt-historic]: extract call and event types from metadata at a block (#2095)
* Inject call and event types from metadata too at some block in subxt-historic

* bump subxt-historic to 0.0.4

* Fix unrelated doc things to try and fix this job

* Other Rust 1.90 fixes

* 'Fix' Test

* Try fixing clippy WASM job

* Try again to get clippy wasm working

* trybuild fix

* trybuild fix take 2
2025-09-25 13:37:09 +01:00
James Wilson 3aabd6dc09 Add subxt-historic crate for accesing historic (non head-of-chain) blocks (#2040)
* WIP subxt-historic

* WIP subxt-historic

* WIP subxt-historic; flesh out basic foundations

* WIP filling in extrinsic decoding functionality

* iter and decode transaction extensions

* Fill in the Online/OfflineClient APIs and move more things to be part of the chain Config

* WIP storage

* clippy, fmt, finish extrinsics example

* prep for 0.0.1 release to claim crate name

* fix README link

* fmt

* WIP thinking about storage APIs

* WIP working out storage APIs

* Storage plain value fetching first pass

* WIP storage: first pass iterating over values done

* First apss finishing storage APIs

* fmt and clippy

* Create a storage example showing fetch and iteration

* Bump to frame-decode 0.9.0

* Bump subxt-historic to 0.0.3 for preview release

* Remove unused deps

* fix import

* clippy

* doc fixes

* tweak CI and fix some cargo hack findings

* Update README: subxt-historic is prerelease
2025-08-26 17:56:21 +01:00
dependabot[bot] 26bf45bb03 build(deps): bump actions/checkout from 4 to 5 (#2059)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-26 17:55:26 +01:00
James Wilson ff6fc1585e Add FFI example (#2037)
* Add FFI example

* Remove unnecessary dependency (libc)

* Tweak python example and add CI
CI Tweak; separate task for ffi-example run

* Remove OnceCell dep; use std

---------

Co-authored-by: wassimans <wassim@wassimans.com>
2025-07-08 12:06:13 +01:00
James Wilson 3643f2c694 Run CI on v0.N.x branches or PRs to them for ease of backporting (#2017) 2025-06-03 13:10:15 +01:00
James Wilson 7de8d36806 Prep to release v0.42.0 (#2003)
* Prep to release v0.42.0

* Remove test_context reference from example

* standalone_crate for doc tests because codegen is expensive

* fmt
2025-05-12 10:32:38 +01:00
James Wilson a0330768ff Update native test timeout to 45 mins (#2002) 2025-05-09 14:39:28 +01:00
dependabot[bot] 8970611c6a build(deps): bump Swatinem/rust-cache in /.github/workflows (#1970)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.7.7 to 2.7.8.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/f0deed1e0edfc6a9be95417288c0e1099b1eeec3...9d47c6ad4b02e050fd481d890b2ea34778fd09d6)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 11:05:36 +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
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
dependabot[bot] c3fb9d1b7e build(deps): bump Swatinem/rust-cache in /.github/workflows (#1890)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.7.5 to 2.7.7.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/82a92a6e8fbeee089604da2575dc567ae9ddeaab...f0deed1e0edfc6a9be95417288c0e1099b1eeec3)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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>
2025-01-15 15:08:02 +00:00
James Wilson 137701757e re-enable Ci (#1867) 2024-11-15 15:14:43 +01: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
dependabot[bot] da2fcd5a40 build(deps): bump Swatinem/rust-cache in /.github/workflows (#1827)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.7.3 to 2.7.5.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/23bce251a8cd2ffc3c1075eaa2367cf899916d84...82a92a6e8fbeee089604da2575dc567ae9ddeaab)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-14 11:54:25 +03:00
Alexander Samusev 00b3149fca [ci] Use parity-large runners instead ubuntu-latest-16-cores (#1821)
* [ci] Use parity-large runners instead ubuntu-latest-16-cores

* isntall curl, move clippy, check, docs to parity-large

* install gcc, make, clang

* isntall cmake

* mv artifacts to /usr/local/bin

* sudo mv

* check build-nodes

* uncomment upload

* temporary run build-nodes on pull request to make CI green

* rm on: pr from build-nodes
2024-10-09 14:41:04 +02: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
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
dependabot[bot] 505591e096 build(deps): bump andymckay/cancel-action from 0.4 to 0.5 (#1646)
Bumps [andymckay/cancel-action](https://github.com/andymckay/cancel-action) from 0.4 to 0.5.
- [Release notes](https://github.com/andymckay/cancel-action/releases)
- [Commits](https://github.com/andymckay/cancel-action/compare/271cfbfa11ca9222f7be99a47e8f929574549e0a...a955d435292c0d409d104b57d8e78435a93a6ef1)

---
updated-dependencies:
- dependency-name: andymckay/cancel-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-06-24 11:17:43 +01:00
Ryan Lee b527c857ea feat(signer): ethereum implementation (#1501)
---------

Co-authored-by: James Wilson <james@jsdw.me>
2024-04-15 08:56:10 -04:00
Tadeo Hepperle a0cb14aa4f subxt-core crate (#1466)
* start migrating, broken

* first iteration of updating

* fmt and clippy

* add Composite<u32> decoding via scale value patch

* bump scale type gen versions

* fix decoding with new scale decode

* compiling with changed deps

* core utils, condig, client, metadata

* core crate compiling

* signer crate no once lock

* add core to no-std-tests, change imports

* broken commit, start pulling everything together in subxt

* port more things to subxt

* events in core crate, extrinsics sadly much more difficult

* almost all examples pass again

* dynamic values fix in examples

* fix no std issue and fmt

* remove unused dependencies

* fix lightclient impl

* runtime version refactor

* formatting and addressing nits

* more comments addressed

* update wasm example and no-std-signer tests

* other nits and error impl on signer errors

* fix feature flag

* fix runtime version refactor

* fix doc links

* fix integration tests

* fix feature flag gated client state

* fix native feature in CI

* fix lightclient utils

* make imports more lean in subxt-core

* integrate changes from subxt-core imports into subxt

* other changes in subxt simplify imports more

* fix  and docs

* doc false for cli

* fix clippy

* remove events block hash in tests

* codegen no-std support in generated code

* export alloc crate for no-std codegen

* fix doc test

* implement James comments

* remove std traits, use core traits instead

* address nits

* remove unusued dep in no-std tests

* fix Box import in no_std

* sp-crypto-hashing instead of sp-core-hashing

* bump scale-typegen, add no std codegen tests

* fix some things

* replace unmaintained derivative with derive_where to remove non-canonical warnings

* fmt

* remove unused dep

* fix deps

* update artifacts to fix type ID mismatches

* bump to latest scale-typegen

---------

Co-authored-by: James Wilson <james@jsdw.me>
2024-03-27 08:55:08 +00:00
Tadeo Hepperle 5447035716 Subxt Metadata: #[no_std] compatibility (#1401)
* no-std tests and porting of subxt-metadata

* update pipeline

* fix generate custom metadata test

* fix cargo run command

* adjust pipeline

* remove prelude from subxt-metadata

* revert autoformatting of Cargo.toml

* remove alloc::format! again, still causes linker errors

* add no-std-build for thumbv7em-none-eabi target

* remove std feature flag

* remove libc and add small readme with test instructions

* change ci for nightly no std
2024-02-15 10:49:15 +01:00
dependabot[bot] fd9d99189d build(deps): bump baptiste0928/cargo-install from 2 to 3 (#1415)
Bumps [baptiste0928/cargo-install](https://github.com/baptiste0928/cargo-install) from 2 to 3.
- [Release notes](https://github.com/baptiste0928/cargo-install/releases)
- [Changelog](https://github.com/baptiste0928/cargo-install/blob/main/CHANGELOG.md)
- [Commits](https://github.com/baptiste0928/cargo-install/compare/v2...v3)

---
updated-dependencies:
- dependency-name: baptiste0928/cargo-install
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-05 09:46:14 +01:00
dependabot[bot] 63a02a9e3f build(deps): bump andymckay/cancel-action from 0.3 to 0.4 (#1417)
Bumps [andymckay/cancel-action](https://github.com/andymckay/cancel-action) from 0.3 to 0.4.
- [Release notes](https://github.com/andymckay/cancel-action/releases)
- [Commits](https://github.com/andymckay/cancel-action/compare/b9280e3f8986d7a8e91c7462efc0fa318010c8b1...271cfbfa11ca9222f7be99a47e8f929574549e0a)

---
updated-dependencies:
- dependency-name: andymckay/cancel-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-05 09:45:51 +01:00
Tadeo Hepperle 8fa496b866 Build Polkadot Nodes in CI - fixes artifact generation (#1410)
* new workflow and adjust node builder

* fix examples by fixing artifacts script

* use-nodes instead of use-substrate

* update yamls

* build polkadot

* remove the on-push trigger again, now that polkadot built in the CI

* add default implementation again
2024-02-01 21:54:30 +01:00
Alexandru Vasile c1073bc8d1 ci: Better job parallelism, cancel pipeline on failure and extra clippy checks (#1409)
* ci: Change CI order for better parallelism

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

* ci: Cancel ongoing jobs

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

* TO REVERT: Check early termination due to clipp/check

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

* ci/clippy: Extend clippy checks for lightclient and web feature flags

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

* ci: Use cancel-action@3

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

* lightclient: Derive Default

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

* subxt/rpc: Resolve redundant closure

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

* tests: Fix clippy

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

* lightclient: Fix clippy warnings

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

* ci: Extend clippy rules

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

* lightclient: Remove redundant clone

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

* ci: Use subxt instead of subxt-lightclient

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

* ci: Add wasm clippy step

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

* ci: Simplify the clippy step into a single run command

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

* ci: Pin version for cancel-action

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

* ci: Fix pinned version

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

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
2024-01-31 11:53:33 +02:00
James Wilson fdaf08d9c7 update CI file from Alex PR 2024-01-18 09:22:26 +00:00
James Wilson 42af59f638 actually only wait for machete+fmt, clippy can be much slower 2024-01-17 17:41:35 +00:00
James Wilson cf39054aad merge master 2024-01-17 17:38:34 +00:00
James Wilson a9bc4f6661 megre in light client test change pr 2024-01-17 17:37:58 +00:00
James Wilson 2a93914dd8 make long tests run only after clippy + fmt pass 2024-01-17 17:35:18 +00:00
Alexandru Vasile c28d61c257 ci: Reduce the light client timeout to 15 minutes (#1373)
* ci: Reduce the light client timpeut to 15 seconds

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

* ci: Use ubuntu-latest for light-client tests

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

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
2024-01-17 16:33:29 +01:00
Tadeo Hepperle ab6b6ae5cd Weekly Cronjob fetching artifacts and generating polkadot.rs file. (#1352)
* github CI action cronjob

* add commit message

* fix the CI yml files

* binary crate for CI script with substrate-runner

* update the CI script

* correct the artifacts script

* remove bash script
2024-01-17 12:28:58 +01:00
James Wilson 553343548e fix: don't unpin blocks that may show up again (#1368)
* backend(fix): Early unpin for pruned blocks with no active `BlockRef`

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

* backend/tests: Check unpinning only after max_life time

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

* backend/tests: Remove unpinning when droped tests

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

* backend/tests: Ensure new blocks are not unpinned

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

* backend: Add only pruned blocks to unpin hashset and add a test

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

* backend: Introduce the `UnpinPolicy`

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

* Update subxt/src/backend/unstable/follow_stream_unpin.rs

* backend: Fix clippy

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

* Only unpin blocks that have been pruned by the backend

* Fix comments

* Mark initialized and finalized blocks as 'can_be_unpinned' too and tests

* fmt

* tweak a couple more comments

* tidy tests and fix undeterministic check

* Fix wrong names in comments

* tweak another test to focus it a bit more

* clippy

* wee rename of args in a couple of test helpers

* add some logs and simplify submit_transaction in the same way Alex did

* ditch logging again and keep to the experiment pr

* cargo fmt

* reduce CI timeouts to 30mins

* Handle Init and Stop events in submit_transaction too, just in case

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
2024-01-17 09:35:02 +00:00
dependabot[bot] 07a9522bfb build(deps): bump Swatinem/rust-cache from 2.7.1 to 2.7.3 (#1364)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.7.1 to 2.7.3.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8...23bce251a8cd2ffc3c1075eaa2367cf899916d84)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 08:57:41 +01:00
Sergejs Kostjucenko 47b8c90be5 CI: Add timeouts to test jobs (#1329)
* add timeouts to test jobs

* increase timeout

* Update .github/workflows/rust.yml

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

* increase timeout

---------

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2023-12-28 14:00:26 +01:00
Alexandru Vasile 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>
2023-12-04 13:07:23 +02:00
Daan van der Plas c3831c26d8 fix parachain example (#1228)
* fix parachain example

* Simplify chain config

* tweak CI to check parachain-example, too (#1234)

---------

Co-authored-by: Tadeo Hepperle <62739623+tadeohepperle@users.noreply.github.com>
Co-authored-by: James Wilson <james@jsdw.me>
2023-10-30 17:08:14 +01:00
dependabot[bot] e5be60bbf8 Bump Swatinem/rust-cache from 2.7.0 to 2.7.1 (#1220)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.7.0 to 2.7.1.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/a95ba195448af2da9b00fb742d14ffaaf3c21f43...3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 11:10:04 +02:00
James Wilson 71fbfebf5a Clone + Debug on Payloads/Addresses, and compare child storage results (#1203)
* Clone + Debug on Payloads/Addresses, and compare child storage results

* , to .

* clippy and fixes

* fix

* use derivative instead to remove boilerplate impls

* add missing import

* tidy up and extend wasm test timeout

* try 5 mins instead of 2
2023-10-18 22:05:38 +01:00
James Wilson 2e908025f0 Wee tidy to subxt-signer flags (#1200)
* Wee tidy to subxt-signer flags

* revert removing subxt?/foo features; need them for CI

* make the flag identical to subxt; forgot the 'all' case

* subxt-signer needs native flag now when --no-default-features
2023-10-09 22:15:42 +02:00
dependabot[bot] 850c5e57a8 Bump Swatinem/rust-cache from 2.6.2 to 2.7.0 (#1186) 2023-10-02 13:00:13 +03:00
dependabot[bot] 4a11947744 Bump actions/checkout from 3 to 4 (#1187)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 10:56:33 +02:00
James Wilson 0956b40412 try composite action to avoid dupe use-substrate code (#1177)
* try composite action to avoid dupe use-substrate code

* put use-substrate in a folder

* required 'shell' prop

* re-use use-substrate action across CI

* remove unnecessary bit from action readme
2023-09-26 17:54:03 +01:00
James Wilson cf7e2db1b7 chainHead based backend implementation (#1161)
* add follow_stream impl

* follow_stream_unpin first draft

* add tests for follow_stream_unpin

* more tests and fixes for follow_stream_unpin

* first pass follow_stream_driver

* follow_stream_driver: add tests, fix things, buffer events from last finalized

* First pass finishing Backend impl

* Fix test compile issues

* clippy fixes

* clippy fix and consistify light_client

* revert lightclient tweak

* revert other lightclient thing

* cargo fmt

* start testing unstable backend behind feature flag

* more test fixes and move test-runtime metadata path just incase

* fix compile error

* ensure transaction progress stream actually used and fix another test

* cargo fmt

* CI tweak

* improve some comments and address some feedback bits

* update CI to use our own nightly binary

* wait for finalized block perhaps
2023-09-26 16:58:30 +01:00
dependabot[bot] e78d9d54d9 Bump Swatinem/rust-cache from 2.6.2 to 2.7.0 (#1168)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.6.2 to 2.7.0.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/e207df5d269b42b69c8bc5101da26f7d31feddb4...a95ba195448af2da9b00fb742d14ffaaf3c21f43)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 12:59:27 +03:00
dependabot[bot] b4978ead39 Bump actions/checkout from 3 to 4 (#1159)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 11:28:41 +01:00