diff --git a/eth2/beacon/types/deposits.py b/eth2/beacon/types/deposits.py index 5fb85fbb53..63c0bd3717 100644 --- a/eth2/beacon/types/deposits.py +++ b/eth2/beacon/types/deposits.py @@ -7,7 +7,7 @@ ) import ssz from ssz.sedes import ( - List, + Vector, bytes32, uint64, ) @@ -24,7 +24,7 @@ class Deposit(ssz.Serializable): fields = [ # Merkle branch in the deposit tree - ('proof', List(bytes32)), + ('proof', Vector(bytes32, 1)), # Index in the deposit tree ('index', uint64), # Deposit data diff --git a/tests/eth2/beacon/conftest.py b/tests/eth2/beacon/conftest.py index 28039f721e..0555e79de2 100644 --- a/tests/eth2/beacon/conftest.py +++ b/tests/eth2/beacon/conftest.py @@ -21,6 +21,7 @@ ) from eth2.beacon.types.attestation_data import AttestationData from eth2.beacon.types.crosslink_records import CrosslinkRecord +from eth2.beacon.types.deposits import Deposit from eth2.beacon.types.deposit_data import DepositData from eth2.beacon.types.deposit_input import DepositInput from eth2.beacon.types.eth1_data import Eth1Data @@ -76,6 +77,10 @@ def override_length(config): for key, value in historical_batch_vector_dict.items(): HistoricalBatch._meta.container_sedes.field_name_to_sedes[key].length = value + Deposit._meta.container_sedes.field_name_to_sedes['proof'].length = ( + config.DEPOSIT_CONTRACT_TREE_DEPTH + ) + @pytest.fixture(scope="session") def privkeys():