Fix MEV builder file descriptor leaks.

This commit is contained in:
cheatfate 2022-10-13 14:38:33 +03:00
parent 23cf8e9b22
commit f9468ecc24
No known key found for this signature in database
GPG Key ID: 46ADD633A7201F95
3 changed files with 6 additions and 8 deletions

View File

@ -710,9 +710,7 @@ proc init*(T: type BeaconNode,
let payloadBuilderRestClient =
if config.payloadBuilderEnable:
RestClientRef.new(
config.payloadBuilderUrl,
httpFlags = {HttpClientFlag.NewConnectionAlways}).valueOr:
RestClientRef.new(config.payloadBuilderUrl).valueOr:
warn "Payload builder REST client setup failed",
payloadBuilderUrl = config.payloadBuilderUrl
nil

View File

@ -18,7 +18,7 @@ export chronos, client, rest_types, eth2_rest_serialization
proc registerValidator*(body: seq[SignedValidatorRegistrationV1]
): RestPlainResponse {.
rest, endpoint: "/eth/v1/builder/validators",
meth: MethodPost.}
meth: MethodPost, connection: {Dedicated, Close}.}
## https://github.com/ethereum/builder-specs/blob/v0.2.0/apis/builder/validators.yaml
## https://github.com/ethereum/beacon-APIs/blob/master/apis/validator/register_validator.yaml
@ -27,16 +27,16 @@ proc getHeader*(slot: Slot,
pubkey: ValidatorPubKey
): RestResponse[GetHeaderResponse] {.
rest, endpoint: "/eth/v1/builder/header/{slot}/{parent_hash}/{pubkey}",
meth: MethodGet.}
meth: MethodGet, connection: {Dedicated, Close}.}
## https://github.com/ethereum/builder-specs/blob/v0.2.0/apis/builder/header.yaml
proc submitBlindedBlock*(body: SignedBlindedBeaconBlock
): RestResponse[SubmitBlindedBlockResponse] {.
rest, endpoint: "/eth/v1/builder/blinded_blocks",
meth: MethodPost.}
meth: MethodPost, connection: {Dedicated, Close}.}
## https://github.com/ethereum/builder-specs/blob/v0.2.0/apis/builder/blinded_blocks.yaml
proc checkBuilderStatus*(): RestPlainResponse {.
rest, endpoint: "/eth/v1/builder/status",
meth: MethodGet.}
meth: MethodGet, connection: {Dedicated, Close}.}
## https://github.com/ethereum/builder-specs/blob/v0.2.0/apis/builder/status.yaml

2
vendor/nim-presto vendored

@ -1 +1 @@
Subproject commit 545849eebe62f1e0c747d93ea330562be6d44455
Subproject commit 8bc34dd6f60b6bfe22049323100355671e4137a2