* implement validator logs stream
* fix test
* tidy
* proto regen
* add logs stream to the beacon node
* beacon logs working
* impl
* pass test
* gaz
* rem lock
* fix space
* Don't use fraction, use different fields
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Go fmt
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* small fixes in logs and errors
* fix error message in test
* found a period hiding in an error message
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* patch beacon node
* make sure that check is executed before anything else
* fix format
* make sure that check is reusable by other executables
* debug infor
* fix typo
* more debug info
* use copydir
* cleanup
* better explanation
* gazelle
* go fmt
* debug tos permissions
* upadte copydir
* gazelle
* better check of tos acceptance
* expand path
* update validator
* move fixing func
* move fixing method
* make sure that updater works both on main and subcommands
* remove from startnode
* add copydir test
* add DirFiles method and tests
* fix test
* add and test HashDir
* update tests
* fix test
* add datadir removal
* update messages
* further update messages
* att sign validations
* eliminate old cached methods and use a simple approach in the db
* redefined db methods
* db package builds
* add multilock to attest and propose
* gaz
* removed concurrency tests that are no longer relevant
* add cache to db functions for attesting history checks
* passing
* add in feature flag --disable-attesting-history-db-cache
* remove lock
* Revert "remove lock"
This reverts commit b1a65020e406b9fa6e4f57c5cc6a5a0b2a11a240.
* comment
* gaz
The reason of why a validator input was failing was very generic,
this allows the actual implementation to state why it failed by
passing the exception forward.
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update waiting validator methods to be context aware
* Enable debug logging for validator in e2e
* invert logic in deferred function, remove for loop
* return early if wait is 0 or less
* overwrite ctx
* t.Stop() chan closure is hanging. Doesnt make sense, so ignoring that cleanup task. It shouldnt happen at runtime anyway
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* restore beacon node db
* revert image name
* move restore out of the kv folder
* remove files from kv folder
* go mod tidy
* Remove usage of prometheus testutil
* add yes/no to prompt text
* restore slasher db
* organize imports
* go mod tidy
* restore validator db
* close slasher db
* defer close backup db in tests
* simplify function literal
* fix(grpcHeaders): accept values with equal signs
# What
Before this commit, it was not possible to pass in base64-encoded
content as a header value if it contained an equals sign. This commit
changes the behavior slightly. Rather than ignore key/value pairs where
the value happens to have an equals sign, we assume the first equals
sign delimits the key from the value and pass in the rest of the value
as-is.
Also, instead of printing the header name along with its value, we
print the name, so there is less risk of leaking information into logs
that shouldn't be there.
# Testing
This has not been tested in the context of the full validator client.
Instead, a small example was made to demonstrate the feasibility. The
example is shown here:
```go
package main
import (
"log"
"os"
"strings"
"github.com/davecgh/go-spew/spew"
"github.com/urfave/cli/v2"
)
type Config struct {
GrpcHeadersFlag string
}
func main() {
app := &cli.App{
Action: func(c *cli.Context) error {
for _, hdr := range strings.Split(c.String("grpc-headers"), ",") {
if hdr != "" {
ss := strings.Split(hdr, "=")
spew.Dump(ss[0])
spew.Dump(strings.Join(ss[1:], "="))
}
}
return nil
},
Flags: []cli.Flag{
&cli.StringFlag{
Name: "grpc-headers",
Usage: "A comma-separated list of key value pairs to pass as gRPC headers for all gRPC " +
"calls. Example: --grpc-headers=key=value",
},
},
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
Example invocation:
```command
❯ go run main.go --grpc-headers=key=value,Authorization="Basic $(echo -n hello:world | base64)"
(string) (len=3) "key"
(string) (len=5) "value"
(string) (len=13) "Authorization"
(string) (len=22) "Basic aGVsbG86d29ybGQ="
```
* Adds tests to new gRPC header parsing code
* bazel run //:gazelle
* Log attesting total
* Use the right library
* Go fmt
* Use fmt
* No space is better
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* disable-remote-signer-tls flag
* use flag in edit-config
* send requests without TLS
* change warning message
* fix account list output test
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
When validating account list, there was a missing space. This fixes that nitpick.
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* new web release
* site data update, add /logs to logs endpoints
* tests fixed
* test
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Replace highest with lowerest
* Update validator/db/kv/attestation_history_v2.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/db/kv/attestation_history_v2.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Invert equality for saveLowestSourceTargetToDB
* Save lowest epcohs at post signature update
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Add getters and setters for source and target epochs
* Use the correct ImportStandardProtectionJSON
* Add tests
* Fix buckets
* Fix source to target
* Update validator/slashing-protection/local/standard-protection-format/import.go
* Fix bytesutil.BytesToUint64BigEndian will return 0 if input is less than 8 bytes
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>