This repository was archived by the owner on Oct 25, 2024. It is now read-only.
Split initial proposer sync from the proposer fetch loop#28
Merged
avalonche merged 1 commit intolocal-relay-fixfrom Dec 15, 2022
Merged
Split initial proposer sync from the proposer fetch loop#28avalonche merged 1 commit intolocal-relay-fixfrom
avalonche merged 1 commit intolocal-relay-fixfrom
Conversation
avalonche
reviewed
Dec 14, 2022
builder/beacon_client.go
Outdated
| b.mu.Unlock() | ||
| } | ||
|
|
||
| timer.Reset(durationPerEpoch / 2) |
Contributor
There was a problem hiding this comment.
the timer is not reset, wouldn't this loop only run once?
Collaborator
Author
There was a problem hiding this comment.
Since it's a ticker it should be OK
avalonche
reviewed
Dec 14, 2022
946ea5e to
6c37398
Compare
avalonche
reviewed
Dec 15, 2022
| b.slotProposerMap = slotProposerMap | ||
| b.mu.Unlock() | ||
| nextFetchSlot := prevFetchSlot + b.slotsInEpoch/2 | ||
| if currentSlot < nextFetchSlot { |
Contributor
There was a problem hiding this comment.
Suggested change
| if currentSlot < nextFetchSlot { | |
| if currentSlot < nextFetchSlot || (currentSlot % b.slotsInEpoch) < b.slotsInEpoch/2 { |
this works fine except that it requests the same validator map twice in the same epoch. Should only request it once.
Collaborator
Author
There was a problem hiding this comment.
No, this is actually what we want - since we are trying to avoid corner cases where the BN is not ready with the proposers map for the next epoch (we can ask for what the BN thinks is epoch+2)
6c37398 to
b7608fe
Compare
avalonche
added a commit
that referenced
this pull request
Dec 20, 2022
* Fix getting validators map for local relay * pr comments * add timer for updating known validators * improvement to local validator map fetching * lock for map updating * properly lock updates * get current slot if the mapping is empty * remove onForkchoiceUpdate * graceful shutdown * Split initial proposer sync from the proposer fetch loop (#28) Co-authored-by: Mateusz Morusiewicz <11313015+Ruteri@users.noreply.github.com>
avalonche
added a commit
that referenced
this pull request
Feb 7, 2023
* Fix getting validators map for local relay * pr comments * add timer for updating known validators * improvement to local validator map fetching * lock for map updating * properly lock updates * get current slot if the mapping is empty * remove onForkchoiceUpdate * graceful shutdown * Split initial proposer sync from the proposer fetch loop (#28) Co-authored-by: Mateusz Morusiewicz <11313015+Ruteri@users.noreply.github.com>
avalonche
added a commit
that referenced
this pull request
Mar 9, 2023
* Fix getting validators map for local relay * pr comments * add timer for updating known validators * improvement to local validator map fetching * lock for map updating * properly lock updates * get current slot if the mapping is empty * remove onForkchoiceUpdate * graceful shutdown * Split initial proposer sync from the proposer fetch loop (#28) Co-authored-by: Mateusz Morusiewicz <11313015+Ruteri@users.noreply.github.com>
avalonche
added a commit
that referenced
this pull request
Mar 15, 2023
* Fix getting validators map for local relay * pr comments * add timer for updating known validators * improvement to local validator map fetching * lock for map updating * properly lock updates * get current slot if the mapping is empty * remove onForkchoiceUpdate * graceful shutdown * Split initial proposer sync from the proposer fetch loop (#28) Co-authored-by: Mateusz Morusiewicz <11313015+Ruteri@users.noreply.github.com>
avalonche
added a commit
that referenced
this pull request
Mar 17, 2023
* Fix getting validators map for local relay * pr comments * add timer for updating known validators * improvement to local validator map fetching * lock for map updating * properly lock updates * get current slot if the mapping is empty * remove onForkchoiceUpdate * graceful shutdown * Split initial proposer sync from the proposer fetch loop (#28) Co-authored-by: Mateusz Morusiewicz <11313015+Ruteri@users.noreply.github.com>
avalonche
added a commit
that referenced
this pull request
Mar 22, 2023
* Fix getting validators map for local relay * pr comments * add timer for updating known validators * improvement to local validator map fetching * lock for map updating * properly lock updates * get current slot if the mapping is empty * remove onForkchoiceUpdate * graceful shutdown * Split initial proposer sync from the proposer fetch loop (#28) Co-authored-by: Mateusz Morusiewicz <11313015+Ruteri@users.noreply.github.com>
avalonche
added a commit
that referenced
this pull request
Jul 6, 2023
* Fix getting validators map for local relay * pr comments * add timer for updating known validators * improvement to local validator map fetching * lock for map updating * properly lock updates * get current slot if the mapping is empty * remove onForkchoiceUpdate * graceful shutdown * Split initial proposer sync from the proposer fetch loop (#28) Co-authored-by: Mateusz Morusiewicz <11313015+Ruteri@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CONTRIBUTING.md