MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / NewRoot

Function NewRoot

ecgo/builder/root.go:25–38  ·  view source on GitHub ↗

NewRoot returns a new Root instance.

(fieldorder *big.Int, config frontend.CompileConfig)

Source from the content-addressed store, hash-verified

23
24// NewRoot returns a new Root instance.
25func NewRoot(fieldorder *big.Int, config frontend.CompileConfig) *Root {
26 root := Root{
27 config: config,
28 }
29 root.field = field.GetFieldFromOrder(fieldorder)
30 root.registry = newSubCircuitRegistry()
31
32 root.builder = root.newBuilder(0)
33 root.registry.m[0] = &SubCircuit{
34 builder: root.builder,
35 }
36
37 return &root
38}
39
40// PublicVariable creates a new public variable for the circuit.
41func (r *Root) PublicVariable(f schema.LeafInfo) frontend.Variable {

Callers 1

CompileFunction · 0.92

Calls 3

newBuilderMethod · 0.95
GetFieldFromOrderFunction · 0.92
newSubCircuitRegistryFunction · 0.85

Tested by

no test coverage detected