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

ICS02: Tendermint light client integration for verification #5077

Closed
mossid opened this issue Sep 20, 2019 · 6 comments
Closed

ICS02: Tendermint light client integration for verification #5077

mossid opened this issue Sep 20, 2019 · 6 comments
Assignees

Comments

@mossid
Copy link
Contributor

mossid commented Sep 20, 2019

Validity predicate under ICS02 should handle consensus state updating for tendermint headers. The implementation will have the following type:

type ConsensusState interface {
...
  Validate(Header) (ConsensusState, error)
...
}

Validate must be a pure function which takes a new header and returns the updated consensus state(which is defined as (AppHash, NextValidatorSet) in case of Tendermint).

The current implementation of Tendermint lightclient in IBC module is a simple ValidatorSet.VerifyFutureCommit which accepts a header produced later than the current one and have more than 2/3 vote from the current validator set. It has to be integrated with the Tendermint side lightclient progress.

@mossid mossid added the x/ibc label Sep 20, 2019
@mossid mossid mentioned this issue Oct 1, 2019
12 tasks
@alexanderbez alexanderbez added this to the IBC Implementation & Integration milestone Oct 1, 2019
@fedekunze fedekunze modified the milestones: IBC Implementation & Integration, IBC Implementation Dec 10, 2019
@fedekunze fedekunze mentioned this issue Dec 10, 2019
6 tasks
@fedekunze
Copy link
Collaborator

fedekunze commented Jan 14, 2020

@cwgoes @melekes @tessr @marbar3778 Can you point me to the right function that needs to be used from the new lite2 implementation?

EDIT:

https://github.com/tendermint/tendermint/blob/a3a09285de7cc16a2acb77085421ae10ddac65b7/lite2/verifier.go#L28-L79

@fedekunze fedekunze changed the title ICS02: Tendermint lightclient integration for Updating ICS02: Tendermint light client integration for verification Jan 14, 2020
@fedekunze
Copy link
Collaborator

@cwgoes @AdityaSripal @mossid @zaki which values should we use for trustingPeriod and trustLevel?

Verify(
	chainID string,
	h1 *types.SignedHeader,
	h1NextVals *types.ValidatorSet,
	h2 *types.SignedHeader,
	h2Vals *types.ValidatorSet,
	trustingPeriod time.Duration,
	now time.Time,
	trustLevel tmmath.Fraction)

@melekes
Copy link
Contributor

melekes commented Jan 14, 2020

trustLevel = 1/3 (https://godoc.org/github.com/tendermint/tendermint/lite2#pkg-variables)
trustingPeriod = 2/3 * unbondingPeriod (https://godoc.org/github.com/tendermint/tendermint/lite2#TrustOptions)

@cwgoes
Copy link
Contributor

cwgoes commented Jan 15, 2020

Hmm, I think they should be parameters that the user can choose when they create the client.

@fedekunze
Copy link
Collaborator

We can add them as params to the IBC client keeper and set the defaults to those values

@jackzampolin
Copy link
Member

I think this issue has been closed by the wonderful ICS02 impl by @fedekunze

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants