Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(avm): avm memory trace building #3835

Merged
merged 7 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#pragma once

#include "barretenberg/ecc/curves/bn254/fr.hpp"
#include "barretenberg/proof_system/circuit_builder/circuit_builder_base.hpp"

#include "barretenberg/flavor/generated/AvmMini_flavor.hpp"
#include "barretenberg/proof_system/circuit_builder/generated/AvmMini_circuit_builder.hpp"

namespace proof_system {

using Flavor = proof_system::honk::flavor::AvmMiniFlavor;
using FF = Flavor::FF;
using Row = proof_system::AvmMiniFullRow<barretenberg::fr>;

void log_avmMini_trace(std::vector<Row> const& trace, size_t beg, size_t end);
namespace avm_trace {

// Number of rows
static const size_t AVM_TRACE_SIZE = 256;
enum class IntermRegister : uint32_t { ia = 0, ib = 1, ic = 2 };
enum class AvmMemoryTag : uint32_t { u0 = 0, u8 = 1, u16 = 2, u32 = 3, u64 = 4, u128 = 5, ff = 6 };

} // namespace proof_system
} // namespace avm_trace
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#include "barretenberg/ecc/curves/bn254/fr.hpp"
#include "barretenberg/proof_system/circuit_builder/circuit_builder_base.hpp"
#include "AvmMini_helper.hpp"

#include "./AvmMini_helper.hpp"
#include "barretenberg/flavor/generated/AvmMini_flavor.hpp"
#include "barretenberg/relations/generated/AvmMini/avm_mini.hpp"

namespace proof_system {
namespace avm_trace {

/**
* @brief Routine to log some slice of a trace of the AVM. Used to debug or in some unit tests.
Expand Down Expand Up @@ -70,4 +65,4 @@ void log_avmMini_trace(std::vector<Row> const& trace, size_t beg, size_t end)
}
}

} // namespace proof_system
} // namespace avm_trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

#include "AvmMini_common.hpp"

namespace avm_trace {

void log_avmMini_trace(std::vector<Row> const& trace, size_t beg, size_t end);

} // namespace avm_trace
Loading
Loading