Skip to content

Commit 48be6ca

Browse files
authored
Merge pull request #1637 from ChihChengLiang/update-pubkey-length-uint256-to-uint384
Fix #1635, update pubkey and signature length: `uint256` to `uint384`
2 parents 7c4630d + f2b74f3 commit 48be6ca

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

eth/beacon/types/attestations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
)
1010

1111
from eth.rlp.sedes import (
12-
uint256,
12+
uint384,
1313
)
1414

1515

@@ -29,7 +29,7 @@ class Attestation(rlp.Serializable):
2929
# Proof of custody bitfield
3030
('custody_bitfield', binary),
3131
# BLS aggregate signature
32-
('aggregate_sig', CountableList(uint256)),
32+
('aggregate_sig', CountableList(uint384)),
3333
]
3434

3535
def __init__(self,

eth/beacon/types/blocks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from eth.rlp.sedes import (
1818
hash32,
1919
uint64,
20-
uint256,
20+
uint384,
2121
)
2222
from eth.beacon.utils.hash import hash_eth2
2323

@@ -62,7 +62,7 @@ class BaseBeaconBlock(rlp.Serializable):
6262
('state_root', hash32),
6363
('randao_reveal', hash32),
6464
('candidate_pow_receipt_root', hash32),
65-
('signature', CountableList(uint256)),
65+
('signature', CountableList(uint384)),
6666

6767
#
6868
# Body

eth/beacon/types/deposit_input.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from eth.rlp.sedes import (
1414
hash32,
15-
uint256,
15+
uint384,
1616
)
1717

1818

@@ -22,9 +22,9 @@ class DepositInput(rlp.Serializable):
2222
"""
2323
fields = [
2424
# BLS pubkey
25-
('pubkey', uint256),
25+
('pubkey', uint384),
2626
# BLS proof of possession (a BLS signature)
27-
('proof_of_possession', CountableList(uint256)),
27+
('proof_of_possession', CountableList(uint384)),
2828
# Withdrawal credentials
2929
('withdrawal_credentials', hash32),
3030
# Initial RANDAO commitment

eth/beacon/types/exits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from eth.rlp.sedes import (
77
uint24,
88
uint64,
9-
uint256,
9+
uint384,
1010
)
1111

1212

@@ -20,7 +20,7 @@ class Exit(rlp.Serializable):
2020
# Index of the exiting validator
2121
('validator_index', uint24),
2222
# Validator signature
23-
('signature', CountableList(uint256)),
23+
('signature', CountableList(uint384)),
2424
]
2525

2626
def __init__(self,

eth/beacon/types/proposer_slashings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
)
66
from eth.rlp.sedes import (
77
uint24,
8-
uint256,
8+
uint384,
99
)
1010
from .proposal_signed_data import ProposalSignedData
1111

@@ -17,11 +17,11 @@ class ProposerSlashing(rlp.Serializable):
1717
# First proposal data
1818
('proposal_data_1', ProposalSignedData),
1919
# First proposal signature
20-
('proposal_signature_1', CountableList(uint256)),
20+
('proposal_signature_1', CountableList(uint384)),
2121
# Second proposal data
2222
('proposal_data_2', ProposalSignedData),
2323
# Second proposal signature
24-
('proposal_signature_2', CountableList(uint256)),
24+
('proposal_signature_2', CountableList(uint384)),
2525
]
2626

2727
def __init__(self,

eth/beacon/types/slashable_vote_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
)
88
from eth.rlp.sedes import (
99
uint24,
10-
uint256,
10+
uint384,
1111
)
1212
from .attestation_data import AttestationData
1313

@@ -24,7 +24,7 @@ class SlashableVoteData(rlp.Serializable):
2424
# Attestation data
2525
('data', AttestationData),
2626
# Aggregate signature
27-
('aggregate_signature', CountableList(uint256)),
27+
('aggregate_signature', CountableList(uint384)),
2828
]
2929

3030
def __init__(self,

eth/beacon/types/validator_records.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
)
99
from eth.rlp.sedes import (
1010
uint64,
11-
uint256,
11+
uint384,
1212
hash32,
1313
)
1414

@@ -25,7 +25,7 @@ class ValidatorRecord(rlp.Serializable):
2525
"""
2626
fields = [
2727
# BLS public key
28-
('pubkey', uint256),
28+
('pubkey', uint384),
2929
# Withdrawal credentials
3030
('withdrawal_credentials', hash32),
3131
# RANDAO commitment

0 commit comments

Comments
 (0)