* Add static analysis for unsafe uint casting
* Fix violations of uintcast
* go mod tidy
* Add exclusion to nogo for darwin build
* Add test for math.Int
* Move some things to const so they are assured not to exceed int64
* Self review
* lint
* fix tests
* fix test
* Add init check for non 64 bit OS
* Move new deps from WORKSPACE to deps.bzl
* fix bazel build for go analysis runs
* Update BUILD.bazel
Remove TODO
* add math.AddInt method
* Add new test casts
* Add case where builtin functions and declared functions are covered
* Fix new findings
* cleanup
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
* fix TestLockUnlock_CleansUnused
* fix TestSyncHandlers_WaitTillSynced
The test is failing silently (while go test showing 'PASS') due to panic caused by feed type mismatch. As a result, intended testing logic is not exercised at all. There are a couuple fixes here:
1. fix the feed event type to be pointer
2. add seendCache to avoid nil pointer panic
3. fill block in beaconDB so validateBeaconBlockPubSub gets short cut
4. replace time.Sleep() with deterministic channel waiting
* handle cancel func
* return interface from testing/util
* remove usages of v1
* return interface from InitializeFromProto
* return interface from InitializeFromProto
* fix test
* fix interface visibility
* more fixes
* use InitializeFromProtoUnsafe in testing/util
* return early error from mock
* v2
* fix tests
* remove unnecessary assertion
* use struct in nil state test
* Revert "Auxiliary commit to revert individual files from 6bb528c2c5df2446ad18450009f63f44318d41a9"
This reverts commit 7d70238a301209f6dbfc8ff1d81b16e33b0bd67d.
* use struct in sync committee test
* v3
* use InitializeFromProtoUnsafe in mock
* use version information
* Revert "Auxiliary commit to revert individual files from 6bb528c2c5df2446ad18450009f63f44318d41a9"
This reverts commit 5d5e6f2884d21caec7530c16ad2a0d0d27c44aa1.
* revert changes to ClearPreGenesisData
* fix build error
* remove error from PreGenesisState
* bzl
* deprecate all of it
* handle empty slice
* fix bad bug
* fix it
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Value assigned to a variable is never read before being overwritten
* The result of append is not used anywhere
* Suspicious assignment of range-loop vars detected
* Unused method receiver detected
* Revert "Auxiliary commit to revert individual files from 54edcb445484a2e5d79612e19af8e949b8861253"
This reverts commit bbd1e1beabf7b0c5cfc4f514dcc820062ad6c063.
* Method modifies receiver
* Fix test
* Duplicate imports detected
* Incorrectly formatted error string
* Types of function parameters can be combined
* One more "Unused method receiver detected"
* Unused parameter detected in function
* Event support for `contribution_and_prrof`
* event test
* fix panic in tests
* fix
* Revert "Auxiliary commit to revert individual files from dc8d01a15f0056c1fb48733219feab6461f71695"
This reverts commit f5f198564079781f80e1a045cefad7c27f89af25.
* remove receiver
* revive test
* move sending events to sync package
* remove receiver
* remove notification test
* build file
* notifier tests
* revert removal of exit event in API
* simplify exit test
* send notification in contribution API method
* test fix
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Add errcheck linter
* Check unchecked error
* Add gosimple linter
* Remove type assertion to same type
* Omit nil check
len() for nil slices is defined as zero
* Revert "Remove type assertion to same type"
This reverts commit af69ca1ac8a4f0243a5ccaf5042dbebad6d2cf1c.
* Revert "Revert "Remove type assertion to same type""
This reverts commit 5fe8931504fa22347d04d3d06558e5f478f5bf50.
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Use target root for pending attestations instead of unrelated one
* remove unnecessary block saves
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* add process slashings
* verify sig
* add method
* add test
* add in process slashings functionality
* target state for aggregate
* comment
* Radek comments
* Move domain function and all signing root functions from beacon-chain/core/helpers to beacon-chain/core
* @terencechain suggestion to put these methods under core/signing