Skip to content

Releases: paritytech/subxt

V0.21.0

02 May 16:23
v0.21.0
6d73172
Compare
Choose a tag to compare

This release adds static metadata validation, via comparing the statically generated API with the target node's runtime
metadata. This implies a breaking change in the subxt API, as the user receives an error when interacting with an
incompatible API at the storage, call, and constant level.

The subxt-cli can check the compatibility of multiple runtime nodes, either full metadata compatibility or
compatibility at the pallet level.

Users can define custom derives for specific generated types of the API via adding the derive_for_type configuration
to the subxt attribute.

The metadata documentation is propagated to the statically generated API.

Previously developers wanting to build the subxt crate needed the substrate binary dependency in their local
environment. This restriction is removed via moving the integration tests to a dedicated crate.

The number of dependencies is reduced for individual subxt crates.

Fixed

  • test-runtime: Add exponential backoff (#518)

Added

  • Add custom derives for specific generated types (#520)
  • Static Metadata Validation (#478)
  • Propagate documentation to runtime API (#511)
  • Add tidext in real world usage (#508)
  • Add system health rpc (#510)

Changed

  • Put integration tests behind feature flag (#515)
  • Use minimum amount of dependencies for crates (#524)
  • Export BaseExtrinsicParams (#516)
  • bump jsonrpsee to v0.10.1 (#504)

v0.20.0

06 Apr 16:41
v0.20.0
dffeee4
Compare
Choose a tag to compare

The most significant change in this release is how we create and sign extrinsics, and how we manage the
"additional" and "extra" data that is attached to them. See #477, and the
associated PR #490 for a more detailed look at the code changes.

If you're targeting a node with compatible additional and extra transaction data to Substrate or Polkadot, the main
change you'll have to make is to import and use subxt::PolkadotExtrinsicParams or subxt::SubstrateExtrinsicParams
instead of subxt::DefaultExtra (depending on what node you're compatible with), and then use sign_and_submit_default
instead of sign_and_submit when making a call. Now, sign_and_submit accepts a second argument which allows these
parameters (such as mortality and tip payment) to be customized. See examples/balance_transfer_with_params.rs for a
small usage example.

If you're targeting a node which involves custom additional and extra transaction data, you'll need to implement the
trait subxt::extrinsic::ExtrinsicParams, which determines the parameters that can be provided to sign_and_submit, as
well as how to encode these into the "additional" and "extra" data needed for a transaction. Have a look at
subxt/src/extrinsic/params.rs for the trait definition and Substrate/Polkadot implementations. The aim with this change
is to make it easier to customise this for your own chains, and provide a simple way to provide values at runtime.

Fixed

  • Test utils: parse port from substrate binary output to avoid races (#501)
  • Rely on the kernel for port allocation (#498)

Changed

  • Export ModuleError for downstream matching (#499)
  • Bump jsonrpsee to v0.9.0 (#496)
  • Use tokio instead of async-std in tests/examples (#495)
  • Read constants from metadata at runtime (#494)
  • Handle sp_runtime::ModuleError substrate updates (#492)
  • Simplify creating and signing extrinsics (#490)
  • Add dev_getBlockStats RPC (#489)
  • scripts: Hardcode github subxt pull link for changelog consistency (#482)

v0.19.0

21 Mar 11:29
v0.19.0
3758c85
Compare
Choose a tag to compare

Changed

  • Return events from blocks skipped over during Finalization, too (#473)
  • Use RPC call to get account nonce (#476)
  • Add script to generate release changelog based on commits (#465)
  • README updates (#472)
  • Make EventSubscription and FilterEvents Send-able (#471)

v0.18.1

04 Mar 12:02
v0.18.1
14ef6c8
Compare
Choose a tag to compare

Fixed

  • Remove unused sp_version dependency to fix duplicate parity-scale-codec deps (#466)

v0.18.0

02 Mar 19:25
v0.18.0
3baaa01
Compare
Choose a tag to compare

Added

  • Expose method to fetch nonce via Client (#451)

Changed

  • Reference key storage api (#447)
  • Filter one or multiple events by type from an EventSubscription (#461)
  • New Event Subscription API (#442)
  • Distinct handling for N fields + 1 hasher vs N fields + N hashers (#458)
  • Update scale-info and parity-scale-codec requirements (#462)
  • Substitute BTreeMap/BTreeSet generated types for Vec (#459)
  • Obtain DispatchError::Module info dynamically (#453)
  • Add hardcoded override to ElectionScore (#455)
  • DispatchError::Module is now a tuple variant in latest Substrate (#439)
  • Fix flaky event subscription test (#450)
  • Improve documentation (#449)
  • Export codegen::TypeGenerator (#444)
  • Fix conversion of Call struct names to UpperCamelCase (#441)
  • Update release documentation with dry-run (#435)

v0.17.0

07 Feb 10:44
v0.17.0
19ae2aa
Compare
Choose a tag to compare

Note: owing to a hiccup only found at publish time, subxt-macro and subxt-codegen releases come from e9be43a, whereas subxt is released at a7c54f7.

Added

  • introduce jsonrpsee client abstraction + kill HTTP support. (#341)
  • Get event context on EventSubscription (#423)

Changed

  • Add more tests for events.rs/decode_and_consume_type (#430)
  • Update substrate dependencies (#429)
  • export RuntimeError struct (#427)
  • remove unused PalletError struct (#425)
  • Move Subxt crate into a subfolder (#424)
  • Add release checklist (#418)

v0.16.0

01 Feb 11:22
667dfa2
Compare
Choose a tag to compare

Note: This is a significant release which introduces support for V14 metadata and macro based codegen, as well as making many breaking changes to the API.

Changed

  • Log debug message for JSON-RPC response (#415)
  • Only convert struct names to camel case for Call variant structs (#412)
  • Parameterize AccountData (#409)
  • Allow decoding Events containing BitVecs (#408)
  • Custom derive for cli (#407)
  • make storage-n-map fields public too (#404)
  • add constants api to codegen (#402)
  • Expose transaction::TransactionProgress as public (#401)
  • add interbtc-clients to real world usage section (#397)
  • Make own version of RuntimeVersion to avoid mismatches (#395)
  • Use the generated DispatchError instead of the hardcoded Substrate one (#394)
  • Remove bounds on Config trait that aren't strictly necessary (#389)
  • add crunch to readme (#388)
  • fix remote example (#386)
  • fetch system chain, name and version (#385)
  • Fix compact event field decoding (#384)
  • fix: use index override when decoding enums in events (#382)
  • Update to jsonrpsee 0.7 and impl Stream on TransactionProgress (#380)
  • Add links to projects using subxt (#376)
  • Use released substrate dependencies (#375)
  • Configurable Config and Extra types (#373)
  • Implement pre_dispatch for SignedExtensions (#370)
  • Export TransactionEvents (#363)
  • Rebuild test-runtime if substrate binary is updated (#362)
  • Expand the subscribe_and_watch example (#361)
  • Add TooManyConsumers variant to track latest sp-runtime addition (#360)
  • Implement new API for sign_and_submit_then_watch (#354)
  • Simpler dependencies (#353)
  • Refactor type generation, remove code duplication (#352)
  • Make system properties an arbitrary JSON object, plus CI fixes (#349)
  • Fix a couple of CI niggles (#344)
  • Add timestamp pallet test (#340)
  • Add nightly CI check against latest substrate. (#335)
  • Ensure metadata is in sync with running node during tests (#333)
  • Update to jsonrpsee 0.5.1 (#332)
  • Update substrate and hardcoded default ChargeAssetTxPayment extension (#330)
  • codegen: fix compact unnamed fields (#327)
  • Check docs and run clippy on PRs (#326)
  • Additional parameters for SignedExtra (#322)
  • fix: also processess initialize and finalize events in event subscription (#321)
  • Release initial versions of subxt-codegen and subxt-cli (#320)
  • Add some basic usage docs to README. (#319)
  • Update jsonrpsee (#317)
  • Add missing cargo metadata fields for new crates (#311)
  • fix: keep processing a block's events after encountering a dispatch error (#310)
  • Codegen: enum variant indices (#308)
  • fix extrinsics retracted (#307)
  • Add utility pallet tests (#300)
  • fix metadata constants (#299)
  • Generate runtime API from metadata (#294)
  • Add NextKeys and QueuedKeys for session module (#291)
  • deps: update jsonrpsee 0.3.0 (#289)
  • deps: update jsonrpsee 0.2.0 (#285)
  • deps: Reorg the order of deps (#284)
  • Expose the rpc client in Client (#267)
  • update jsonrpsee to 0.2.0-alpha.6 (#266)
  • Remove funty pin, upgrade codec (#265)
  • Use async-trait (#264)
  • [jsonrpsee http client]: support tokio1 & tokio02. (#263)
  • impl From<Arc<WsClient>> and From<Arc<HttpClient>> (#257)
  • update jsonrpsee (#251)
  • return none if subscription returns early (#250)

v0.15.0

22 Mar 17:38
1a8e0bc
Compare
Choose a tag to compare

Added

  • implement variant of subscription that returns finalized storage changes - #237
  • implement session handling for unsubscribe in subxt-client - #242

Changed

  • update jsonrpsee #251
  • return none if subscription returns early #250
  • export ModuleError and RuntimeError for downstream usage - #246
  • rpc client methods should be public for downstream usage - #240
  • re-export WasmExecutionMethod for downstream usage - #239
  • integration with jsonrpsee v2 - #214
  • expose wasm execution method on subxt client config - #230
  • Add hooks to register event types for decoding - #227
  • Substrate 3.0 - #232

v0.12.0

01 Sep 15:17
af45c39
Compare
Choose a tag to compare
  • Only return an error if the extrinsic failed. #156
  • Update to rc6. #155
  • Different assert. #153
  • Add a method to fetch an unhashed key, close #100 #152
  • Fix port number. #151
  • Implement the concat in twox_64_concat #150
  • Storage map iter #148

v0.11.0

01 Sep 10:19
d3e7bd2
Compare
Choose a tag to compare
  • Fix build error, wabt 0.9.2 is yanked #146
  • Rc5 #143
  • Refactor: extract functions and types for creating extrinsics #138
  • event subscription example #140
  • Document the Call derive macro #137
  • Document the #[module] macro #135
  • Support authors api. #134