This repository has been archived by the owner on Jul 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
ProposerSlashing.proposal_signature_1
and `ProposerSlashing.pr…
…oposal_signature_2` into per `Proposal`'s `signature`
- Loading branch information
Showing
8 changed files
with
45 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,31 @@ | ||
import ssz | ||
from ssz.sedes import ( | ||
bytes_sedes, | ||
uint64, | ||
) | ||
|
||
from .proposal import Proposal | ||
from eth2.beacon.typing import ( | ||
BLSSignature, | ||
ValidatorIndex, | ||
) | ||
from eth2.beacon.constants import EMPTY_SIGNATURE | ||
|
||
|
||
class ProposerSlashing(ssz.Serializable): | ||
|
||
fields = [ | ||
# Proposer index | ||
('proposer_index', uint64), | ||
# First proposal data | ||
# First proposal | ||
('proposal_1', Proposal), | ||
# First proposal signature | ||
('proposal_signature_1', bytes_sedes), | ||
# Second proposal data | ||
# Second proposal | ||
('proposal_2', Proposal), | ||
# Second proposal signature | ||
('proposal_signature_2', bytes_sedes), | ||
] | ||
|
||
def __init__(self, | ||
proposer_index: ValidatorIndex, | ||
proposal_1: Proposal, | ||
proposal_2: Proposal, | ||
# default arguments follow non-default arguments | ||
proposal_signature_1: BLSSignature = EMPTY_SIGNATURE, | ||
proposal_signature_2: BLSSignature = EMPTY_SIGNATURE) -> None: | ||
proposal_2: Proposal) -> None: | ||
super().__init__( | ||
proposer_index=proposer_index, | ||
proposal_1=proposal_1, | ||
proposal_2=proposal_2, | ||
proposal_signature_1=proposal_signature_1, | ||
proposal_signature_2=proposal_signature_2, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters