* Enable gocognit linter
Currently the gocognit complexity threshold is set to 95 to make
sure no existing files will fail the linter. In future we will
reduce this threshold to a much lower one.
The recommended threshold is usually 30. Our code base has maximum
of 97 right now...But it's better late than never to pay attention
to our code compexity.
* Test to see github complains
* Resume to 97
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Fix default mainnet log when using chain config
Add a log to specify the use of a chain-config-file rather than
defaulting to that of mainnet.
Related to #10821.
* Add more specific log message
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* enable dev on Ropsten
* include only vectorized HTR and doublylinkedtree
* error handling
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* adding splitRoots, refactor to use it
* use splitRoots & work in roots only
the most common use case for this method is to get a list of
candidate roots and check if they are canonical. there isn't a great
reason to look up all the non-canonical blocks, because forkchoice
checks based on the root only, so just return roots and defer the
responsibility of resolving those to full blocks.
* update comment
* clean up shadowing
* more clear non-error return
* add test case for single root in index slot
* fmt
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* s
* s
* typo
* typo
* s
* s
* fixes based on PR feedback
* PR feedback
* reverting log changes
* adding flag per feedback
* conventions
* main fixes
* Update cmd/beacon-chain/jwt/jwt.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/beacon-chain/jwt/jwt.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* s
* tests
* test attempt
* test
* Update cmd/beacon-chain/jwt/jwt.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* err fix
* s
* further simplify
* cleanup
* namefix
* tests pass
* gaz
* rem deadcode
* Gaz
* shorthand
* naming
* test pass
* dedup
* success
* Ignore jwt.hex file
* logrus
* feedback
* junk
* Also check that no file was written
* local run config
* small fix
* jwt
* testfix
* s
* disabling test
* reverting main changes
* main revert
* removing temp folder
* comment
* gaz
* clarity
* rem
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* add it in
* support jwt secret
* fix it
* fix
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Integrate builder client into builder service
* Do nothing if pubkey is not found
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Startinb builder service and interface
* Get header from builder
* Add get builder block
* Single validator registration
* Add mev-builder http cli flag
* Add method to verify registration signature
* Add builder registration
* Add submit validator registration
* suporting yaml
* fix yaml unmarshaling
* rolling back some changes from unmarshal from file
* adding yaml support
* adding register validator support
* added new validator requests into client/validator
* fixing gofmt
* updating flags and including gas limit, unit tests are still broken
* fixing bazel
* more name changes and fixing unit tests
* fixing unit tests and renaming functions
* fixing unit tests and renaming to match changes
* adding new test for yaml
* fixing bazel linter
* reverting change on validator service proto
* adding clarifying logs
* renaming function name to be more descriptive
* renaming variable
* rolling back some files that will be added from the builder-1 branch
* reverting more
* more reverting
* need placeholder
* need placeholder
* fixing unit test
* fixing unit test
* fixing unit test
* fixing unit test
* fixing more unit tests
* fixing more unit tests
* rolling back mockgen
* fixing bazel
* rolling back changes
* removing duplicate function
* fixing client mock
* removing unused type
* fixing missing brace
* fixing bad field name
* fixing bazel
* updating naming
* fixing bazel
* fixing unit test
* fixing bazel linting
* unhandled err
* fixing gofmt
* simplifying name based on feedback
* using corrected function
* moving default fee recipient and gaslimit to beaconconfig
* missing a few constant changes
* fixing bazel
* fixing more missed default renames
* fixing more constants in tests
* fixing bazel
* adding update proposer setting per epoch
* refactoring to reduce complexity
* adding unit test for proposer settings
* Update validator/client/validator.go
Co-authored-by: terencechain <terence@prysmaticlabs.com>
* trying out renaming based on feedback
* adjusting based on review comments
* making tests more appropriate
* fixing bazel
* updating flag description based on review feedback
* addressing review feedback
* switching to pushing at start of epoch for more time
* adding new unit test and properly throwing error
* switching keys in error to count
* fixing log variable
* resolving conflict
* resolving more conflicts
* adjusting error message
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* Only prune in newer finalization
* add regression test
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Enforce that every node descends from finalized node
* fix test
* fix conflict
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Change forkchoice API
doubly-linked-tree changes
* protoarray changes
* blockchain tests
* rebase and fix conflicts
* More blockchain fixes
* blockchain test fixes
* doubly linked tree changes again
* protoarray changes v2
* blockchain packages v2
* Radek's review
* Fix on batch processing
* Terence's review
* fill in at start
* Revert "fill in at start"
This reverts commit 8c11db063a02a59df8e0ac6d0af0c8923921dc76.
* wrap error message
* fill in before mutating the state
* wrap nil node errors
* handle unknown optimistic status on init sync
* rename insert function
* prune on batches only after forkchoice insertion
Co-authored-by: terencechain <terence@prysmaticlabs.com>
The beacon API specification states that the `validator_index` field of
the `fee_recipient` structure is a quoted string rather than a bare
integer. This fixes up the encoding to match the spec.
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
* HighestSlotBlocksBelow to return a single value
* HighestSlotBlocksBelow->HighestBlockBelowSlot
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>