rusk
rusk copied to clipboard
execution-core: Support unproven phoenix-transaction
Summary
Support the generation of an unproven phoenix-transaction and its conversion into a "proven" phoenix-transaction.
Detailed Description
In the current state, it is only possible to generate proven phoenix-transactions, passing a prover. Creating an uproven transaction therefore is only possible by passing a "prover" that doesn't actually generate the proof but instead just pastes the circuit-bytes into the proof
field of the transaction and later on, after the proof has been generated, replacing the circuit-bytes with the proof bytes. This means that an important and delicate part of the transaction handling is delegated to the enduser, placing unnecessary overhead on the generation of transactions and also opening the door for involuntarily invalid transactions.
Relevant Context
Being able to generate a transaction and generating the transaction proof non-simultaneously is important when delegating the proof generation.
Possible Solution
Add an UnprovenTransaction
struct with a circuit
field. And add a from_unproven
method to the phoenix-transaction that takes an unproven transaction and some proof
bytes and returns a Self
.