Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update subxt requirement from 0.25.0 to 0.26.0 #1616

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 24, 2023

Updates the requirements on subxt to permit the latest version.

Release notes

Sourced from subxt's releases.

v0.26.0

[0.26.0] - 2022-01-24

This release adds a number of improvements, most notably:

  • We make Substrate dependencies optional (#760), which makes WASM builds both smaller and more reliable. To do this, we re-implement some core types like AccountId32, MultiAddress and MultiSignature internally.
  • Allow access to storage entries (#774) and runtime API's (#777) from some block. This is part of a move towards a more "block centric" interface, which will better align with the newly available chainHead style RPC interface.
  • Add RPC methods for the new chainHead style interface (see https://paritytech.github.io/json-rpc-interface-spec/). These are currently unstable, but will allow users to start experimenting with this new API if their nodes support it.
  • More advanced type substitution is now possible in the codegen interface (#735).

This release introduces a number of breaking changes that can be generally be fixed with mechanical tweaks to your code. The notable changes are described below.

Make Storage API more Block-centric

See #774. This PR makes the Storage API more consistent with the Events API, and allows access to it from a given block as part of a push to provide a more block centric API that will hopefully be easier to understand, and will align with the new RPC chainHead style RPC interface.

Before, your code will look like:

let a = api.storage().fetch(&staking_bonded, None).await?;

After, it should look like:

let a = api.storage().at(None).await?.fetch(&staking_bonded).await?;

Essentially, the final parameter for choosing which block to call some method at has been moved out of the storage method itself and is now provided to instantiate the storage API, either explicitly via an .at(optional_block_hash) as above, or implicitly when calling block.storage() to access the same storage methods for some block.

An alternate way to access the same storage (primarily used if you have subscribed to blocks or otherwise are working with some block) now is:

let block = api.blocks().at(None).await?
let a = block.storage().fetch(&staking_bonded, None).await?;

More advanced type substitution in codegen

See #735. Previously, you could perform basic type substitution like this:

#[subxt::subxt(runtime_metadata_path = "../polkadot_metadata.scale")]
pub mod node_runtime {
    #[subxt::subxt(substitute_type = "sp_arithmetic::per_things::Foo")]
    use crate::Foo;
}

This example would use crate::Foo every time an sp_arithmetic::per_things::Foo was encountered in the codegen. However, this was limited; the substitute type had to have the name number and order of generic parameters for this to work.

... (truncated)

Changelog

Sourced from subxt's changelog.

[0.26.0] - 2022-01-24

This release adds a number of improvements, most notably:

  • We make Substrate dependencies optional (#760), which makes WASM builds both smaller and more reliable. To do this, we re-implement some core types like AccountId32, MultiAddress and MultiSignature internally.
  • Allow access to storage entries (#774) and runtime API's (#777) from some block. This is part of a move towards a more "block centric" interface, which will better align with the newly available chainHead style RPC interface.
  • Add RPC methods for the new chainHead style interface (see https://paritytech.github.io/json-rpc-interface-spec/). These are currently unstable, but will allow users to start experimenting with this new API if their nodes support it.
  • More advanced type substitution is now possible in the codegen interface (#735).

This release introduces a number of breaking changes that can be generally be fixed with mechanical tweaks to your code. The notable changes are described below.

Make Storage API more Block-centric

See #774. This PR makes the Storage API more consistent with the Events API, and allows access to it from a given block as part of a push to provide a more block centric API that will hopefully be easier to understand, and will align with the new RPC chainHead style RPC interface.

Before, your code will look like:

let a = api.storage().fetch(&staking_bonded, None).await?;

After, it should look like:

let a = api.storage().at(None).await?.fetch(&staking_bonded).await?;

Essentially, the final parameter for choosing which block to call some method at has been moved out of the storage method itself and is now provided to instantiate the storage API, either explicitly via an .at(optional_block_hash) as above, or implicitly when calling block.storage() to access the same storage methods for some block.

An alternate way to access the same storage (primarily used if you have subscribed to blocks or otherwise are working with some block) now is:

let block = api.blocks().at(None).await?
let a = block.storage().fetch(&staking_bonded, None).await?;

More advanced type substitution in codegen

See #735. Previously, you could perform basic type substitution like this:

#[subxt::subxt(runtime_metadata_path = "../polkadot_metadata.scale")]
pub mod node_runtime {
    #[subxt::subxt(substitute_type = "sp_arithmetic::per_things::Foo")]
    use crate::Foo;
}

This example would use crate::Foo every time an sp_arithmetic::per_things::Foo was encountered in the codegen. However, this was limited; the substitute type had to have the name number and order of generic parameters for this to work.

... (truncated)

Commits
  • d92352a Prep for releasing 0.26.0 (#802)
  • 2a913a3 Bump which from 4.3.0 to 4.4.0 (#801)
  • e4e9562 Add block-centric Storage API (#774)
  • 4155850 tests: Ensure correct signing of extrinsics larger than 256 bytes (#797)
  • 0750ccd Add chainHead RPC methods (#766)
  • 977f2a3 Allow for remapping type parameters in type substitutions (#735)
  • b7a29a5 Add ability to set custom metadata etc on OnlineClient (#794)
  • 61878cc Fix bad signature when the extrinsic size is over 256 bytes (#796)
  • c0198ac Add Cargo.lock for deterministic builds (#795)
  • b4bb176 Add Runtime API to execute runtime calls (#777)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [subxt](/~https://github.com/paritytech/subxt) to permit the latest version.
- [Release notes](/~https://github.com/paritytech/subxt/releases)
- [Changelog](/~https://github.com/paritytech/subxt/blob/master/CHANGELOG.md)
- [Commits](paritytech/subxt@v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: subxt
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Jan 24, 2023
@ascjones
Copy link
Collaborator

Superseded by #1549

@ascjones
Copy link
Collaborator

@dependabot ignore this minor version

@ascjones ascjones closed this Jan 25, 2023
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 25, 2023

OK, I won't notify you about version 0.26.x again, unless you re-open this PR. 😢

@dependabot dependabot bot deleted the dependabot/cargo/subxt-0.26.0 branch January 25, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant