From 759af6734525d2f57747cb763a019cd2d2d5ea00 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Thu, 19 Mar 2020 19:22:57 +0100 Subject: [PATCH 1/2] Normalize attestation signature getter name --- specs/phase0/validator.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/phase0/validator.md b/specs/phase0/validator.md index 6ddbef81f..02d86313a 100644 --- a/specs/phase0/validator.md +++ b/specs/phase0/validator.md @@ -404,12 +404,12 @@ Set `attestation.data = attestation_data` where `attestation_data` is the `Attes ##### Aggregate signature -Set `attestation.signature = signed_attestation_data` where `signed_attestation_data` is obtained from: +Set `attestation.signature = attestation_signature` where `attestation_signature` is obtained from: ```python -def get_signed_attestation_data(state: BeaconState, attestation: IndexedAttestation, privkey: int) -> BLSSignature: - domain = get_domain(state, DOMAIN_BEACON_ATTESTER, attestation.data.target.epoch) - signing_root = compute_signing_root(attestation.data, domain) +def get_attestation_signature(state: BeaconState, attestation: AttestationData, privkey: int) -> BLSSignature: + domain = get_domain(state, DOMAIN_BEACON_ATTESTER, attestation.target.epoch) + signing_root = compute_signing_root(attestation, domain) return bls.Sign(privkey, signing_root) ``` From 2978f21a3929237a03db82b0fc9fd177e2cf38fc Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Thu, 19 Mar 2020 15:17:06 -0600 Subject: [PATCH 2/2] minor edit to validator get_attestation_signature --- specs/phase0/validator.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/phase0/validator.md b/specs/phase0/validator.md index 02d86313a..54cd19a93 100644 --- a/specs/phase0/validator.md +++ b/specs/phase0/validator.md @@ -407,9 +407,9 @@ Set `attestation.data = attestation_data` where `attestation_data` is the `Attes Set `attestation.signature = attestation_signature` where `attestation_signature` is obtained from: ```python -def get_attestation_signature(state: BeaconState, attestation: AttestationData, privkey: int) -> BLSSignature: - domain = get_domain(state, DOMAIN_BEACON_ATTESTER, attestation.target.epoch) - signing_root = compute_signing_root(attestation, domain) +def get_attestation_signature(state: BeaconState, attestation_data: AttestationData, privkey: int) -> BLSSignature: + domain = get_domain(state, DOMAIN_BEACON_ATTESTER, attestation_data.target.epoch) + signing_root = compute_signing_root(attestation_data, domain) return bls.Sign(privkey, signing_root) ```