* Update go-libp2p to 0.12.0
go-libp2p 0.12.0 made some significant changes to the stream interfaces around
stream closing:
* Close now closes in both directions and frees the stream. However, unlike
FullClose did, it doesn't _wait_ for the remote peer to respond with an EOF.
* To close for writing, call CloseWrite (like one would on a TCP connection, etc.).
This patch:
* Replaces calls to FullClose with Close where appropriate.
* Replaces calls to Close with CloseWrite where appropriate.
* Removes redundant Close calls.
* Calls Reset to where appropriate to indicate that the request/response was
aborted. Unlike Close, this will not flush and will not cause the remote peer
to read an EOF. Instead, the remote peer will read an ErrReset error.
* Ensures we always either close or reset streams. Send wasn't closing the
stream on some error paths.
* Now that stream closing is async, we explicitly wait for a response when
"hanging up" on a peer (so we don't hang up before they receive our
response/goodbye message).
* update bazel
* Gazelle
* revert unintentional bazel workspace change
* appease an overzealous linter
* update to latest
* Refactor encoder
* gazelle
* Gazelle
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* 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
* Resolve panic on shutdown with offline eth1 node
* Move fix tne right place nishant feedback
* fix log message
Co-authored-by: Nishant Das <nishdas93@gmail.com>
* 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>
* Update blst to v0.3.1 and incorporate subgroup changes
* go mod tidy
* gofmt
* Update bzl blst dependency
* Remove unnecessary check for nil
* Run bazel run //:gazelle -- fix
* Update blst to v0.3.2
* fix sha
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.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>