From 7da3ef8d69044416d0aac6edfa2249eaa805983e Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 15 Sep 2022 18:37:07 +0200 Subject: [PATCH 1/3] Remove `version` field from struct returned by `rpc_methods` --- bin/light-base/src/json_rpc_service/getters.rs | 1 - bin/wasm-node/CHANGELOG.md | 1 + src/json_rpc/methods.rs | 3 --- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/light-base/src/json_rpc_service/getters.rs b/bin/light-base/src/json_rpc_service/getters.rs index eac46e18ed..47aaf08ad1 100644 --- a/bin/light-base/src/json_rpc_service/getters.rs +++ b/bin/light-base/src/json_rpc_service/getters.rs @@ -127,7 +127,6 @@ impl Background { .respond( state_machine_request_id, methods::Response::rpc_methods(methods::RpcMethods { - version: 1, methods: methods::MethodCall::method_names() .map(|n| n.into()) .collect(), diff --git a/bin/wasm-node/CHANGELOG.md b/bin/wasm-node/CHANGELOG.md index 4f955243d2..2b3cfbea11 100644 --- a/bin/wasm-node/CHANGELOG.md +++ b/bin/wasm-node/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changed - No longer try to connect to a peer for 20 seconds after failing to connect to it. This prevents loops where we keep trying to connect to the same address(es) over and over again ([#2747](https://github.com/paritytech/smoldot/pull/2747)). +- Removed the `version` field of the struct returned by the `rpc_methods` function. ### Added diff --git a/src/json_rpc/methods.rs b/src/json_rpc/methods.rs index 58562044ca..235e81d2fb 100644 --- a/src/json_rpc/methods.rs +++ b/src/json_rpc/methods.rs @@ -889,7 +889,6 @@ pub struct NetworkConfig { #[derive(Debug, Clone)] pub struct RpcMethods { - pub version: u64, pub methods: Vec, } @@ -1054,12 +1053,10 @@ impl serde::Serialize for RpcMethods { { #[derive(serde::Serialize)] struct SerdeRpcMethods<'a> { - version: u64, methods: &'a [String], } SerdeRpcMethods { - version: self.version, methods: &self.methods, } .serialize(serializer) From 7ae097072c63fe0d0680aae2c97d04bed0c3a002 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 15 Sep 2022 18:38:30 +0200 Subject: [PATCH 2/3] CHANGELOG --- bin/wasm-node/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/wasm-node/CHANGELOG.md b/bin/wasm-node/CHANGELOG.md index 2b3cfbea11..bdc5146a31 100644 --- a/bin/wasm-node/CHANGELOG.md +++ b/bin/wasm-node/CHANGELOG.md @@ -5,7 +5,7 @@ ### Changed - No longer try to connect to a peer for 20 seconds after failing to connect to it. This prevents loops where we keep trying to connect to the same address(es) over and over again ([#2747](https://github.com/paritytech/smoldot/pull/2747)). -- Removed the `version` field of the struct returned by the `rpc_methods` function. +- Removed the `version` field of the struct returned by the `rpc_methods` function. This is technically a breaking change, but it has been introduced in a minor version bump because it is very insubstantial. ([#2756](https://github.com/paritytech/smoldot/pull/2756)) ### Added From 7004359557f75888db0b56c2701d97b4b2fa0d5c Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 23 Sep 2022 11:19:27 +0200 Subject: [PATCH 3/3] Fix CHANGELOG entry position --- bin/wasm-node/CHANGELOG.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/wasm-node/CHANGELOG.md b/bin/wasm-node/CHANGELOG.md index 56c90a07cf..8e8651d9f2 100644 --- a/bin/wasm-node/CHANGELOG.md +++ b/bin/wasm-node/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Changed + +- Removed the `version` field of the struct returned by the `rpc_methods` function. This is technically a breaking change, but it has been introduced in a minor version bump because it is very insubstantial. ([#2756](https://github.com/paritytech/smoldot/pull/2756)) + ## 0.6.34 - 2022-09-20 ### Added @@ -11,8 +15,7 @@ ### Changed -- No longer try to connect to a peer for 20 seconds after failing to connect to it. This prevents loops where we keep trying to connect to the same address(es) over and over again ([#2747](https://github.com/paritytech/smoldot/pull/2747)). -- Removed the `version` field of the struct returned by the `rpc_methods` function. This is technically a breaking change, but it has been introduced in a minor version bump because it is very insubstantial. ([#2756](https://github.com/paritytech/smoldot/pull/2756)) +- No longer try to connect to a peer for 20 seconds after failing to connect to it. This prevents loops where we keep trying to connect to the same address(es) over and over again. ([#2747](https://github.com/paritytech/smoldot/pull/2747)) ### Fixed