Preston Van Loon
afc0ace624
POW: remove context from log message ( #8782 )
2021-04-16 19:16:36 +00:00
terence tsao
400e42cc2d
Reuse ProcessBlockForStateRoot ( #8781 )
2021-04-16 10:18:59 -07:00
terence tsao
a4ff97d24b
Refactor signature function's argument ( #8773 )
2021-04-15 11:35:53 -07:00
terence tsao
169cd78bbd
Refactor process operation function arguments ( #8767 )
...
* Pass slash validator func as argument
* Refactor ProcessBlockHeaderNoVerify
* Refactor Eth1Data and Randao
* Refactor ProposerSlashing
* Refactor AttesterSlashing
* Refactor VoluntaryExit
* Add VerifyNilBeaconBlock to ProcessBlock
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-04-15 13:58:54 +00:00
Nishant Das
405e2a1a03
Thread Context for HTR Methods ( #8770 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-04-15 12:17:55 +00:00
Shay Zluf
d77c298ec6
Support authorised access to web 3 providers ( #8075 )
...
* jwt access token impl
* use secret or jwt
* rename
* separate method for splitting auth
* usage update
* Update beacon-chain/flags/base.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/node/node.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* make things work
* removed unused code
* better, more flexible authorization
* move types and function to proper packages
* fix checking if endpoint is not set
* fix existing tests
* rename Endpoint field to Url
* Tests for HttpEndpoint
* better bearer auth
* tests for endpoint utils
* fix endpoint registration
* fix test build
* move endpoint parsing to powchain
* Revert "fix existing tests"
This reverts commit ceab192e6a78c106cf4e16a1bdf5399752a39890.
* fix field name in tests
* gzl
* add httputils dependency
* remove httputils dependency
* fix compilation issue in blockchain service test
* correct endpoint fallback function and tests
* gzl
* remove pointer from currHttpEndpoint
* allow whitespace in auth string
* endpoint equality
* correct one auth data Equals test case
* remove pointer receiver
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-15 11:02:02 +00:00
Radosław Kapka
2c6549b431
Tests for beacon-chain/node/config.go
( #8769 )
...
* Tests for `beacon-chain/node/config.go`
* gzl
* change tested value of NetworkID
2021-04-15 10:01:50 +00:00
Radosław Kapka
a8716d2949
Implement ListForkChoiceHeads in the debug API ( #8675 )
...
* initial implementation
* use ChainHeads to get heads
* API unit tests
* remove unnecessary identifier
* fix formatting
* gzl
* Update chainheads to fork choice scope
* use HeadFetcher
* fix test
* gzl
* remove junk
* remove ChainHeads from forkchoice
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-04-14 17:01:24 +00:00
Radosław Kapka
a9a0ecd76d
Create node's Powchain registration file ( #8754 )
...
* extract powchain and remove unused function
* improve "no web3 provider" error log
* add second error log
* remove redundant code from registerPOWChainService
* remove deposit contract log from registerPOWChainService
* gzl
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-14 12:54:50 +02:00
terence tsao
228033f7a3
Pass SlashValidator func as argument to ProcessProposer[Attester]Slashings
( #8763 )
...
* Pass slash validator func as argument
* Gazelle
2021-04-13 20:32:49 -05:00
Victor Farazdagi
53ffc67850
Update specs comments ( #8759 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 22:26:39 +00:00
terence tsao
59eb2e60d0
Combine function parameters ( #8758 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 19:56:28 +00:00
Nishant Das
0ea11ac212
Rebuild Trie After Reaching Limit ( #8740 )
...
* fix up indices
* add comment
* fix up again
* add test
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 19:12:56 +00:00
terence tsao
3e686a71e3
Move finality delay calculation ( #8757 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 18:28:46 +00:00
Nishant Das
dd7481e99c
Disable Persisting Network Keys ( #8735 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 16:25:35 +00:00
Nishant Das
131a14ee2f
Minor State Management Improvements ( #8742 )
...
* add improvement
* change to bool
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 13:23:06 +00:00
Nishant Das
45d2df1af7
Simplify Effective Balance Calculation ( #8743 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 12:44:33 +00:00
Victor Farazdagi
5f3299e598
Update processJustificationAndFinalization(), per current specs ( #8741 )
2021-04-13 11:51:04 +00:00
Radosław Kapka
5217081567
Create node's P2P registration file ( #8745 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 07:41:06 +00:00
Radosław Kapka
389bad7d24
Extract node configuration to separate file ( #8744 )
...
* Extract node configuration to separate file
* rename WarnIfNotSupported
* rename configuration to config
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 07:04:34 +00:00
Victor Farazdagi
cc9bec7a19
Update specs comments ( #8750 )
...
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 05:35:22 +00:00
terence tsao
8b494fb1bc
ProcessRewardsAndPenaltiesPrecompute taking in rewards funcs ( #8737 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 04:55:45 +00:00
Nishant Das
6aa1297829
Enable Gossip Scoring ( #8730 )
...
* enable gossip scoring
* fix some tests
* fix up
* handle too small numbers
* add caching to validator count
* fix up
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-13 02:20:13 +00:00
Preston Van Loon
a91f2688f1
Set test timeout on //beacon-chain/rpc/validator:go_default_test. Sometimes exceeds 800s otherwise ( #8752 )
2021-04-13 00:24:04 +00:00
terence tsao
1c1bf37b33
Refactor EligibleForRewards into its own helper ( #8739 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-12 20:26:08 +00:00
terence tsao
74cf2320ad
Altair: Split no verify functions in own file ( #8747 )
...
* Split transition no verify functions in its own file
* Remove redeclared functions
* Go fmt
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-12 16:42:08 +00:00
terence tsao
2a1c880673
Altair: Split state getters and setters into its own file ( #8746 )
...
* Categorize getters and setters into its own file
* Go fmt
2021-04-12 14:23:55 +00:00
terence tsao
19a9b4b064
Refactor finality helpers to helpers pkg ( #8734 )
...
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-04-10 16:12:52 +00:00
Victor Farazdagi
0808c02c65
Update spec comments ( #8727 )
2021-04-08 19:33:54 +00:00
Victor Farazdagi
76390c94af
Refactor ProcessFinalUpdates(), per updated specs ( #8724 )
2021-04-08 14:20:52 +00:00
Victor Farazdagi
74d0134ee3
Weak subjectivity minor refactoring ( #8715 )
...
* Add IsWithinWeakSubjectivityPeriod helper method
* Add LatestWeakSubjectivityEpoch method
* ParseWeakSubjectivityInputString helper
* switch to Checkpoint
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-06 14:32:49 +00:00
Victor Farazdagi
91df0112c7
Add LatestWeakSubjectivityEpoch() method ( #8707 )
...
* Add IsWithinWeakSubjectivityPeriod helper method
* Add LatestWeakSubjectivityEpoch method
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-06 09:08:44 +03:00
terence tsao
7998348bcb
Fix deep source complains ( #8714 )
2021-04-05 23:04:26 +00:00
Victor Farazdagi
dfe5372db5
Add IsWithinWeakSubjectivityPeriod helper method ( #8706 )
...
* Add IsWithinWeakSubjectivityPeriod helper method
* Nishant's suggestion on cache reset
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-05 18:26:31 +00:00
terence tsao
f2f509be0e
Block deposit: refactor batch verify and validation activation ( #8698 )
...
* Block deposit: refactor batch verify and validation activation
* Return beacon state
* Return nil
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-05 16:49:17 +00:00
terence tsao
01eb77c834
ProcessPreGenesisDeposits: Remove context.TODO() usage ( #8705 )
...
* ProcessPreGenesisDeposits: Remove context.TODO() usage
* apply #8704 change
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-05 15:07:56 +00:00
terence tsao
1c6c058bba
Genesis beacon state: refactor update eth1 data ( #8704 )
2021-04-03 23:19:48 +02:00
terence tsao
528cd89616
Move chainheads to blockchain pkg ( #8700 )
...
* Move chainheads to block chain's head info
* Fix mock
2021-04-03 11:25:25 +00:00
terence tsao
f67228bacb
Change ProcessDeposits
argument to use deposits
( #8696 )
2021-04-02 14:48:41 +00:00
Nishant Das
af3d3e8cd3
Update Gossip Parameters ( #8683 )
...
* add in more accurate aggregate parameters
* add more param changes
* more cleanup
* fix order of operations
* comments
* remove redundant declaration
* clean up better
* fix up
* victor's review
* disable mesh scoring
* disable mesh scoring
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-04-02 20:21:19 +08:00
Victor Farazdagi
acf17f9b82
Weak subjectivity period calculating helper ( #8695 )
...
* move helpers to their own file
* implement ComputeWeakSubjectivityCheckptEpoch
* remove helper func
* fix unit tests
* rename
2021-04-01 22:50:04 +00:00
Radosław Kapka
f822f0436e
Break long lines in beacon chain package ( #8686 )
...
* Break long lines in beacon chain package
* change log formatting
* Revert "change log formatting"
This reverts commit b610fd67edbf4f9f095f0336e313376e4472d50a.
* Revert "Break long lines in beacon chain package"
This reverts commit 53215fdcde0ad5cbed5c9e0616979e3ae396322c.
* wrap lines over 160
* revert go.mod and go.sum
2021-03-30 11:24:46 +00:00
Potuz
0b06c48ed0
Fix typo in comment for LoadGenesis ( #8685 )
2021-03-30 00:45:14 +00:00
Radosław Kapka
190d862552
Implement GetBeaconState in the debug API ( #8631 )
...
* Return status.Errorf instead of plain errors from gRPC functions
* return plain errors from helper functions
* change errors to lowercase in node
* correct test expectations
* extracted StateFetcher
* StateFetcher tests
* extract beacon state creation option and fix state tests
* add comment to StateFetcher
* register the server
* implement grpc function
* test ToProto
* gRPC function test with mock state fetcher
* reduce visibility of packages
* add missing error assertion
* removed unused code
* overwrite config name
* gzl
* Fix service fields
* rename StateFetcher to Provider
* Update beacon-chain/state/stateV0/state_trie.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* adjust code to new v0 interfaces
* interface/struct naming changes
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-29 21:04:35 +00:00
terence tsao
a8ab279cb8
Protoarray: add ChainHeads ( #8684 )
...
* Add ChainHeads
* Add only has bestChild case
* Update beacon-chain/forkchoice/protoarray/store.go
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-29 17:40:38 +00:00
Victor Farazdagi
feeb59de23
Add a separate unit test for ComputeDomainAndSign ( #8600 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-29 15:26:50 +00:00
terence tsao
2ec3f79146
Remove unused interface ( #8682 )
2021-03-28 22:53:34 +02:00
Nishant Das
4886a4e749
Add Remaining Gossip Scoring Topics ( #8678 )
...
* add for topics
* Apply suggestions from code review
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-03-28 09:37:25 +08:00
Victor Farazdagi
54cf5f3c7a
Add connectivity E2E test ( #8607 )
...
* Add connectivity e2e test
* randomized backoff period on discovery
* fix signature
* gazelle
* deterministic randg
* define ComponentRunner
* update ETH1 node
* extrace BootNode
* add logger
* remove refs to t
* gazelle
* update BeaconNode
* parametrize tests
* update log formatting
* update ValidatorNode
* remove redundant test id from params
* decrease delta
* move BootNode
* update BootNode
* revert params
* update SlasherNode
* mask unused param
* update helpers
* update test runner
* go mod tidy
* remove unused fields
* re-arrange tests
* extract sync into its own method
* gazelle
* BeaconNode
* types/types.go
* BootNode
* gofmt
* remove unused argument
* remove redundant comment
* add deprecation comment
* types comment
* remove deprecated method
* BeaconNodes -> BeaconNodeSet
* make sure that slasher is required component
* update StartBeaconNodeSet() and StartValidatorNodeSet()
* update SlasherNodeSet
* gazelle
* update connectivity tests
* Nishant's suggestion
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-27 00:33:50 +00:00
terence tsao
5f2f53a0a6
Harden beacon state interface for Altair ( #8673 )
...
* State: clean up
* Add error to return signature
* Remove SetCurrentEpochAttestations and SetPreviousEpochAttestations
* Fix tests
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-26 18:15:03 +00:00