I am getting this error when deploying Goerli's Medalla Beacon Contract through Remix.

execution reverted: DepositContract: reconstructed DepositData does not match supplied deposit_data_root

input (web3)

pubkey: 0x94a61e90d697a287c31d389d2389aff2523a3e677949810381f3e485d79eb07150463f2c2b2796f744874e4810e3e778
withdrawal_credentials: 0x0045fe3422a0c68e6192a3782850334ed9fe162212a9f888c31aaa67c8d34e7b
signature: 0x81c0e6d9953ba76c1d0c27162e98576019e702fd94b27269791fcf30d0afc371acc9385444cfe82dbc2b50612b1ae20416d17fa1360151209a09d66f5b615f84f0a701fe60d668d0ef4fabcb815c4fe95855c242edaa02bf5f5f9a3d7b7cc87f
deposit_data_root: 0x2467b379933a366aa89584578cfd63434769a07bec11a347a207f70862fa1a92

The tx: https://goerli.etherscan.io/tx/0x2f9118dafa84846768dcac5d66fea223729bbc22799e787f511774dfe437d211

Contract: https://goerli.etherscan.io/address/0x07b39f4fde4a38bace212b546dac87c58dfe3fdc#code

Any idea? thank you in advance

1 Answer 1


Here is how you should investigate the problem:

  1. Go to the contract's code
  2. Search for the error-message DepositContract: reconstructed DepositData does not match supplied deposit_data_root
  3. Find it in function function deposit:
// Verify computed and expected deposit data roots match
require(node == deposit_data_root, "DepositContract: reconstructed DepositData does not match supplied deposit_data_root");
  1. You know what deposit_data_root is (since you provided it as input), so scroll up a bit to see how node is computed:
bytes32 node = sha256(abi.encodePacked(
    sha256(abi.encodePacked(pubkey_root, withdrawal_credentials)),
    sha256(abi.encodePacked(amount, bytes24(0), signature_root))
  1. You know what pubkey_root, withdrawal_credentials and signature_root are (since you provided each one of them as input), so scroll up a bit to see how amount is computed:
uint deposit_amount = msg.value / GWEI;
  1. If all the input values stated in your question are correct, then the problem is in amount, in which case, the reason for the problem is that you passed an incorrect msg.value (i.e., you passed an incorrect amount of ether when you executed the transaction)
  • Thanks to your suggestion. I was able to figure it out that I passed wrong amount number to eth2.0-deposit-cli. That was why the contract couldn't reconstruct DepositData.
    – Peter
    Jun 3, 2021 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.