Move back to using proposer_slots
This commit is contained in:
parent
138fcd6275
commit
78c00d3361
@ -117,14 +117,10 @@ where
|
|||||||
* RANDAO
|
* RANDAO
|
||||||
*/
|
*/
|
||||||
|
|
||||||
println!("proposer pubkey: {:?}", &block_proposer.pubkey);
|
|
||||||
ensure!(
|
ensure!(
|
||||||
bls_verify(
|
bls_verify(
|
||||||
&block_proposer.pubkey,
|
&block_proposer.pubkey,
|
||||||
// TODO: https://github.com/ethereum/eth2.0-specs/pull/496
|
&ssz_encode(&block_proposer.proposer_slots),
|
||||||
//
|
|
||||||
// &ssz_encode(&block_proposer.proposer_slots),
|
|
||||||
&ssz_encode(&block.slot),
|
|
||||||
&block.randao_reveal,
|
&block.randao_reveal,
|
||||||
get_domain(&state.fork_data, state.slot, DOMAIN_RANDAO)
|
get_domain(&state.fork_data, state.slot, DOMAIN_RANDAO)
|
||||||
),
|
),
|
||||||
|
@ -134,23 +134,16 @@ impl<T: SlotClock, U: BeaconNode, V: DutiesReader, W: Signer> BlockProducer<T, U
|
|||||||
/// slashing.
|
/// slashing.
|
||||||
fn produce_block(&mut self, slot: u64) -> Result<PollOutcome, Error> {
|
fn produce_block(&mut self, slot: u64) -> Result<PollOutcome, Error> {
|
||||||
let randao_reveal = {
|
let randao_reveal = {
|
||||||
/*
|
|
||||||
* TODO:
|
|
||||||
* https://github.com/ethereum/eth2.0-specs/pull/496
|
|
||||||
*
|
|
||||||
let producer_nonce = self.beacon_node.proposer_nonce(&self.pubkey)?;
|
let producer_nonce = self.beacon_node.proposer_nonce(&self.pubkey)?;
|
||||||
|
|
||||||
// TODO: add domain, etc to this message.
|
// TODO: add domain, etc to this message.
|
||||||
let message = ssz_encode(&producer_nonce);
|
let message = ssz_encode(&producer_nonce);
|
||||||
*/
|
|
||||||
// TODO: add domain, etc to this message.
|
|
||||||
let message = ssz_encode(&slot);
|
|
||||||
println!("validator randao: {:?}", &message);
|
|
||||||
match self.signer.bls_sign(&message) {
|
match self.signer.bls_sign(&message) {
|
||||||
None => return Ok(PollOutcome::SignerRejection(slot)),
|
None => return Ok(PollOutcome::SignerRejection(slot)),
|
||||||
Some(signature) => signature,
|
Some(signature) => signature,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
println!("validator pubkey: {:?}", &self.pubkey);
|
|
||||||
|
|
||||||
if let Some(block) = self
|
if let Some(block) = self
|
||||||
.beacon_node
|
.beacon_node
|
||||||
|
Loading…
Reference in New Issue
Block a user