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
Change candidates/kickoutList state DB implementation #1858
Change candidates/kickoutList state DB implementation #1858
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1858 +/- ##
=========================================
Coverage ? 61.03%
=========================================
Files ? 164
Lines ? 13636
Branches ? 0
=========================================
Hits ? 8323
Misses ? 4238
Partials ? 1075 Continue to review full report at Codecov.
|
20c7f0f
to
b524d03
Compare
latest commit is that
|
c882b4e
to
7982b02
Compare
if blkCtx.BlockHeight == 1 { | ||
return 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.
what if we do a shift in shiftKickoutList?
e558597
to
96357d5
Compare
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.
Unblock it for now, a lot to modify once we have the native staking implementation.
We've been storing candidate information by height key, so I change to only store current/next epoch's candidate/kickout information. And the archive node will store all of it.
setCandidate -> store with nextKey (mid of epoch)
setKickout -> store with next Key (end of epoch)
shift -> move next data to current data (start of epoch at createPreState())
getCandidates -> read with currentKey (in consensus, start of epoch, with next key)
getKickouts -> read with currentKey (in consensus, start of epoch, with next key)