mirror of
https://github.com/logos-storage/circom-witnessgen.git
synced 2026-01-07 15:33:14 +00:00
54 lines
1.1 KiB
Protocol Buffer
54 lines
1.1 KiB
Protocol Buffer
|
|
syntax = "proto3";
|
||
|
|
|
||
|
|
package circom_witnesscalc.proto.vm;
|
||
|
|
|
||
|
|
import "protos/messages.proto";
|
||
|
|
|
||
|
|
// Virtual Machine metadata
|
||
|
|
message VmMd {
|
||
|
|
uint32 main_template_id = 1;
|
||
|
|
uint32 templates_num = 2;
|
||
|
|
uint32 functions_num = 3;
|
||
|
|
uint32 signals_num = 4;
|
||
|
|
uint32 constants_num = 5;
|
||
|
|
map<string, SignalDescription> inputs = 9;
|
||
|
|
repeated uint32 witness_signals = 7;
|
||
|
|
map<uint32, IoDefs> io_map = 8;
|
||
|
|
}
|
||
|
|
|
||
|
|
message ComponentTmpl {
|
||
|
|
string symbol = 1;
|
||
|
|
uint64 sub_cmp_idx = 2;
|
||
|
|
uint64 number_of_cmp = 3;
|
||
|
|
string name_subcomponent = 4;
|
||
|
|
uint64 signal_offset = 5;
|
||
|
|
uint64 signal_offset_jump = 6;
|
||
|
|
uint64 template_id = 7;
|
||
|
|
bool has_inputs = 8;
|
||
|
|
}
|
||
|
|
|
||
|
|
message Template {
|
||
|
|
string name = 1;
|
||
|
|
bytes code = 2;
|
||
|
|
repeated uint64 line_numbers = 3;
|
||
|
|
repeated ComponentTmpl components = 4;
|
||
|
|
uint64 var_stack_depth = 5;
|
||
|
|
uint64 number_of_inputs = 6;
|
||
|
|
}
|
||
|
|
|
||
|
|
message Function {
|
||
|
|
string name = 1;
|
||
|
|
string symbol = 2;
|
||
|
|
bytes code = 3;
|
||
|
|
repeated uint64 line_numbers = 4;
|
||
|
|
}
|
||
|
|
|
||
|
|
message IoDef {
|
||
|
|
uint32 code = 1;
|
||
|
|
uint32 offset = 2;
|
||
|
|
repeated uint32 lengths = 3;
|
||
|
|
}
|
||
|
|
|
||
|
|
message IoDefs {
|
||
|
|
repeated IoDef io_defs = 1;
|
||
|
|
}
|