From 9eeb863ec6c7c29255634275f01b650b31ea0733 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Thu, 13 Dec 2018 03:11:53 +0800 Subject: [PATCH] Refactor `verify_slashable_vote_data` --- specs/core/0_beacon-chain.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index e69ed9f92..edecfd396 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1014,9 +1014,15 @@ def verify_slashable_vote_data(state: BeaconState, vote_data: SlashableVoteData) aggregate_pubkey([state.validators[i].pubkey for i in vote_data.aggregate_signature_poc_0_indices]), aggregate_pubkey([state.validators[i].pubkey for i in vote_data.aggregate_signature_poc_1_indices]) ] + vote_data_root = hash_tree_root(vote_data) + messages = [ + vote_data_root + bytes1(0), + vote_data_root + bytes1(1) + ] return bls_verify_multiple( pubkeys=pubs, - messages=[hash_tree_root(vote_data)+bytes1(0), hash_tree_root(vote_data)+bytes1(1)],signature=vote_data.aggregate_signature, + messages=messages, + signature=vote_data.aggregate_signature, domain=DOMAIN_ATTESTATION, ) ```