cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.27k stars 3.63k forks source link

incorporate tendermint light client #6563

Closed tac0turtle closed 1 month ago

tac0turtle commented 4 years ago

Summary

As I am going through updating the SDK to the latest Tendermint version there have been countless changes. One, in particular, is the trust node feature. This feature allowed users to set a flag in the cli to trust the node they are sending their txs to. This feature used various functions from Tendermint to verify that the information received from a node was valid. In 0.34 of Tendermint some of these features are no longer present.

Proposal

Remove the trust node feature and get the user to use a light client. If a user is not a full node then they have the option to spin up a light client and interact through it, otherwise, they will not be able to trust the node they are speaking with

The new light client from Tendermint is efficient enough to catch up in a short period of time.

@alexanderbez do you have anything to add


For Admin Use

alexanderbez commented 4 years ago

I agree here, but are there any actionable items aside from removing trust-node, which is already done in https://github.com/cosmos/cosmos-sdk/pull/6554? If not, then I don't think we need this issue.

tac0turtle commented 4 years ago

the actionable would be to create a command that initiates a light client and docs surrounding this

alexanderbez commented 4 years ago

Gotcha. Ok, so we want to create a command that starts a light-client daemon. That sounds reasonable to me :)

alexanderbez commented 4 years ago

Just to be clear, this isn't slated for Stargate atm, which means clients will not be able to verify proofs. If they make queries against their own nodes (which is the default behavior), then I think this might be OK for now.

tac0turtle commented 4 years ago

Could this be added in a patch release(minor), 0.40.1? I know its a new feature but could be useful

alexanderbez commented 4 years ago

Possibly, yes.

fedekunze commented 3 years ago

q: what's the status of this issue? should we add it to the next release?

tac0turtle commented 3 years ago

it can be added at anytime. Someone needs to implement this https://github.com/tendermint/tendermint/blob/master/cmd/tendermint/commands/light.go into the sdk.

Not sure if anyone has taken ownership of this

ashcherbakov commented 3 years ago

@marbar3778 @alexanderbez Can you please help us to understand the status of the light client feature in cosmos? We do need this feature for our apps. In particular, are there any plans to verify the proofs in CLI? As I can see, currently CLI doesn't verify any proof (see link), so generally speaking, if it's connected to a node that we don't control, we can not trust the results of CLI.

I can see there is a PR https://github.com/cosmos/cosmos-sdk/pull/9155 about adding a light client daemon, but it was closed for some reasons without being merged. Are there any plans to merge it? Are there any plans to support light client and proof verification within CLI?

alexanderbez commented 3 years ago

AFAIK, the light client is implemented in Tendermint core.

tac0turtle commented 1 year ago

so this issue may help us remove the dependence on tendermint in store. there are two other items we would need, but tendermint light client technically doesn't work for verification of sdk state without running the sdk.