-
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
Align code base to v0.11 #5127
Align code base to v0.11 #5127
Conversation
* Refactoring of initial sync (#5096) * implements blocks queue * refactors updateCounter method * fixes deadlock on stop w/o start * refactors updateSchedulerState * more tests on schduler * parseFetchResponse tests * wraps up tests for blocks queue * eod commit * fixes data race in round robin * revamps fetcher * fixes race conditions + livelocks + deadlocks * less verbose output * fixes data race, by isolating critical sections * minor refactoring: resolves blocking calls * implements init-sync queue * udpate fetch/send buffers in blocks fetcher * blockState enum-like type alias * refactors common code into releaseTicket() * better gc * linter * minor fix to round robin * moves original round robin into its own package * adds enableInitSyncQueue flag * fixes issue with init-sync service selection * Update beacon-chain/sync/initial-sync/round_robin.go Co-Authored-By: terence tsao <terence@prysmaticlabs.com> * initsyncv1 -> initsyncold * adds span Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Handle rewards overflow * Revert "Refactoring of initial sync (#5096)" This reverts commit 3ec2a0f. Co-authored-by: Victor Farazdagi <simple.square@gmail.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
deniedText := "Historical states will not be generated. Please remove usage --new-state-mgmt" | ||
actionText := "--disable-new-state-mgmt was used. To proceed without the flag, the db will need " + | ||
"to generate and save historical states. This process may take a while, - do you want to proceed? (Y/N)" | ||
deniedText := "Historical states will not be generated. Please continue use --disable-new-state-mgmt" |
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 is this supposed to say @terencechain , "please continue use --disable" on the denied text?
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.
Huh? The PR says Please continue use --disable-new-state-mgmt
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.
The english just seems weird, its on the denied text for a confirmation of the usage of the flag. "Please continue use --disable" when you deny the flag? Maybe its supposed to be "Please continue using --disable"?
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.
sure we can update it
@@ -149,8 +150,15 @@ func createDepositData(privKey *bls.SecretKey, pubKey *bls.PublicKey) (*ethpb.De | |||
if err != nil { | |||
return nil, err | |||
} | |||
domain := bls.ComputeDomain(params.BeaconConfig().DomainDeposit) | |||
di.Signature = privKey.Sign(sr[:], domain).Marshal() | |||
domain, err := helpers.ComputeDomain(params.BeaconConfig().DomainDeposit, nil, 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.
Should this be changed?
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.
why ?
"github.com/prysmaticlabs/prysm/shared/keystore" | ||
"github.com/prysmaticlabs/prysm/shared/params" | ||
) | ||
|
||
func TestDepositInput_GeneratesPb(t *testing.T) { | ||
t.Skip("To be resolved until 5119 gets in") |
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.
Does this need to stay skipped?
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.
No, please unskip it
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.
Kk, on it
proto/beacon/rpc/v1/BUILD.bazel
Outdated
|
||
go_library( | ||
name = "go_default_library", | ||
srcs = ["slasher.pb.go"], |
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.
Not sure, must've missed them in #5308 , on it.
proto/beacon/rpc/v1/slasher.pb.go
Outdated
@@ -0,0 +1,2042 @@ | |||
// Code generated by protoc-gen-gogo. DO NOT EDIT. | |||
// source: proto/beacon/rpc/v1/slasher.proto |
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.
This is no longer needed, we can remove. On it.
Co-Authored-By: Ivan Martinez <ivanthegreatdev@gmail.com>
Co-Authored-By: Ivan Martinez <ivanthegreatdev@gmail.com>
Co-Authored-By: Ivan Martinez <ivanthegreatdev@gmail.com>
Co-Authored-By: Ivan Martinez <ivanthegreatdev@gmail.com>
* address all comments * set faucet * nishant feedback * Update beacon-chain/p2p/service.go Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Revert "Updates for remote keymanager (#5260)" This reverts commit bbcd895. * Revert "Remove keystore keymanager from validator (#5236)" This reverts commit 4600877. * Revert "Update eth2 wallet keymanager (#4984)" This reverts commit 7f7ef43. Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* remove duplicated BLS, add golang.org/x/mod * Update BLS and restrict visibility * fix build
* Unskip benchutil tests * Remove protos and gaz * Fixes
* check * fix test * fix size * fix test * more fixes * fix test again
* Proper err handling for tests * Lint * Fixed rest of the tests * Gaz * Fixed old master tests
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.
LGTM
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.
A copy paste error caused two critical bugs, and tests didn't catch it sadly. Refactoring rewards in spec to be less tangled together, then tested with good encapsulation, would be good. Too many reward bugs so far :(
Also, two more possible bugs:
- Attester eligibility should be considered in rewards and penalties processing. Currently the whole registry is used.
- Order of operations wrong, the rewards overflow spec bug is still there in Prysm. And the test that was supposed to catch it didn't
And maxAtteserReward
typo.
@@ -93,14 +95,18 @@ func attestationDelta(state *stateTrie.BeaconState, bp *Balance, v *Validator) ( | |||
|
|||
// Process target reward / penalty | |||
if v.IsPrevEpochTargetAttester && !v.IsSlashed { | |||
r += br * bp.PrevEpochTargetAttesters / bp.CurrentEpoch | |||
inc := params.BeaconConfig().EffectiveBalanceIncrement | |||
rewardNumerator := br * bp.PrevEpochAttesters / inc |
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.
This is a critical bug 🪲 🐛
} else { | ||
p += br | ||
} | ||
|
||
// Process head reward / penalty | ||
if v.IsPrevEpochHeadAttester && !v.IsSlashed { | ||
r += br * bp.PrevEpochHeadAttesters / bp.CurrentEpoch | ||
inc := params.BeaconConfig().EffectiveBalanceIncrement | ||
rewardNumerator := br * bp.PrevEpochAttesters / inc |
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.
This is a critical bug as well 🪲 🐛
Builds on #4804 and incorporates all changes.
Resolves #5119