This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To get started: | |
# 1. Copy this into a file called `shell.nix` locally | |
# 2. Install nix (https://nix.dev/tutorials/install-nix) | |
# 3. Type nix-shell --run "jupyter lab" | |
# 4. Create a new Python notebook by clicking on the button in the browser UI | |
# 5. Put `import eth2spec.capella` into a cell and press Shift+Enter | |
# 6. Put `eth2spec.capella.mainnet.BeaconBlock()` into the next cell and press Shift+Enter | |
{ pkgs ? import (fetchTarball { | |
url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/23.05.tar.gz"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to use: | |
# 1. Make sure you have nix installed (https://nix.dev/install-nix) | |
# 2. Download this file, and name it for example `fireblocks-mpc-lib-wasm32-wasi.nix` | |
# 3. Run `nix-shell fireblocks-mpc-lib-wasm32-wasi.nix`. | |
# 4. Run `wasitest` inside the nix-shell environment to run the paillier benchmark. | |
{ pkgs ? import (builtins.fetchTarball { | |
url = "https://github.com/NixOS/nixpkgs/archive/51d906d2341c9e866e48c2efcaac0f2d70bfd43e.tar.gz"; | |
sha256 = "16nmvxfiyna5y9gwd2i3bhkpbn0nn37i481g53zc0ycw67k268sv"; | |
}) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use winter_math::{FieldElement, fields::f64::BaseElement as Felt}; | |
use winter_prover::{Prover, Trace}; | |
/* +---+---+ Fibonacci: 2 columns per row. | |
| a | b | Single column fibonacci is not possible with this constraint system as that would require looking back more than previous time step. | |
+---+---+ Transition constraints: | |
| c | d | c = a + b | |
+---+---+ d = b + c */ | |
fn main() { | |
let (f0, f1) = (Felt::new(1), Felt::new(1)); |
OlderNewer