Skip to content

Commit

Permalink
remove special MEV graffiti
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec committed Jul 28, 2022
1 parent b1c3afa commit 7780e21
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions beacon_chain/validators/validator_duties.nim
Original file line number Diff line number Diff line change
Expand Up @@ -592,13 +592,6 @@ proc getBlindedBeaconBlock(

return ok blindedBlock

# TODO temporary, don't merge with this still here
func mevGraffitiBytes(): GraffitiBytes =
const graffitiBytes =
toBytes("Nimbus-MEV/v" & versionAsStr & "-" & gitRevision)
static: doAssert graffitiBytes.len <= MAX_GRAFFITI_SIZE
distinctBase(result)[0 ..< graffitiBytes.len] = graffitiBytes

proc proposeBlockMEV(
node: BeaconNode, head: BlockRef, validator: AttachedValidator, slot: Slot,
randao: ValidatorSig, validator_index: ValidatorIndex):
Expand Down Expand Up @@ -630,7 +623,7 @@ proc proposeBlockMEV(
getFieldNames(ExecutionPayloadHeader))

let newBlock = await makeBeaconBlockForHeadAndSlot(
node, randao, validator_index, mevGraffitiBytes(), head, slot,
node, randao, validator_index, node.graffitiBytes, head, slot,
execution_payload = Opt.some shimExecutionPayload,
transactions_root = Opt.some executionPayloadHeader.get.transactions_root,
execution_payload_root =
Expand Down Expand Up @@ -672,9 +665,6 @@ proc proposeBlockMEV(

const httpOk = 200
if unblindedPayload.status == httpOk:
debug "proposeBlockMEV: submitBlindedBlock succeeded",
slot, head = shortLog(head), validator_index, blindedBlock

if hash_tree_root(
blindedBlock.get.message.body.execution_payload_header) !=
hash_tree_root(unblindedPayload.data.data):
Expand Down Expand Up @@ -1229,6 +1219,8 @@ proc registerValidators(node: BeaconNode) {.async.} =
builderStatus = restBuilderStatus
return

# TODO split this across slots of epoch to support larger numbers of
# validators
# https://github.com/ethereum/builder-specs/blob/v0.2.0/specs/validator.md#validator-registration
var validatorRegistrations: seq[SignedValidatorRegistrationV1]
for validator in node.attachedValidators[].validators.values:
Expand Down

0 comments on commit 7780e21

Please sign in to comment.