Skip to content

Commit 411cf5a

Browse files
authored
chore: remove databus non-issue (#16471)
Removes outdated [issue](AztecProtocol/barretenberg#1138) that does not actually pose any problem. In particular, there is no problem with adding a default value to all databus columns and using the resulting commitment as the default for "unused" databus columns in circuits. This follows the pattern we use more generally to avoid all points at infinity by adding "default" gates in the circuit builders. This is not strictly necessary but is convenient. Adds an issue in the `field_conversion` library to determine whether there is a need to add support for serialization of points at infinity which is currently missing.
1 parent 279f5a5 commit 411cf5a

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

barretenberg/cpp/src/barretenberg/stdlib/primitives/databus/databus.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ template <typename Builder> class databus {
8080
* default commitment value. We set the same value for the missing return data herein so that the commitments agree
8181
* and the corresponding consistency check will be satisfied in the kernel in which it's performed.
8282
*
83-
* TODO(https://github.com/AztecProtocol/barretenberg/issues/1138): scrutinize the use of a default value for
84-
* consistency of default databus commitments.
8583
* @tparam Builder
8684
*/
8785
template <class Builder> class DataBusDepot {

barretenberg/cpp/src/barretenberg/stdlib/primitives/field/field_conversion.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ template <typename Builder, typename T> std::vector<fr<Builder>> convert_to_bn25
168168
} else if constexpr (IsAnyOf<T, goblin_field<Builder>>) {
169169
return convert_goblin_fr_to_bn254_frs(val);
170170
} else if constexpr (IsAnyOf<T, bn254_element<Builder>>) {
171+
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1527): Consider handling point at infinity.
171172
using BaseField = bn254_element<Builder>::BaseField;
172173
auto fr_vec_x = convert_to_bn254_frs<Builder, BaseField>(val.x);
173174
auto fr_vec_y = convert_to_bn254_frs<Builder, BaseField>(val.y);

barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/databus.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ constexpr uint32_t PROPAGATED_DATABUS_COMMITMENTS_SIZE = PROPAGATED_DATABUS_COMM
2323
*/
2424
struct BusVector {
2525

26-
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1138): A default value added to every databus column to
27-
// avoid the point at infinity commitment and to ensure the validity of the databus commitment consistency checks.
26+
// A default value added to every databus column to avoid the point at infinity commitment and to ensure the
27+
// validity of the databus commitment consistency checks. Note: in principle we could allow point at infinity
28+
// default commitment but there is precedent for avoiding this by default.
2829
static constexpr bb::fr DEFAULT_VALUE = 25;
2930

3031
/**

barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_circuit_builder.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ template <typename FF> void MegaCircuitBuilder_<FF>::add_mega_gates_to_ensure_al
4242
{
4343
// Add a single default value to all databus columns. Note: This value must be equal across all columns in order for
4444
// inter-circuit databus commitment checks to pass in IVC settings.
45-
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1138): Consider default value.
4645

4746
// Create an arbitrary calldata read gate
4847
add_public_calldata(this->add_variable(BusVector::DEFAULT_VALUE)); // add one entry in calldata

0 commit comments

Comments
 (0)