Skip to content

Commit b54a03a

Browse files
cheatfatezah
authored andcommitted
Fix MEV builder file descriptor leaks.
1 parent 47c4a2f commit b54a03a

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

beacon_chain/nimbus_beacon_node.nim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,9 +710,7 @@ proc init*(T: type BeaconNode,
710710

711711
let payloadBuilderRestClient =
712712
if config.payloadBuilderEnable:
713-
RestClientRef.new(
714-
config.payloadBuilderUrl,
715-
httpFlags = {HttpClientFlag.NewConnectionAlways}).valueOr:
713+
RestClientRef.new(config.payloadBuilderUrl).valueOr:
716714
warn "Payload builder REST client setup failed",
717715
payloadBuilderUrl = config.payloadBuilderUrl
718716
nil

beacon_chain/spec/mev/rest_bellatrix_mev_calls.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export chronos, client, rest_types, eth2_rest_serialization
1818
proc registerValidator*(body: seq[SignedValidatorRegistrationV1]
1919
): RestPlainResponse {.
2020
rest, endpoint: "/eth/v1/builder/validators",
21-
meth: MethodPost.}
21+
meth: MethodPost, connection: {Dedicated, Close}.}
2222
## https://github.com/ethereum/builder-specs/blob/v0.2.0/apis/builder/validators.yaml
2323
## https://github.com/ethereum/beacon-APIs/blob/master/apis/validator/register_validator.yaml
2424

@@ -27,16 +27,16 @@ proc getHeader*(slot: Slot,
2727
pubkey: ValidatorPubKey
2828
): RestResponse[GetHeaderResponse] {.
2929
rest, endpoint: "/eth/v1/builder/header/{slot}/{parent_hash}/{pubkey}",
30-
meth: MethodGet.}
30+
meth: MethodGet, connection: {Dedicated, Close}.}
3131
## https://github.com/ethereum/builder-specs/blob/v0.2.0/apis/builder/header.yaml
3232

3333
proc submitBlindedBlock*(body: SignedBlindedBeaconBlock
3434
): RestResponse[SubmitBlindedBlockResponse] {.
3535
rest, endpoint: "/eth/v1/builder/blinded_blocks",
36-
meth: MethodPost.}
36+
meth: MethodPost, connection: {Dedicated, Close}.}
3737
## https://github.com/ethereum/builder-specs/blob/v0.2.0/apis/builder/blinded_blocks.yaml
3838

3939
proc checkBuilderStatus*(): RestPlainResponse {.
4040
rest, endpoint: "/eth/v1/builder/status",
41-
meth: MethodGet.}
41+
meth: MethodGet, connection: {Dedicated, Close}.}
4242
## https://github.com/ethereum/builder-specs/blob/v0.2.0/apis/builder/status.yaml

0 commit comments

Comments
 (0)