NilFoundation / proof-market-toolchain

A toolchain for interaction with the Proof Market protocol.
https://docs.nil.foundation/proof-market
MIT License
23 stars 5 forks source link

Followup to #110 - proof generator segfaults on balances_tree example #113

Open color-typea opened 11 months ago

color-typea commented 11 months ago

Steps to reproduce see #110

Expected outcome: Produces a proof Actual outcome:

Segmentation fault (core dumped)
proof-generator: ./bin/proof-generator/../../libs/zkllvm-circifier/llvm/include/llvm/IR/Type.h:439: llvm::Type *llvm::Type::getNonOpaquePointerElementType() const: Assertion `NumContainedTys && "Attempting to get element type of opaque pointer"' failed.
Aborted (core dumped)

Stack trace

(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=139700841798720) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=139700841798720) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=139700841798720, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007f0ea36e4476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007f0ea36ca7f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007f0ea36ca71b in __assert_fail_base (fmt=0x7f0ea387f150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7f1d34 "NumContainedTys && \"Attempting to get element type of opaque pointer\"", 
    file=0x7f1c3f "./zkllvm/proof-market-toolchain/bin/proof-generator/../../libs/zkllvm-circifier/llvm/include/llvm/IR/Type.h", line=439, function=<optimized out>) at ./assert/assert.c:92
#6  0x00007f0ea36dbe96 in __GI___assert_fail (assertion=0x7f1d34 "NumContainedTys && \"Attempting to get element type of opaque pointer\"", 
    file=0x7f1c3f "./zkllvm/proof-market-toolchain/bin/proof-generator/../../libs/zkllvm-circifier/llvm/include/llvm/IR/Type.h", line=439, 
    function=0x7f1cc4 "llvm::Type *llvm::Type::getNonOpaquePointerElementType() const") at ./assert/assert.c:101
#7  0x000000000068b6f9 in llvm::Type::getNonOpaquePointerElementType (this=0x23b29d0) at ./zkllvm/proof-market-toolchain/bin/proof-generator/../../libs/zkllvm-circifier/llvm/include/llvm/IR/Type.h:438
#8  0x000000000068a167 in nil::blueprint::PublicInputReader<nil::crypto3::algebra::fields::pallas_base_field, nil::crypto3::zk::snark::plonk_variable<nil::crypto3::algebra::fields::pallas_base_field>, nil::blueprint::assignment<nil::crypto3::zk::snark::plonk_constraint_system<nil::crypto3::algebra::fields::pallas_base_field, nil::crypto3::zk::snark::plonk_arithmetization_params<15ul, 5ul, 5ul, 30ul> >> >::try_array(llvm::Value*, llvm::Type*, boost::json::object const&) (this=0x7fff52f33880, array_arg=0x23b9c80, arg_type=0x23b29d0, value=...) at ./zkllvm/proof-market-toolchain/libs/zkllvm-assigner/include/nil/blueprint/public_input.hpp:384
#9  0x0000000000686267 in nil::blueprint::PublicInputReader<nil::crypto3::algebra::fields::pallas_base_field, nil::crypto3::zk::snark::plonk_variable<nil::crypto3::algebra::fields::pallas_base_field>, nil::blueprint::assignment<nil::crypto3::zk::snark::plonk_constraint_system<nil::crypto3::algebra::fields::pallas_base_field, nil::crypto3::zk::snark::plonk_arithmetization_params<15ul, 5ul, 5ul, 30ul> >> >::fill_public_input(llvm::Function const&, boost::json::array const&) (this=0x7fff52f33880, function=..., public_input=...) at ./zkllvm/proof-market-toolchain/libs/zkllvm-assigner/include/nil/blueprint/public_input.hpp:463
#10 0x0000000000451200 in nil::blueprint::parser<nil::crypto3::algebra::fields::pallas_base_field, nil::crypto3::zk::snark::plonk_arithmetization_params<15ul, 5ul, 5ul, 30ul> >::evaluate (this=0x7fff52f379d8, module=..., 
    public_input=...) at ./zkllvm/proof-market-toolchain/libs/zkllvm-assigner/include/nil/blueprint/parser.hpp:793
#11 0x000000000042a110 in nil::proof_generator::assigner::proof_new (bytecode=<incomplete type>, public_input_json=..., output_file=<incomplete type>)
    at ./zkllvm/proof-market-toolchain/bin/proof-generator/include/nil/proof-generator/assigner/proof.hpp:232
#12 0x000000000042b246 in proof_new (circuit_description=..., public_input=..., output_file=<incomplete type>) at ./zkllvm/proof-market-toolchain/bin/proof-generator/src/main.cpp:104
#13 0x0000000000773489 in prover::operator() (this=0x7fff52f388b0) at ./zkllvm/proof-market-toolchain/bin/proof-generator/src/main.cpp:133
#14 0x000000000077483d in boost::_mfi::mf0<int, prover>::call<boost::application::auto_handler<prover>*> (this=0x2378238, u=@0x2378248: 0x7fff52f388b0) at /usr/local/include/boost/bind/mem_fn_template.hpp:40
#15 0x0000000000774799 in boost::_mfi::mf0<int, prover>::operator()<boost::application::auto_handler<prover>*> (this=0x2378238, u=@0x2378248: 0x7fff52f388b0) at /usr/local/include/boost/bind/mem_fn_template.hpp:55
#16 0x000000000077474a in boost::_bi::list1<boost::_bi::value<boost::application::auto_handler<prover>*> >::operator()<int, boost::_mfi::mf0<int, prover>, boost::_bi::list0> (this=0x2378248, f=..., a=...)
    at /usr/local/include/boost/bind/bind.hpp:228
#17 0x00000000007746f5 in boost::_bi::bind_t<int, boost::_mfi::mf0<int, prover>, boost::_bi::list1<boost::_bi::value<boost::application::auto_handler<prover>*> > >::operator() (this=0x2378238)
    at /usr/local/include/boost/bind/bind.hpp:1273
#18 0x000000000077448d in boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<int, boost::_mfi::mf0<int, prover>, boost::_bi::list1<boost::_bi::value<boost::application::auto_handler<prover>*> > >, int>::invoke (
    function_obj_ptr=...) at /usr/local/include/boost/function/function_template.hpp:137
#19 0x000000000077a962 in boost::function0<int>::operator() (this=0x2378230) at /usr/local/include/boost/function/function_template.hpp:763
#20 0x000000000077a8e9 in boost::application::common_application_impl_<char>::run (this=0x2378220)
    at ./zkllvm/proof-market-toolchain/libs/application/include/boost/application/detail/posix/common_application_impl.hpp:45
#21 0x0000000000772d61 in boost::application::common::run (this=0x7fff52f386b8) at ./zkllvm/proof-market-toolchain/libs/application/include/boost/application/common_application.hpp:112
#22 0x000000000075ab4c in boost::application::launch<boost::application::common, boost::application::auto_handler<prover>, boost::application::signal_manager, boost::application::basic_context> (app=..., ct=..., cxt=..., ec=...)
    at ./zkllvm/proof-market-toolchain/libs/application/include/boost/application/launch.hpp:94
#23 0x00000000004575af in boost::application::launch<boost::application::common, boost::application::auto_handler<prover>, boost::application::basic_context> (app=..., cxt=..., ec=...)
    at ./zkllvm/proof-market-toolchain/libs/application/include/boost/application/launch.hpp:130
#24 0x000000000042b729 in main (argc=4, argv=0x7fff52f38a48) at ./zkllvm/proof-market-toolchain/bin/proof-generator/src/main.cpp:160```

Toolchain versions:

alexandra-mara commented 11 months ago

Subscribed to updates