Feat/synth wasm#1
Conversation
…in a WASM context
This reverts the attempt to use the inclusion query object to pass in outside data from a WASM context. The reasoning behind this is that it's difficult to know ahead of time which commitments will be needed to build the proof. It is likely for full WASM support, a different set of composing functions will be needed.
Signed-off-by: Mike Turner <mturner@aleo.org>
|
All the file renames in the |
|
|
||
| let mut masked_bytes = [0; $byte_size + 1]; | ||
| reader.read_exact(&mut masked_bytes[..output_byte_size])?; | ||
| let formatted_string = format!("{:?} , {}", masked_bytes, output_byte_size); |
| include_bytes!("./resources/block.genesis") | ||
| } | ||
| } | ||
| // impl GenesisBytes { |
There was a problem hiding this comment.
Just testing the limits of how much I could remove before things break. This isn't necessary for the client.
|
|
||
| // Synthesize the 'credits.aleo' circuit keys. | ||
| for function_name in program.functions().keys() { | ||
| if function_name.to_string() == "transfer" { |
There was a problem hiding this comment.
I imagine we can expose interfaces here to support arbitrary programs & arbitrary functions on those programs. For most applications, users shouldn't need most prover files ie the credits mint file which is only used on the genesis block.
| use std::sync::Mutex; | ||
|
|
||
| lazy_static! { | ||
| pub static ref PARAMETER_PROVIDER: Mutex<IndexMap<String, Vec<u8>>> = { |
There was a problem hiding this comment.
This is the heart of the change. We now have a PARAMETER_PROVIDER exposed to the WASM so it can upload files as necessary. We initialize empty Vecs for the rest of the.
| pub struct $name; | ||
|
|
||
| impl $name { | ||
| pub fn load_bytes() -> Result<Vec<u8>, $crate::errors::ParameterError> { |
There was a problem hiding this comment.
Here's how we load those bytes.
c7b1d6d to
7e1757b
Compare



No description provided.