Skip to content

Commit

Permalink
Merge pull request #10 from kroma-network/halo2-with-tachyon
Browse files Browse the repository at this point in the history
fix(halo2_proof): fix wrong use of `kSha256StateLength`
  • Loading branch information
dongchangYoo authored Mar 25, 2024
2 parents 4f71fab + e98c862 commit 4ad1359
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions halo2_proofs/src/bn254_sha256_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ void Sha256Writer::finalize(std::array<uint8_t, kSha256DigestLength>& result) {
}

rust::Vec<uint8_t> Sha256Writer::state() const {
constexpr size_t kStateSize = sizeof(kSha256StateLength);
rust::Vec<uint8_t> ret;
// NOTE(chokobole): |rust::Vec<uint8_t>| doesn't have |resize()|.
ret.reserve(kStateSize);
for (size_t i = 0; i < kStateSize; ++i) {
ret.reserve(kSha256StateLength);
for (size_t i = 0; i < kSha256StateLength; ++i) {
ret.push_back(0);
}
size_t state_size;
Expand Down

0 comments on commit 4ad1359

Please sign in to comment.