This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
Backend::black_box_function_supported
does not satisfy type IsOpcodeSupported
#183
Closed
1 task done
Labels
bug
Something isn't working
Aim
The method
black_box_function_supported
was added to the backends so that ACVM can query which opcodes it supports and fallback as necessary.I'm wanting to pass the method
black_box_function_supported
which is defined on my backend intoacvm::compiler::compile
so that I can use the most accurate spec of what my backend supports.Expected behavior
I should be able to pass in the method on the backend so that the ACVM uses the set of black box functions which I have marked as available (as opposed to using the function
acvm::default_is_opcode_supported
).Bug
If I were to try to pass in
Backend::black_box_function_supported
however I run into two issuesIsOpcodeSupported
accepts anOpcode
as an argument butblack_box_function_supported
expects aBlackBoxFunc
.IsOpcodeSupported
specifies a function pointer however this prevents us from passing a closure.Due to 2., trying to use
Backend::black_box_function_supported
anyway results in the error belowThis then means that we have to define a function near where we're calling
acvm::compiler::compile
similar toThis in turn means that we need to hardcode the backend which we are using to call this function which isn't workable.
To reproduce
Versions
No response
Additional context
No response
Submission Checklist
The text was updated successfully, but these errors were encountered: