public void addResponse(
      final SnapWorldDownloadState downloadState,
      final WorldStateProofProvider worldStateProofProvider,
      final NavigableMap<Bytes32, Bytes> slots,
      final ArrayDeque<Bytes> proofs) {
    if (!slots.isEmpty() || !proofs.isEmpty()) {
      if (!worldStateProofProvider.isValidRangeProof(
          startKeyHash, endKeyHash, storageRoot, proofs, slots)) {
        // If the proof is invalid, it means that the storage will be a mix of several blocks.
        // Therefore, it will be necessary to heal the account's storage subsequently
        LOG.atDebug()
            .setMessage("invalid storage range proof received for account hash {} range {} {}")
            .addArgument(() -> accountHash)
            .addArgument(() -> slots.isEmpty() ? "none" : slots.firstKey())
            .addArgument(() -> slots.isEmpty() ? "none" : slots.lastKey())
            .log();

        downloadState.addAccountToHealingList(CompactEncoding.bytesToPath(accountHash));
        // We will request the new storage root of the account because it is apparently no longer
        // valid with the new pivot block.
        downloadState.enqueueRequest(
            createAccountDataRequest(
                getRootHash(), Hash.wrap(accountHash), startKeyHash, endKeyHash));
        isProofValid = Optional.of(false);
      } else {
        stackTrie.addElement(startKeyHash, proofs, slots);
        isProofValid = Optional.of(true);
      }
    }
  }
Returns a list of storages and the merkle proofs of an entire range
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/StorageRangeDataRequest.java