Skip to content

Commit

Permalink
remove unnecessary Builder API status endpoint usage (#5518)
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec authored Oct 23, 2023
1 parent a986a1b commit b2e81de
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions beacon_chain/spec/mev/rest_capella_mev_calls.nim
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ proc registerValidator*(body: seq[SignedValidatorRegistrationV1]
## https://github.com/ethereum/builder-specs/blob/v0.3.0/apis/builder/validators.yaml
## https://github.com/ethereum/beacon-APIs/blob/v2.3.0/apis/validator/register_validator.yaml

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

proc getHeaderCapella*(slot: Slot,
parent_hash: Eth2Digest,
pubkey: ValidatorPubKey
Expand Down
12 changes: 0 additions & 12 deletions beacon_chain/validators/beacon_validators.nim
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const
delayBuckets = [-Inf, -4.0, -2.0, -1.0, -0.5, -0.1, -0.05,
0.05, 0.1, 0.5, 1.0, 2.0, 4.0, 8.0, Inf]

BUILDER_STATUS_DELAY_TOLERANCE = 3.seconds
BUILDER_VALIDATOR_REGISTRATION_DELAY_TOLERANCE = 6.seconds

# Metrics for tracking attestation and beacon block loss
Expand Down Expand Up @@ -1682,17 +1681,6 @@ proc registerValidatorsPerBuilder(
payloadBuilderAddress, epoch
return

let restBuilderStatus = awaitWithTimeout(payloadBuilderClient.checkBuilderStatus(),
BUILDER_STATUS_DELAY_TOLERANCE):
debug "Timeout when obtaining builder status"
return

if restBuilderStatus.status != HttpOk:
warn "registerValidators: specified builder or relay not available",
builderUrl = node.config.payloadBuilderUrl,
builderStatus = restBuilderStatus
return

const emptyNestedSeq = @[newSeq[SignedValidatorRegistrationV1](0)]
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#validator-registration
# Seed with single empty inner list to avoid special cases
Expand Down

0 comments on commit b2e81de

Please sign in to comment.