From 7ad38b3cc44feea255f4b0065fa6979af014fed9 Mon Sep 17 00:00:00 2001 From: bobbinth Date: Tue, 24 Sep 2024 22:08:07 +0000 Subject: [PATCH] deploy: c6e2bc88923780aa15e0680482ac27886cb8351b --- intro/usage.html | 18 ++++++++++++++---- print.html | 20 +++++++++++++++----- searchindex.js | 2 +- searchindex.json | 2 +- user_docs/assembly/events.html | 2 +- 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/intro/usage.html b/intro/usage.html index b38fdca9b0..a271f95b76 100644 --- a/intro/usage.html +++ b/intro/usage.html @@ -267,7 +267,7 @@

Compili

Controlling parallelism

Internally, Miden VM uses rayon for parallel computations. To control the number of threads used to generate a STARK proof, you can use RAYON_NUM_THREADS environment variable.

GPU acceleration

-

Miden VM proof generation can be accelerated via GPUs. Currently, GPU acceleration is enabled only on Apple silicon hardware (via Metal). To compile Miden VM with Metal acceleration enabled, you can run the following command:

+

Miden VM proof generation can be accelerated via GPUs. Currently, GPU acceleration is enabled only on Apple Silicon hardware (via Metal). To compile Miden VM with Metal acceleration enabled, you can run the following command:

make exec-metal
 

Similar to make exec command, this will place the resulting miden executable into the ./target/optimized directory.

@@ -295,7 +295,7 @@

Running Mid
  • debug - this will instantiate a Miden debugger against the specified Miden assembly program and inputs.
  • analyze - this will run a Miden assembly program against specific inputs and will output stats about its execution.
  • repl - this will initiate the Miden REPL tool.
  • -
  • example - this will execute a Miden assembly example program, generate a STARK proof of execution and verify it. Currently it is possible to run blake3 and fibonacci examples.
  • +
  • example - this will execute a Miden assembly example program, generate a STARK proof of execution and verify it. Currently, it is possible to run blake3 and fibonacci examples.
  • All of the above subcommands require various parameters to be provided. To get more detailed help on what is needed for a given subcommand, you can run the following:

    ./target/optimized/miden [subcommand] --help
    @@ -309,6 +309,10 @@ 

    Enabling lo
    MIDEN_LOG=trace ./target/optimized/miden [subcommand] [parameters]
     

    If the level is not specified, warn level is set as default.

    +

    Enable Debugging features

    +

    You can use the run command with --debug parameter to enable debugging with the debug instruction such as debug.stack:

    +
    ./target/optimized/miden run -a [path_to.masm] --debug
    +

    Inputs

    As described here the Miden VM can consume public and secret inputs.

      @@ -335,13 +339,19 @@

      Inputs

      After a program finishes executing, the elements that remain on the stack become the outputs of the program, along with the overflow addresses (overflow_addrs) that are required to reconstruct the stack overflow table.

      Fibonacci example

      In the miden/examples/fib directory, we provide a very simple Fibonacci calculator example. This example computes the 1001st term of the Fibonacci sequence. You can execute this example on Miden VM like so:

      -
      ./target/optimized/miden run -a miden/examples/fib/fib.masm -n 1
      +
      ./target/optimized/miden run -a miden/examples/fib/fib.masm -n 1
       
      +

      Capturing Output

      This will run the example code to completion and will output the top element remaining on the stack.

      If you want the output of the program in a file, you can use the --output or -o flag and specify the path to the output file. For example:

      -
      ./target/optimized/miden run -a miden/examples/fib/fib.masm -o fib.out
      +
      ./target/optimized/miden run -a miden/examples/fib/fib.masm -o fib.out
       

      This will dump the output of the program into the fib.out file. The output file will contain the state of the stack at the end of the program execution.

      +

      Running with debug instruction enabled

      +

      Inside miden/examples/fib/fib.masm, insert debug.stack instruction anywhere between begin and end. Then run:

      +
      ./target/optimized/miden run -a miden/examples/fib/fib.masm -n 1 --debug
      +
      +

      You should see output similar to "Stack state before step ..."

      diff --git a/print.html b/print.html index 73fa0b2192..ac3c48cf26 100644 --- a/print.html +++ b/print.html @@ -478,7 +478,7 @@

      Compili

      Controlling parallelism

      Internally, Miden VM uses rayon for parallel computations. To control the number of threads used to generate a STARK proof, you can use RAYON_NUM_THREADS environment variable.

      GPU acceleration

      -

      Miden VM proof generation can be accelerated via GPUs. Currently, GPU acceleration is enabled only on Apple silicon hardware (via Metal). To compile Miden VM with Metal acceleration enabled, you can run the following command:

      +

      Miden VM proof generation can be accelerated via GPUs. Currently, GPU acceleration is enabled only on Apple Silicon hardware (via Metal). To compile Miden VM with Metal acceleration enabled, you can run the following command:

      make exec-metal
       

      Similar to make exec command, this will place the resulting miden executable into the ./target/optimized directory.

      @@ -506,7 +506,7 @@

      Running Mid
    • debug - this will instantiate a Miden debugger against the specified Miden assembly program and inputs.
    • analyze - this will run a Miden assembly program against specific inputs and will output stats about its execution.
    • repl - this will initiate the Miden REPL tool.
    • -
    • example - this will execute a Miden assembly example program, generate a STARK proof of execution and verify it. Currently it is possible to run blake3 and fibonacci examples.
    • +
    • example - this will execute a Miden assembly example program, generate a STARK proof of execution and verify it. Currently, it is possible to run blake3 and fibonacci examples.

    All of the above subcommands require various parameters to be provided. To get more detailed help on what is needed for a given subcommand, you can run the following:

    ./target/optimized/miden [subcommand] --help
    @@ -520,6 +520,10 @@ 

    Enabling lo
    MIDEN_LOG=trace ./target/optimized/miden [subcommand] [parameters]
     

    If the level is not specified, warn level is set as default.

    +

    Enable Debugging features

    +

    You can use the run command with --debug parameter to enable debugging with the debug instruction such as debug.stack:

    +
    ./target/optimized/miden run -a [path_to.masm] --debug
    +

    Inputs

    As described here the Miden VM can consume public and secret inputs.

      @@ -546,13 +550,19 @@

      Inputs

      After a program finishes executing, the elements that remain on the stack become the outputs of the program, along with the overflow addresses (overflow_addrs) that are required to reconstruct the stack overflow table.

      Fibonacci example

      In the miden/examples/fib directory, we provide a very simple Fibonacci calculator example. This example computes the 1001st term of the Fibonacci sequence. You can execute this example on Miden VM like so:

      -
      ./target/optimized/miden run -a miden/examples/fib/fib.masm -n 1
      +
      ./target/optimized/miden run -a miden/examples/fib/fib.masm -n 1
       
      +

      Capturing Output

      This will run the example code to completion and will output the top element remaining on the stack.

      If you want the output of the program in a file, you can use the --output or -o flag and specify the path to the output file. For example:

      -
      ./target/optimized/miden run -a miden/examples/fib/fib.masm -o fib.out
      +
      ./target/optimized/miden run -a miden/examples/fib/fib.masm -o fib.out
       

      This will dump the output of the program into the fib.out file. The output file will contain the state of the stack at the end of the program execution.

      +

      Running with debug instruction enabled

      +

      Inside miden/examples/fib/fib.masm, insert debug.stack instruction anywhere between begin and end. Then run:

      +
      ./target/optimized/miden run -a miden/examples/fib/fib.masm -n 1 --debug
      +
      +

      You should see output similar to "Stack state before step ..."