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

Support bisecting headers in updateClient if too much change. #84

Open
ethanfrey opened this issue Feb 26, 2021 · 0 comments
Open

Support bisecting headers in updateClient if too much change. #84

ethanfrey opened this issue Feb 26, 2021 · 0 comments
Labels
Library Functionality in the core library
Milestone

Comments

@ethanfrey
Copy link
Contributor

If updateClient fails as there was > 1/3 validator change since the last trusted header, we need to submit a few steps that can each be proven.

Detect this particular error from the sdk (using error code?) and handle it different. This can be done in 3 parts

(1) We need a test case that fails. It requires a multi-node setup and an account with many staking tokens throwing around their weight.
(2) We can try a naive bisect algorithm and let the server do the verification (expensive), but most importantly ensure the test passes. Handling the server errors properly is important here, as we may always get such errors if there is a timing issue (changes between a pre-query and the submission)
(3) We can check the % change in validator sets on the client side and calculate a path of the needed headers before blindly submitting very bisect header needed.

@ethanfrey ethanfrey added the Library Functionality in the core library label Feb 26, 2021
@ethanfrey ethanfrey added this to the v2 milestone Feb 26, 2021
@ethanfrey ethanfrey modified the milestones: v2, v1 Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Library Functionality in the core library
Projects
None yet
Development

No branches or pull requests

1 participant