Function processSingleList

  • Generates part of the ProtoPODGPC circuit inputs for a single list membership check. This is used to generate the full inputs for multiple list membership checks in (@link processLists).

    Processes a single membership list together with the (multi-)index of the entry value (or entry value tuple) that ought to be a member of this list. This is done by means of appropriate applications of hashTuple and computeTupleIndices. If no tuples are involved, then listComparisonValueIndex is a singleton (a list containing a single element) and list a list of singletons; the underlying values are hashed as-is rather than being being hashed as 1-ary tuples. The list is padded with its first entry to fill the underlying array up to its capacity (params.maxListElements) while ensuring that there are no false positives in list membership checks.

    Parameters

    • params: ProtoPODGPCCircuitParams

      parameters of the ProtoPODGPC the list is processed for

    • firstAvailableTupleIndex: number

      the index of the first output tuple in the combined array of entry and tuple value hashes.

    • listComparisonValueIndex: number[]

      tuple of indices of inputs to be compared to the list elements

    • list: PODValueTuple[]

      the tuples of constant values making up the list

    Returns {
        listComparisonValueIndex: number;
        listValidValues: bigint[];
        tupleIndices: number[][];
    }

    list of tuple indices of arity params.tupleArity representing the input tuple, number representing the index of the entry value (tuple) which is a member of the list, and the (unpadded) membership list in hashed form.

    • listComparisonValueIndex: number
    • listValidValues: bigint[]
    • tupleIndices: number[][]

    Throws

    RangeError if any of the inputs are out of bounds with respect to the given circuit parameters.

    Throws

    TypeError if the list and index arrays are malformed.

Generated using TypeDoc