Victor Farazdagi
648e360842
Refactor shared/testutil/spectest.go ( #8800 )
...
* Refactor shared/testutil/spectest
* update operations
* update epoch_processing
* rename spectest.go
2021-04-22 16:34:00 +00:00
Victor Farazdagi
23ff14c34b
Move spectests into a separate package ( #8798 )
...
* move general/phase0/bls tests
* phase0/operations tests
* phase0/sanity/blocks
* fix import
* phase0/sanity/slots
* phase0/sanity/slots minimal
* phase0/epoch_processing tests
* phase0/rewards tests
* simplify
* more simplification
* phase0/shuffling tests
* phase0/ssz_static tests
* spectest/utils
* fix build
* readme
* update test sizes
* update readme
2021-04-22 14:53:30 +00:00
Kevin Lu
e52df323f7
Added public/private flags for IP address white/blacklisting ( #8648 )
...
* Added public/private flags for IP address white/blacklisting
* Provided reference docs for private IP address ranges
* Formatting changes and inline comments for private ip address specification
* @nisdas feedback, commentary fixes
* Added in inverse case where we allow for private address
* changed helper function to take in multiaddr Action as argument, syntax changes for control logic
* minor refactoring to control flow of configFilter and private addr filter helper function
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2021-04-21 06:25:30 +00:00
Victor Farazdagi
823f7c99d2
Update spec tests ( #8792 )
...
* update path to minimal tests
* update specs testutils
* fix attestation_test
* attester_slashing_test
* fix block_header_test
* block_processing_minimal
* core/blocks minimal spectests
* epoch_processing minimal spectests
* slot_processing minimal spectests
* bls spectests
* update mainnet tests
* fix remaining tests
* gazelle
2021-04-20 23:54:06 +00:00
Raul Jordan
711f527efb
Amend E2E Test Path ( #8793 )
2021-04-20 16:54:38 +00:00
Raul Jordan
af8f444166
Upgrade Bazel Go-Ethereum ( #8791 )
...
* upgrade bazel go ethereum
* tidy
2021-04-20 15:28:07 +00:00
Raul Jordan
2634430f67
Update Go-Ethereum Dependency ( #8788 )
2021-04-20 06:57:26 -07:00
terence tsao
70dc22aa9a
Fix redundant err check ( #8790 )
2021-04-20 02:25:16 +00:00
Everest Stefan Munro-Zeisberger
ad269ee147
Set up Prysm for fuzz testing on Fuzzbuzz ( #8789 )
...
* Wrap beacon fuzz tests in go-fuzz compatible test functions
* Add fuzzbuzz.yaml
2021-04-19 19:00:46 +00:00
Nishant Das
cff7dbd015
Add Eth1 Header Timestamp Check ( #8771 )
...
* add time check
* unit test
* fix
* Update beacon-chain/powchain/service.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-04-17 13:55:41 +00:00
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
Victor Farazdagi
59ee339497
Move TestMain into dedicated file ( #8779 )
...
* Move TestMain into dedicated file
* update db_test
* formatting
2021-04-16 16:25:28 +00:00
Radosław Kapka
c53d0e1c5f
Codecov: ignore testing
directories ( #8777 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-04-16 08:44:36 -05:00
Raul Jordan
02a8ae7f36
Validator RPC Accounts Voluntary Exit ( #8776 )
...
* begin voluntary exits RPC
* added in exit logic
* complete exit func
* revert
* capitalize
* revert
* import
* rpc voluntary exit test
* fmt
2021-04-16 09:46:38 +02:00
terence tsao
a4ff97d24b
Refactor signature function's argument ( #8773 )
2021-04-15 11:35:53 -07:00
Victor Farazdagi
3d3b9d1217
Spec checker tool ( #8722 )
...
* Add specdocs static code analyzer
* docs pulling script
* update content pulling script
* add test
* better parsing of incoming docs
* update test
* implements analyzer
* separate tool
* remove analyzer code
* cleanup
* deep source fixes
* untrack raw specs files
* add back phase0 defs
* update spec texts
* re-arrange code
* updated spec list
* cleanup
* more comments and readme
* add merkle proofs specs
* add extra.md
* mark wrong length issue
* update readme
* update readme
* remove non-def snippets
* update comment
* check numrows
* ignore last empty line
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-15 14:54:07 +00: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
aba2ec9aac
Codecov: ignore all mock files ( #8768 )
2021-04-15 15:55:12 +08: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
Siddhant N Trivedi
04bc8a85ca
Add generated file to DeepSource exclude_patterns ( #8765 )
2021-04-14 14:06:25 +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
Radosław Kapka
902e3f4f53
Fix overriding network config in tests ( #8756 )
...
* Fix overriding network config in tests
* copy config in OverrideBeaconNetworkConfig
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-14 07:39:20 +00: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
Preston Van Loon
efbefaeb7c
CI: Use experimental_remote_asset_api ( #8761 )
2021-04-13 17:18:47 +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
Preston Van Loon
fda003288d
CI: minimal remote downloads, strict action environment ( #8760 )
2021-04-13 15:45:43 +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
97b4b86ddf
Update NextPowerOf2() and PrevPowerOf2() funcs ( #8751 )
...
* Update NextPowerOf2() and PrevPowerOf2() funcs
* gofmt
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 06:09:56 +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
Preston Van Loon
76e36b95f7
CI: Add remote build caching support ( #8748 )
2021-04-12 18:46:11 +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
Nishant Das
c65c6ebc38
Invert BLST Go Tag ( #8725 )
...
* invert go tag
* fix rc
* try again
* Revert "try again"
This reverts commit 70ff7658b7cbc43b903bac267f4d7c9833536f8b.
* fix fuzz
* Update shared/bls/blst/BUILD.bazel
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: Victor Farazdagi <simple.square@gmail.com>
2021-04-11 11:11:15 +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