orchard/src/circuit/gadget
Jack Grigg 5e6c8ae380 Optimise location of Poseidon within Action circuit
- Move Poseidon into the right-hand advice columns. The Action circuit
  has 33 Sinsemilla invocations with 510-bit inputs (the 32 Merkle path
  hashes, and Commit^ivk). Poseidon fits within the row count of one of
  these invocations, so we can run it in parallel with these.

- Share fixed columns between ECC and Poseidon chips. Poseidon requires
  four advice columns, while ECC incomplete addition requires six, so we
  could choose to configure them in parallel. However, we only use a
  single Poseidon invocation, and we have the rows to accomodate it
  serially with fixed-base scalar mul. Sharing the ECC chip's 8 Lagrange
  coefficient fixed columns instead reduces the proof size.

  - We position Poseidon in the right-most 6 fixed columns, anticipating
    a further optimisation to Sinsemilla that will occupy the left-most
    2 fixed columns.
2021-07-21 16:03:54 +01:00
..
ecc Optimise location of Poseidon within Action circuit 2021-07-21 16:03:54 +01:00
poseidon Optimise location of Poseidon within Action circuit 2021-07-21 16:03:54 +01:00
sinsemilla Optimise location of Poseidon within Action circuit 2021-07-21 16:03:54 +01:00
utilities Combine constants fixed columns using assign_advice_from_constant. 2021-07-21 20:35:43 +08:00
ecc.rs Optimise location of Poseidon within Action circuit 2021-07-21 16:03:54 +01:00
poseidon.rs
sinsemilla.rs Optimise location of Poseidon within Action circuit 2021-07-21 16:03:54 +01:00
utilities.rs circuit.rs: Implement enable spends and enable outputs logic. 2021-07-21 20:35:43 +08:00