Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Namespaces | Functions | Variables
parse_r1cs.py File Reference

Go to the source code of this file.

Namespaces

 analyzer.parse_r1cs
 

Functions

def analyzer.parse_r1cs.get_index (annotation_set, annotation)
 
def analyzer.parse_r1cs.get_constraints (constraints_set, annotation_index)
 
def analyzer.parse_r1cs.get_constraints_from_annotation_pattern (constraints_set, annotation_pattern)
 
def analyzer.parse_r1cs.is_in_lin_comb (linear_combination, annotation_index)
 

Variables

 analyzer.parse_r1cs.path_zeth = os.environ["ZETH_DEBUG_DIR"]
 
string analyzer.parse_r1cs.filename = "r1cs.json"
 
 analyzer.parse_r1cs.file_path = os.path.join(path_zeth, filename)
 
 analyzer.parse_r1cs.data = r1cs_file.read()
 
 analyzer.parse_r1cs.r1cs_obj = json.loads(data)
 
 analyzer.parse_r1cs.r1cs_variables_nb = r1cs_obj["num_variables"]
 
 analyzer.parse_r1cs.r1cs_constraints_nb = r1cs_obj["num_constraints"]
 
 analyzer.parse_r1cs.variables_annotations_set = r1cs_obj["variables_annotations"]
 
 analyzer.parse_r1cs.constraints_set = r1cs_obj["constraints"]
 
string analyzer.parse_r1cs.annotation_to_check = "joinsplit_gadget phi bits_31"
 
def analyzer.parse_r1cs.annotation_index = get_index(variables_annotations_set, annotation_to_check)
 
def analyzer.parse_r1cs.constraints_using_annotation = get_constraints(constraints_set, annotation_index)
 
string analyzer.parse_r1cs.regex = "rho"
 
def analyzer.parse_r1cs.res = get_constraints_from_annotation_pattern(constraints_set, regex)