#pragma once
#include "risc0/zkp/accel/accel.h"
#include "risc0/zkp/prove/write_iop.h"
#include "risc0/zkp/verify/merkle.h"
#include <vector>
namespace risc0 {
class MerkleTreeProver : public MerkeTreeParams {
public:
MerkleTreeProver(AccelConstSlice<Fp> matrix, size_t rowSize, size_t colSize, size_t queries);
void commit(WriteIOP& iop) const;
ShaDigest getRoot() const;
std::vector<Fp> prove(WriteIOP& iop, size_t idx) const;
private:
AccelConstSlice<Fp> matrix;
AccelSlice<ShaDigest> nodes;
ShaDigest root;
AccelSlice<Fp> colTmp;
AccelSlice<ShaDigest> proofTmp;
};
}