diff --git a/beacon_chain/block_pools/candidate_chains.nim b/beacon_chain/block_pools/candidate_chains.nim index d859a804e..7b4eef987 100644 --- a/beacon_chain/block_pools/candidate_chains.nim +++ b/beacon_chain/block_pools/candidate_chains.nim @@ -647,7 +647,7 @@ proc updateStateData*(dag: CandidateChains, state: var StateData, bs: BlockSlot) let ok = dag.skipAndUpdateState( state, ancestors[i], - {skipBlsValidation, skipMerkleValidation, skipStateRootValidation}, + {skipBlsValidation, skipStateRootValidation}, false) doAssert ok, "Blocks in database should never fail to apply.." diff --git a/tests/mocking/mock_deposits.nim b/tests/mocking/mock_deposits.nim index 40f5952d0..5113aef4e 100644 --- a/tests/mocking/mock_deposits.nim +++ b/tests/mocking/mock_deposits.nim @@ -104,8 +104,8 @@ template mockGenesisDepositsImpl( ) = # Genesis deposits with varying amounts - # NOTE: this could also apply for skipMerkleValidation, but prefer to er on the - # side of caution and generate a valid Deposit (it can still be skipped later). + # NOTE: prefer to er on the side of caution and generate a valid Deposit + # (it can still be skipped later). if skipBlsValidation in flags: # 1st loop - build deposit data for valIdx in 0 ..< validatorCount.int: diff --git a/tests/test_interop.nim b/tests/test_interop.nim index 3c85de8d6..2a57e5da0 100644 --- a/tests/test_interop.nim +++ b/tests/test_interop.nim @@ -2,7 +2,7 @@ import unittest, stint, ./testutil, stew/byteutils, - ../beacon_chain/[extras, interop, ssz], + ../beacon_chain/[interop, merkle_minimal, ssz], ../beacon_chain/spec/[beaconstate, crypto, datatypes] # Interop test yaml, found here: @@ -146,13 +146,12 @@ suiteReport "Interop": for i in 0..<64: let privKey = makeInteropPrivKey(i) deposits.add makeDeposit(privKey.toPubKey(), privKey) + attachMerkleProofs(deposits) const genesis_time = 1570500000 var - # TODO this currently requires skipMerkleValidation to pass the test - # makeDeposit doesn't appear to produce a proof? initialState = initialize_beacon_state_from_eth1( - eth1BlockHash, genesis_time, deposits, {skipMerkleValidation}) + eth1BlockHash, genesis_time, deposits, {}) # https://github.com/ethereum/eth2.0-pm/tree/6e41fcf383ebeb5125938850d8e9b4e9888389b4/interop/mocked_start#create-genesis-state initialState.genesis_time = genesis_time diff --git a/tests/testblockutil.nim b/tests/testblockutil.nim index 66c3e6f5d..f9aeb6b7c 100644 --- a/tests/testblockutil.nim +++ b/tests/testblockutil.nim @@ -69,8 +69,7 @@ proc makeInitialDeposits*( # and ideally (but not yet) efficiently only once calculating a Merkle # tree utilizing as much of the shared substructure as feasible, means # attaching proofs all together, as a separate step. - if skipMerkleValidation notin flags: - attachMerkleProofs(result) + attachMerkleProofs(result) func signBlock*( fork: Fork, genesis_validators_root: Eth2Digest, blck: BeaconBlock,