-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
create light-client-updates bucket #14266
create light-client-updates bucket #14266
Conversation
* Refactor get local payload * Fix go lint: new line
|
@rkapka do we want to have safety guards in the kv interface functions that check that an update is somewhat valid before saving it? for example, the important fields are not nil. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a few test cases for LighClientUpdates
:
startPeriod > endPeriod
- error returnedstartPeriod == endPeriod
- one update returnedstartPeriod > endPeriod
:- all updates between
startPeriod
andendPeriod
are in the DB - all returned - some periods between
startPeriod
andendPeriod
don't have updates - existing updates returned startPeriod
is earlier than the first update - return starting from first existing updateendPeriod
is later than the first update - return up to the last update
- all updates between
Added tests to cover all the mentioned cases. |
@rkapka The |
This reverts commit 33c707f5bd164386449dc14ff27d95ad5f195161.
* create light-client-updates bucket * Electra committe validation for aggregate and proof (#14317) * Electra committe validation for aggregate and proof * review * update comments * Refactor get local payload (#14327) * Refactor get local payload * Fix go lint: new line * add lightclient db kv functions * lightclient db tests * move blockchain/lightclient.go to core/light-client package * add comparison check for start and end period * create testing/utils/lightcilent.go * lightclient db tests * fix imports and usages * fix imports and usages in process_block_helpers * fix bazel dependencies * remove unnecessary nil check * add more tests for lightclient kv functions * refactor tests * refactor kv.LightClientUpdates * fix db to return every update that is available in the requested range * run gazzele fix * return empty map in case of empty db * fix goimports errors * goimports * Revert "Auxiliary commit to revert individual files from aa7ce6f" This reverts commit 33c707f5bd164386449dc14ff27d95ad5f195161. --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: terence <terence@prysmaticlabs.com> Co-authored-by: rkapka <radoslaw.kapka@gmail.com>
What type of PR is this?
Feature
What does this PR do? Why is it needed?
This PR intends to address the needs for a light client updates database per #12991 .
This is needed to support light clients.
Which issues(s) does this PR fix?
Partially addresses #12991