diff --git a/pkg/runner/runner.go b/pkg/runner/runner.go index 940908441..b18463079 100644 --- a/pkg/runner/runner.go +++ b/pkg/runner/runner.go @@ -405,7 +405,7 @@ func (runner *ZeroRunner) Output() []*fp.Element { } output := []*fp.Element{} - outputSegment, ok := runner.vm.Memory.FindSegmentWithBuiltin("output") + outputSegment, ok := runner.vm.Memory.FindSegmentWithBuiltin(builtins.OutputName) if !ok { return output } diff --git a/pkg/runner/runner_test.go b/pkg/runner/runner_test.go index 3d5e642cd..d7b3d99cb 100644 --- a/pkg/runner/runner_test.go +++ b/pkg/runner/runner_test.go @@ -191,7 +191,7 @@ func TestBitwiseBuiltin(t *testing.T) { err := runner.Run() require.NoError(t, err) - bitwise, ok := runner.vm.Memory.FindSegmentWithBuiltin("bitwise") + bitwise, ok := runner.vm.Memory.FindSegmentWithBuiltin(builtins.BitwiseName) require.True(t, ok) requireEqualSegments(t, createSegment(14, 7, 6, 9, 15), bitwise) @@ -267,7 +267,7 @@ func TestPedersenBuiltin(t *testing.T) { err := runner.Run() require.NoError(t, err) - pedersen, ok := runner.vm.Memory.FindSegmentWithBuiltin("pedersen") + pedersen, ok := runner.vm.Memory.FindSegmentWithBuiltin(builtins.PedersenName) require.True(t, ok) requireEqualSegments(t, createSegment(&val1, &val2, &val3), pedersen) } @@ -349,7 +349,7 @@ func TestRangeCheck96Builtin(t *testing.T) { err := runner.Run() require.NoError(t, err) - rangeCheck96, ok := runner.vm.Memory.FindSegmentWithBuiltin("range_check96") + rangeCheck96, ok := runner.vm.Memory.FindSegmentWithBuiltin(builtins.RangeCheck96Name) require.True(t, ok) felt := &fp.Element{} diff --git a/pkg/vm/builtins/range_check.go b/pkg/vm/builtins/range_check.go index 9d933f999..bf2bf5ab3 100644 --- a/pkg/vm/builtins/range_check.go +++ b/pkg/vm/builtins/range_check.go @@ -12,11 +12,11 @@ import ( ) const ( - RangeCheckName = "range_check" - RangeCheck96Name string = "range_check96" - inputCellsPerRangeCheck = 1 - cellsPerRangeCheck = 1 - instancesPerComponentRangeCheck = 1 + RangeCheckName = "range_check" + RangeCheck96Name = "range_check96" + inputCellsPerRangeCheck = 1 + cellsPerRangeCheck = 1 + instancesPerComponentRangeCheck = 1 // Each range check instance consists of RangeCheckNParts 16-bit parts. INNER_RC_BOUND_SHIFT and INNER_RC_BOUND_MASK are used to extract 16-bit parts from the field elements stored in the range check segment. INNER_RC_BOUND_SHIFT = 16 @@ -61,9 +61,9 @@ func (r *RangeCheck) InferValue(segment *memory.Segment, offset uint64) error { func (r *RangeCheck) String() string { if r.RangeCheckNParts == 6 { - return "range_check96" + return RangeCheck96Name } else { - return "range_check" + return RangeCheckName } }