class DepositProvider implements Eth1EventsChannel, FinalizedCheckpointChannel {

  @Override
  public synchronized void onDepositsFromBlock(DepositsFromBlockEvent event) {
    event.getDeposits().stream()
        .map(DepositUtil::convertDepositEventToOperationDeposit)
        .forEach(
            deposit -> {
              if (!recentChainData.isPreGenesis()) {
                LOG.debug("About to process deposit: {}", deposit.getIndex());
              }

              depositNavigableMap.put(deposit.getIndex(), deposit);
              depositMerkleTree.add(deposit.getData().hash_tree_root());
            });
    eth1DataCache.onBlockWithDeposit(
        event.getBlockTimestamp(),
        new Eth1Data(
            depositMerkleTree.getRoot(),
            UInt64.valueOf(depositMerkleTree.getNumberOfLeaves()),
            event.getBlockHash()));
  }

  public  DepositProvider(RecentChainData recentChainData, final Eth1DataCache eth1DataCache);

}