* 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>
* add in highest and lowest signed proposal
* begin adding tests
* add in db tests
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* minimal change to handle nil attesterHistoryByPubKey
* Revert "Always Update Attesting History If Not Slashable (#7935)"
This reverts commit 3cc2ebc5d5.
* remove unused functions
* move save before propose
* wait before go func
* move wait into the go routine
* handling map mutation
* remove map handling in this case
* log in case it is still not found
* fix log
* fix locks
* Update validator/client/attest_protect.go
* remove code duplication
* remove method extraction
* move metrics to their appropriate place
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* persist wallet password to wallet dir if onboarded via web
* add flag
* gaz
* add test
* fmt
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* even more cors
* auth fixes for web v1
* ensure web works
* include web ui v1 release
* new site data
* fmt
* test
* tests pass
* gaz
* build fix
* no ssz
* unused type
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Reduce no attestation in pool to warn
* Use NotFound
* Update validator/client/aggregate.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/client/aggregate.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>