There is a double lock race condition when NewSlot acquires the
checkpoints lock first and the nodes lock later, while calls to Head()
acquire the nodeslock first and the checkpoints lock later.
This PR releases the checkpoints lock in NewSlot, to reaquire it later
in updateUnrealizedCheckpoints after getting the nodes lock
* Upgrade Grail Bazel toolchain to latest release v0.7.2
This should allow Prysm to compile on Ubuntu 21.10 and 22.04
* Changes necessary in .bazelrc for new version of com_grail_bazel_toolchain
* Add cross compilation for OSX ARM64 (Apple Silicon)
* Update cross-toolchain README to include osx_arm64
* Add double quotes to shell code
* Rename install_clang_cross10.sh -> install_clang_cross.sh
* Update with prysmatic labs uploaded assets
* Touch README to trigger CI
* Revert "Touch README to trigger CI"
This reverts commit 826ac8a6d8da4fe0bd8503511b00576e50861850.
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
* adding in unit tests and updated error messaging
* returning errors correctly
* Update api/client/builder/client.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* updating based on comments
* fixing unit tests
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Logging: strip new lines and other control characters
* Use strings.Map and only sanitize the field value
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* This PR is for issue #11155 "Keymanager APIs: get_limit api".
This PR implements the first task "get gas limit for the validator key".
* Removed useless import alias.
* Added regenerated key_management.pb.go/pb.gw.go files as well as endpoint_factory.go changes.
* Address James's comments:
1. api path component should be "gas_limit" instead of "gaslimit".
2. ran curl test like:
- go build -o tmp/validator
- ./tmp/validator --web --validators-external-signer-url=http://localhost:9000/
- curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.C-BuVfWhKpr9elB05GTJdEEx_8AzkImxzXL03IqcHR8" 127.0.0.1:7500/eth/v1/validator/0xb4844195ce8ca78d9d4f7ffdf4001cfdb079e059542bcc4f45ddfff2bcec7defb1482db4f9426f92f59972da395dd2b5/gas_limit
- {"data":{"pubkey":"0xb4844195ce8ca78d9d4f7ffdf4001cfdb079e059542bcc4f45ddfff2bcec7defb1482db4f9426f92f59972da395dd2b5","gas_limit":"30000000"}}
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
* fixing stringslice issue and adding one more filter
* fixing linting and improving function based on feedback
* rolling back generic function to check ci
* adding function back in
* testing printing error
* reverting change
* Added gofmt detail flag
* temporary change
* Another flag added
* Revert changes
* Modifed entrypoint
* Another change
* Revert
* Change go image
* Added -e flag
* Switched to alpine image
* Switched go to strech
* Fix typo
* Yet another image added
* Added go alpine
* rolling back generic
* reverting version
* Update go.sum
reverting
* Update go.mod
reverting
* Update Dockerfile
rolling back
* Update entrypoint.sh
rolling back
* Update go.yml
reverting changes
* fixing flag for config
* reverting changes and moving change to another PR
* Update validator/node/node.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* updating based on review
* Update container/slice/slice.go
Co-authored-by: Taranpreet26311 <taran@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Forkchoice: expose if no tip is viable
This PR changes the behavior on when the node is considered optimistic.
A call to `blockchain.IsOptimistic()` relies solely on forkchoice, if
all tips are invalid, then it's optimistic. If the current headroot is
not in forkchoice then it's optimistic.
A call to `blockchain.IsOptimisticForRoot()` will return true if the
requested root is headroot and it's not found in forkchoice
* update comment
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* panic in SizeSSZ
* moving slowly
* adapt old code to new interfaces
* return interfaces from factory functions
* replace the rest of WrappedSignedBeaconBlock
* WrappedBeaconBlock
* WrappedBeaconBlockBody
* miscellaneous
* Test_BeaconBlockIsNil
* replace usages of BeaconBlockIsNil
* replace usages of mutator
* fix all build errors
* fix some more issues
* mutator changes
* relax assertions when initializing
* revert changes in object_mapping.go
* allow calling Proto on nil
* Revert "allow calling Proto on nil"
This reverts commit ecc84e455381b03d24aec2fa0fa17bddbec71705.
* modify Copy and Proto methods
* remove unused var
* fix block batch tests
* correct BUILD file
* Error when initializing nil objects
* one more error fix
* add missing comma
* rename alias to blocktest
* add logging
* error when SignedBeaconBlock is nil
* fix last test
* import fix
* broken
* working
* test fixes
* reduce complexity of processPendingBlocks
* simplified