Skip to content

Align code base to v0.11#5127

Merged
prylabs-bulldozer[bot] merged 423 commits into
masterfrom
v0.11
Apr 14, 2020
Merged

Align code base to v0.11#5127
prylabs-bulldozer[bot] merged 423 commits into
masterfrom
v0.11

Conversation

@terencechain

@terencechain terencechain commented Mar 17, 2020

Copy link
Copy Markdown
Collaborator

Builds on #4804 and incorporates all changes.

Resolves #5119

prylabs-bulldozer Bot and others added 30 commits March 14, 2020 15:34
* 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>
Comment thread beacon-chain/core/blocks/block_operations_fuzz_test.go
Comment thread beacon-chain/core/blocks/block_operations_test.go Outdated
Comment thread beacon-chain/core/blocks/eth1_data_test.go Outdated
Comment thread beacon-chain/core/helpers/signing_root.go Outdated
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"

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Collaborator Author

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

Copy link
Copy Markdown
Contributor

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"?

Copy link
Copy Markdown
Collaborator Author

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be changed?

Copy link
Copy Markdown
Contributor

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")

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, please unskip it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kk, on it

Comment thread shared/testutil/helpers.go Outdated
Comment thread proto/beacon/rpc/v1/BUILD.bazel Outdated

go_library(
name = "go_default_library",
srcs = ["slasher.pb.go"],

Copy link
Copy Markdown
Contributor

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.

Comment thread 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

Copy link
Copy Markdown
Contributor

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.

terencechain and others added 11 commits April 13, 2020 18:07
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
prestonvanloon
prestonvanloon previously approved these changes Apr 14, 2020
* Proper err handling for tests

* Lint

* Fixed rest of the tests

* Gaz

* Fixed old master tests

@prestonvanloon prestonvanloon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@prylabs-bulldozer prylabs-bulldozer Bot merged commit cb045dd into master Apr 14, 2020
@delete-merged-branch delete-merged-branch Bot deleted the v0.11 branch April 14, 2020 20:27

@protolambda protolambda left a comment

Copy link
Copy Markdown

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.

if v.IsPrevEpochTargetAttester && !v.IsSlashed {
r += br * bp.PrevEpochTargetAttesters / bp.CurrentEpoch
inc := params.BeaconConfig().EffectiveBalanceIncrement
rewardNumerator := br * bp.PrevEpochAttesters / inc

Copy link
Copy Markdown

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 🪲 🐛

if v.IsPrevEpochHeadAttester && !v.IsSlashed {
r += br * bp.PrevEpochHeadAttesters / bp.CurrentEpoch
inc := params.BeaconConfig().EffectiveBalanceIncrement
rewardNumerator := br * bp.PrevEpochAttesters / inc

Copy link
Copy Markdown

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 🪲 🐛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align to spec v0.11

9 participants