10 const std::vector<uint8_t>&
bytecode,
11 const FF& public_bytecode_commitment)
13 BB_BENCH_NAME(
"BytecodeHasher::assert_public_bytecode_commitment");
15 [[maybe_unused]]
auto bytecode_length_in_bytes =
static_cast<uint32_t
>(
bytecode.size());
19 inputs.insert(
inputs.end(), bytecode_as_fields.begin(), bytecode_as_fields.end());
23 BB_ASSERT_EQ(
hash, public_bytecode_commitment,
"Public bytecode commitment hash mismatch");
25 events.emit({ .bytecode_id = bytecode_id,
26 .bytecode_length = bytecode_length_in_bytes,
27 .bytecode_fields =
std::move(bytecode_as_fields) });
#define BB_ASSERT_EQ(actual, expected,...)
std::shared_ptr< Napi::ThreadSafeFunction > bytecode
#define DOM_SEP__PUBLIC_BYTECODE
#define BB_BENCH_NAME(name)
void assert_public_bytecode_commitment(const BytecodeId &bytecode_id, const std::vector< uint8_t > &bytecode, const FF &public_bytecode_commitment) override
EventEmitterInterface< BytecodeHashingEvent > & events
Poseidon2Interface & hasher
virtual FF hash(const std::vector< FF > &input)=0
void hash(State &state) noexcept
std::vector< FF > encode_bytecode(std::span< const uint8_t > bytecode)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept