From 797541e7424cc5b45b53591994b276be07da6717 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Thu, 4 Nov 2021 14:20:26 +0100 Subject: [PATCH] docs: add upgrading info about node service (#7241) * docs: add info about RPC local to upgrading docs * Apply suggestions from code review Co-authored-by: Callum Waters * cleanup codeblock Co-authored-by: Callum Waters --- UPGRADING.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/UPGRADING.md b/UPGRADING.md index 99efdf225..bd6411c6a 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -98,7 +98,7 @@ are: - `blockchain` - `evidence` -Accordingly, the `node` package was changed to reduce access to +Accordingly, the `node` package changed to reduce access to tendermint internals: applications that use tendermint as a library will need to change to accommodate these changes. Most notably: @@ -109,6 +109,20 @@ will need to change to accommodate these changes. Most notably: longer exported and have been replaced with `node.New` and `node.NewDefault` which provide more functional interfaces. +To access any of the functionality previously available via the +`node.Node` type, use the `*local.Local` "RPC" client, that exposes +the full RPC interface provided as direct function calls. Import the +`github.com/tendermint/tendermint/rpc/client/local` package and pass +the node service as in the following: + +```go + node := node.NewDefault() //construct the node object + // start and set up the node service + + client := local.New(node.(local.NodeService)) + // use client object to interact with the node +``` + ### gRPC Support Mark gRPC in the RPC layer as deprecated and to be removed in 0.36.