Skip to content

This does not contain any provable code yet #1

Description

@mitschabaude

The current pattern of using o1js' Gadgets.ForeignField is wrong: you're converting Field3 to/from bigint in every operation. This will fail in provable code -- bigint operations are not provable, and you can't read out JS values of provable types like Field3 in a circuit.

To make an operation provable, you need to build a circuit, not just do normal JS operations. We have a lot of methods for building circuits, like Gadgets.ForeignField.{add(),mul()} and of course all the lower-level methods on Field to operate on the individual limbs of a Field3.

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions