Skip to content

About

HTML/JSON visualizer for Plonky3_Fibonnaci (BrianSeong99)

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AIR Visualizer for Plonky3 Fibonacci

This project generates an execution trace using the Plonky 3 ZKP system and provides a web-based visualizer to inspect the relevant constraints. The project is sourced from Plonky3_Fibonacci. For further information on the respective protocol, please refer to the original repository.

How to run the Demo:

1. In src/, run the Rust program which will generate the trace data as a JSON file (web/trace_data.json).

cargo run

2. Navigate to the web/ directory and type the following:

python3 -m http.server 8000

3. Visit http://localhost:8000 in your browser.

To suspend the local host server from running, use Ctrl + Z

4. You may modify the sequence length by changing the value of the variables in src/main.rs (lines 138-139):

let num_steps = 8; // Choose the number of Fibonacci steps in powers of 2^n
let final_value = 21; // Expected result of final Fibonacci value

Troubleshooting

  • Cache: If you change the value of num_steps in Rust and successfully run once again, but do not see changes in the browser, please perform a Hard Refresh to clear the browser's cache:

    • Mac: Cmd + Shift + R
    • Windows: Ctrl + F5
  • Port Already in Use: If you get an "Address already in use" error, it means a previous server used is still running. You can force kill any process (on port 8000 for instance) with the following:

    • lsof -ti:8000 | xargs kill -9

Technical Resources & Citations

Rust & File Handling

  • Serde Serializing/Deserializing Rust data structures.
  • Serde JSON Converting serialized data into JSON (String) (Note: This video helped a lot).
  • std::fs::File & std::io::Write Filesystem operations, specifically used for creating the output file and writing the JSON byte buffer.
  • Vec used to dynamically construct the trace_matrix (Vec<Vec<String>>).

Plonky3 & Matrix Logic

Web Technologies

About

HTML/JSON visualizer for Plonky3_Fibonnaci (BrianSeong99)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages