47 auto deserialize_point = [&]() {
49 NativeG1::PUBLIC_INPUTS_SIZE);
50 idx += NativeG1::PUBLIC_INPUTS_SIZE;
51 return FrCodec::deserialize_from_fields<NativeG1>(limbs);
58 app_commitment = deserialize_point();
77 auto serialize_fq = [&](
const NativeFq& fq_val) {
78 constexpr uint64_t NUM_LIMB_BITS = 2 * NUM_LIMB_BITS_IN_FIELD_SIMULATION;
81 proof[idx++] =
NativeFF(val & LIMB_MASK);
82 proof[idx++] =
NativeFF((val >> NUM_LIMB_BITS) & LIMB_MASK);
85 auto serialize_point = [&](
const NativeG1& point) {
86 if (point.is_point_at_infinity()) {
87 for (
size_t i = 0; i < NativeG1::PUBLIC_INPUTS_SIZE; ++i) {
91 serialize_fq(point.x);
92 serialize_fq(point.y);
100 serialize_point(app_commitment);
139 auto deserialize_point = [&]() {
141 NativeG1::PUBLIC_INPUTS_SIZE);
142 idx += NativeG1::PUBLIC_INPUTS_SIZE;
143 return FrCodec::deserialize_from_fields<NativeG1>(limbs);
150 commitment = deserialize_point();
165 auto serialize_fq = [&](
const NativeFq& fq_val) {
166 constexpr uint64_t NUM_LIMB_BITS = 2 * NUM_LIMB_BITS_IN_FIELD_SIMULATION;
169 proof[idx++] =
NativeFF(val & LIMB_MASK);
170 proof[idx++] =
NativeFF((val >> NUM_LIMB_BITS) & LIMB_MASK);
173 auto serialize_point = [&](
const NativeG1& point) {
174 if (point.is_point_at_infinity()) {
175 for (
size_t i = 0; i < NativeG1::PUBLIC_INPUTS_SIZE; ++i) {
179 serialize_fq(point.x);
180 serialize_fq(point.y);
188 serialize_point(commitment);
224 auto deserialize_point = [&]() {
226 NativeG1::PUBLIC_INPUTS_SIZE);
227 idx += NativeG1::PUBLIC_INPUTS_SIZE;
228 return FrCodec::deserialize_from_fields<NativeG1>(limbs);
247 auto serialize_fq = [&](
const NativeFq& fq_val) {
248 constexpr uint64_t NUM_LIMB_BITS = 2 * NUM_LIMB_BITS_IN_FIELD_SIMULATION;
251 proof[idx++] =
NativeFF(val & LIMB_MASK);
252 proof[idx++] =
NativeFF((val >> NUM_LIMB_BITS) & LIMB_MASK);
255 auto serialize_point = [&](
const NativeG1& point) {
256 if (point.is_point_at_infinity()) {
257 for (
size_t i = 0; i < NativeG1::PUBLIC_INPUTS_SIZE; ++i) {
261 serialize_fq(point.x);
262 serialize_fq(point.y);
typename Group::affine_element AffineElement
Native representation and serde for AppIO public inputs.
void to_proof(std::vector< NativeFF > &proof, size_t num_public_inputs) const
Serialize AppIO back to a proof vector.
NativePairingPoints pairing_inputs
static AppIOSerde from_proof(const std::vector< NativeFF > &proof, size_t num_public_inputs)
Deserialize AppIO from a proof vector.
static constexpr size_t PUBLIC_INPUTS_SIZE
curve::BN254::AffineElement NativeG1
Native representation and serde for HidingKernelIO public inputs.
void to_proof(std::vector< NativeFF > &proof, size_t num_public_inputs) const
Serialize HidingKernelIO back to a proof vector.
static constexpr size_t PUBLIC_INPUTS_SIZE
std::array< NativeG1, MegaCircuitBuilder::NUM_WIRES > NativeTableCommitments
curve::BN254::AffineElement NativeG1
NativeG1 kernel_return_data
NativeTableCommitments ecc_op_tables
NativePairingPoints pairing_inputs
static HidingKernelIOSerde from_proof(const std::vector< NativeFF > &proof, size_t num_public_inputs)
Deserialize HidingKernelIO from a proof vector.
For test purposes only: Native representation and serde for KernelIO public inputs
NativeG1 kernel_return_data
std::array< NativeG1, N > NativeAppReturnDataCommitments
void to_proof(std::vector< NativeFF > &proof, size_t num_public_inputs) const
Serialize KernelIO back to a proof vector.
NativePairingPoints pairing_inputs
NativeAppReturnDataCommitments app_return_data
curve::BN254::AffineElement NativeG1
NativeFF output_hn_accum_hash
static KernelIOSerde_ from_proof(const std::vector< NativeFF > &proof, size_t num_public_inputs)
Deserialize KernelIO from a proof vector.
static constexpr size_t PUBLIC_INPUTS_SIZE
field< Bn254FrParams > fr
constexpr std::size_t kernel_public_inputs_size(std::size_t num_apps)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static constexpr field zero()