This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 187
Handle staking info since kaia fork in downloader. #2160
Merged
Merged
Conversation
This file contains 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
hyeonLewis
requested review from
blukat29,
ian0371,
yoomee1313,
sjnam,
hyunsooda,
2dvorak,
kjeom,
JayChoi1736,
aidan-kwon and
jeongkyun-oh
as code owners
May 13, 2024 12:55
hyeonLewis
changed the title
Handle staking info since kaia fork in downloader.
[WIP] Handle staking info since kaia fork in downloader.
May 13, 2024
hyeonLewis
force-pushed
the
fix-stakinginfo-sync
branch
3 times, most recently
from
May 13, 2024 15:42
5bf2c26
to
52f7d64
Compare
hyeonLewis
force-pushed
the
fix-stakinginfo-sync
branch
from
May 16, 2024 08:25
b8ab26b
to
855bace
Compare
hyeonLewis
force-pushed
the
fix-stakinginfo-sync
branch
from
May 17, 2024 08:01
fb67c77
to
b8ed177
Compare
hyeonLewis
changed the title
[WIP] Handle staking info since kaia fork in downloader.
Handle staking info since kaia fork in downloader.
May 17, 2024
hyeonLewis
force-pushed
the
fix-stakinginfo-sync
branch
2 times, most recently
from
May 18, 2024 02:47
5bdd492
to
a540e8a
Compare
hyeonLewis
force-pushed
the
fix-stakinginfo-sync
branch
from
May 18, 2024 04:04
a540e8a
to
6342630
Compare
blukat29
previously approved these changes
May 20, 2024
blukat29
approved these changes
May 20, 2024
ian0371
approved these changes
May 20, 2024
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.
Proposed changes
After kaia fork, the staking info for block
N
is determined at blockN-1
. Also, staking info is no longer stored in DB after kaia fork. This breaks current implementation of downloader to fetch staking info to verify headers (especially in snap sync). In this PR, all necessary staking info for block verification even after kaia fork will be requested to peer and stored in DB temporary. The stored staking info after kaia fork will be deleted after committing blocks to blockchain.When kaia fork block is
N
and downloader tries to fetch staking info fromN-10
toN+10
when staking interval is 4:N-10
,N-6
,N-2
,N-1
,N
,N+1
, ...N+9
N-10
,N-6
,N-2
It enables snap sync which was disabled at #2154.
Types of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
$ make test
)Related issues
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...