Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow beacon api req/res to use JSON #21

Merged
merged 1 commit into from
Apr 10, 2024
Merged

fix: allow beacon api req/res to use JSON #21

merged 1 commit into from
Apr 10, 2024

Conversation

danyalprout
Copy link
Collaborator

Description

Currently when using the go-eth-2 client to fetch blob sidecars it results in an error when dividing the response into sections here.

@danyalprout danyalprout marked this pull request as ready for review April 10, 2024 20:49
@@ -19,7 +20,7 @@ func NewBeaconClient(ctx context.Context, cfg flags.BeaconConfig) (Client, error
cctx, cancel := context.WithCancel(ctx)
defer cancel()

c, err := http.New(cctx, http.WithAddress(cfg.BeaconURL), http.WithTimeout(cfg.BeaconClientTimeout))
c, err := http.New(cctx, http.WithAddress(cfg.BeaconURL), http.WithTimeout(cfg.BeaconClientTimeout), http.WithEnforceJSON(cfg.EnforceJSON), http.WithLogLevel(zerolog.ErrorLevel))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we make the log level configurable? is error level enough?

Copy link
Collaborator Author

@danyalprout danyalprout Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logs that this client outputs are mostly duplicated with the service logs (e.g. here).

It also doesn't hook into oplog and as such don't format nicely -- so I figured it was worth preferring the services logs over the libraries.

That being said -- I don't have a strong opinion here. Happy to keep them in if you prefer.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust your judgement here. thanks!

@danyalprout danyalprout merged commit 2143b8a into master Apr 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants