Files
pezkuwi-subxt/substrate/client/rpc-spec-v2/Cargo.toml
T
Tadeo Hepperle 379be3d7c3 [RPC-Spec-V2] chainHead: use integer for block index and adjust RuntimeVersion JSON format (#1666)
This PR adjusts the serialized format of the the returned RuntimeVersion
in the rpc-spec-v2 methods. This is done to match the format defined
here:
https://paritytech.github.io/json-rpc-interface-spec/api/chainHead_unstable_follow.html#about-the-runtime

- ##### `apis` field as object
`apis` field of `RuntimeVersion` is now returned as an object, e.g. 
```
"apis": {
      "0xdf6acb689907609b": 3,
      "0x37e397fc7c91f5e4": 1,
}
```
instead of 
```
"apis": [
      ["0xdf6acb689907609b", 3],
      ["0x37e397fc7c91f5e4", 1],
]
```
- ##### removed `stateVersion` and `authoringVersion`
`stateVersion` and `authoringVersion` are no longer returned in the
`RuntimeVersion` JSON Object.

- ##### block index in chain head events as integer

### Related Issues

Closes: #1507
Closes: #1146

### Testing Done
Adjusted existing tests to make sure data is returned in the correct
format.
2023-09-29 09:08:19 +02:00

50 lines
1.8 KiB
TOML

[package]
name = "sc-rpc-spec-v2"
version = "0.10.0-dev"
authors.workspace = true
edition.workspace = true
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.io"
repository.workspace = true
description = "Substrate RPC interface v2."
readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
jsonrpsee = { version = "0.16.2", features = ["client-core", "server", "macros"] }
# Internal chain structures for "chain_spec".
sc-chain-spec = { path = "../chain-spec" }
# Pool for submitting extrinsics required by "transaction"
sc-transaction-pool-api = { path = "../transaction-pool/api" }
sp-core = { path = "../../primitives/core" }
sp-runtime = { path = "../../primitives/runtime" }
sp-api = { path = "../../primitives/api" }
sp-blockchain = { path = "../../primitives/blockchain" }
sp-version = { path = "../../primitives/version" }
sc-client-api = { path = "../api" }
sc-utils = { path = "../utils" }
codec = { package = "parity-scale-codec", version = "3.6.1" }
thiserror = "1.0"
serde = "1.0"
hex = "0.4"
futures = "0.3.21"
parking_lot = "0.12.1"
tokio-stream = { version = "0.1.14", features = ["sync"] }
tokio = { version = "1.22.0", features = ["sync"] }
array-bytes = "6.1"
log = "0.4.17"
futures-util = { version = "0.3.19", default-features = false }
[dev-dependencies]
serde_json = "1.0"
tokio = { version = "1.22.0", features = ["macros"] }
substrate-test-runtime-client = { path = "../../test-utils/runtime/client" }
substrate-test-runtime = { path = "../../test-utils/runtime" }
sp-consensus = { path = "../../primitives/consensus/common" }
sp-maybe-compressed-blob = { path = "../../primitives/maybe-compressed-blob" }
sc-block-builder = { path = "../block-builder" }
sc-service = { path = "../service", features = ["test-helpers"]}
assert_matches = "1.3.0"
pretty_assertions = "1.2.1"