Skip to content
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
5 changes: 0 additions & 5 deletions integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ func TestIntegrationAPI(t *testing.T) {
opts = append(opts, test.WithInvalidAssignment(tData.InvalidAssignments[i]))
}

if name == "multi-output-hint" {
// TODO @gbotrel FIXME
opts = append(opts, test.NoFuzzing())
}

assert.CheckCircuit(tData.Circuit, opts...)
}, name)
}
Expand Down
13 changes: 13 additions & 0 deletions internal/backend/circuits/hint.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,21 @@ var make3 = func(_ *big.Int, inputs []*big.Int, result []*big.Int) error {
}

var dvHint = func(_ *big.Int, inputs []*big.Int, res []*big.Int) error {
// Check that inputs and outputs have the same length
if len(inputs) != len(res) {
return fmt.Errorf("dvHint: expected same length for inputs and results, got %d inputs and %d results", len(inputs), len(res))
}

// Ensure we have at least one input to process
if len(inputs) == 0 {
return fmt.Errorf("dvHint: no inputs provided")
}

two := big.NewInt(2)
for i := range inputs {
if inputs[i] == nil {
return fmt.Errorf("dvHint: input at index %d is nil", i)
}
res[i].Mul(two, inputs[i])
}
return nil
Expand Down