Merge pull request #3880 from ethDreamer/capella
Sign BlsToExecutionChange w/ GENESIS_FORK_VERSION
This commit is contained in:
commit
f47fc9ddf3
@ -1215,13 +1215,26 @@ impl<T: BeaconChainTypes> Worker<T> {
|
|||||||
"peer" => %peer_id,
|
"peer" => %peer_id,
|
||||||
"error" => ?e
|
"error" => ?e
|
||||||
);
|
);
|
||||||
self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Reject);
|
// We ignore pre-capella messages without penalizing peers.
|
||||||
|
if matches!(e, BeaconChainError::BlsToExecutionChangeBadFork(_)) {
|
||||||
|
self.propagate_validation_result(
|
||||||
|
message_id,
|
||||||
|
peer_id,
|
||||||
|
MessageAcceptance::Ignore,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
// We penalize the peer slightly to prevent overuse of invalids.
|
// We penalize the peer slightly to prevent overuse of invalids.
|
||||||
|
self.propagate_validation_result(
|
||||||
|
message_id,
|
||||||
|
peer_id,
|
||||||
|
MessageAcceptance::Reject,
|
||||||
|
);
|
||||||
self.gossip_penalize_peer(
|
self.gossip_penalize_peer(
|
||||||
peer_id,
|
peer_id,
|
||||||
PeerAction::HighToleranceError,
|
PeerAction::HighToleranceError,
|
||||||
"invalid_bls_to_execution_change",
|
"invalid_bls_to_execution_change",
|
||||||
);
|
);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -161,10 +161,9 @@ pub fn bls_execution_change_signature_set<'a, T: EthSpec>(
|
|||||||
signed_address_change: &'a SignedBlsToExecutionChange,
|
signed_address_change: &'a SignedBlsToExecutionChange,
|
||||||
spec: &'a ChainSpec,
|
spec: &'a ChainSpec,
|
||||||
) -> Result<SignatureSet<'a>> {
|
) -> Result<SignatureSet<'a>> {
|
||||||
let domain = spec.get_domain(
|
let domain = spec.compute_domain(
|
||||||
state.current_epoch(),
|
|
||||||
Domain::BlsToExecutionChange,
|
Domain::BlsToExecutionChange,
|
||||||
&state.fork(),
|
spec.genesis_fork_version,
|
||||||
state.genesis_validators_root(),
|
state.genesis_validators_root(),
|
||||||
);
|
);
|
||||||
let message = signed_address_change.message.signing_root(domain);
|
let message = signed_address_change.message.signing_root(domain);
|
||||||
|
Loading…
Reference in New Issue
Block a user