mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Fix sig domain
This commit is contained in:
@@ -1250,7 +1250,11 @@ impl<T: SlotClock + 'static, E: EthSpec> ValidatorStore for LighthouseValidatorS
|
||||
validator_pubkey: PublicKeyBytes,
|
||||
envelope: ExecutionPayloadEnvelope<E>,
|
||||
) -> Result<SignedExecutionPayloadEnvelope<E>, Error> {
|
||||
let domain_hash = self.spec.get_builder_domain();
|
||||
let signing_context = self.signing_context(
|
||||
Domain::BeaconBuilder,
|
||||
envelope.slot.epoch(E::slots_per_epoch()),
|
||||
);
|
||||
let domain_hash = signing_context.domain_hash(&self.spec);
|
||||
let signing_root = envelope.signing_root(domain_hash);
|
||||
|
||||
// Execution payload envelope signing is not slashable, bypass doppelganger protection.
|
||||
|
||||
@@ -19,6 +19,7 @@ pub enum MessageType {
|
||||
SyncCommitteeSelectionProof,
|
||||
SyncCommitteeContributionAndProof,
|
||||
ValidatorRegistration,
|
||||
// TODO(gloas) verify w/ web3signer specs
|
||||
ExecutionPayloadEnvelope,
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ use eth2::{BeaconNodeHttpClient, StatusCode};
|
||||
use graffiti_file::{GraffitiFile, determine_graffiti};
|
||||
use logging::crit;
|
||||
use slot_clock::SlotClock;
|
||||
use types::consts::gloas::BUILDER_INDEX_SELF_BUILD;
|
||||
use std::fmt::Debug;
|
||||
use std::future::Future;
|
||||
use std::ops::Deref;
|
||||
@@ -14,6 +13,7 @@ use std::time::Duration;
|
||||
use task_executor::TaskExecutor;
|
||||
use tokio::sync::mpsc;
|
||||
use tracing::{Instrument, debug, error, info, info_span, instrument, trace, warn};
|
||||
use types::consts::gloas::BUILDER_INDEX_SELF_BUILD;
|
||||
use types::{BlockType, ChainSpec, EthSpec, Graffiti, Slot};
|
||||
use validator_store::{Error as ValidatorStoreError, SignedBlock, UnsignedBlock, ValidatorStore};
|
||||
|
||||
@@ -650,7 +650,10 @@ impl<S: ValidatorStore + 'static, T: SlotClock + 'static> BlockService<S, T> {
|
||||
let envelope = proposer_fallback
|
||||
.request_proposers_last(|beacon_node| async move {
|
||||
beacon_node
|
||||
.get_validator_execution_payload_envelope::<S::E>(slot, BUILDER_INDEX_SELF_BUILD)
|
||||
.get_validator_execution_payload_envelope::<S::E>(
|
||||
slot,
|
||||
BUILDER_INDEX_SELF_BUILD,
|
||||
)
|
||||
.await
|
||||
.map(|response| response.data)
|
||||
.map_err(|e| {
|
||||
|
||||
Reference in New Issue
Block a user