diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7843a6fa..8f3b2b608 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,6 @@ jobs: with: fail-fast: true - # Lint dependencies for licensing and auditing issues as per https://github.com/argumentcomputer/lurk-rs/blob/main/deny.toml + # Lint dependencies for licensing and auditing issues as per https://github.com/argumentcomputer/lurk-beta/blob/main/deny.toml licenses-audits: uses: argumentcomputer/ci-workflows/.github/workflows/licenses-audits.yml@main diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 6297c2eb8..7b2277d2e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -52,15 +52,15 @@ jobs: - name: Amend MESSAGE for tests if: steps.tests.outcome != 'success' - run: echo "MESSAGE=${{ env.MESSAGE }} Exhaustive test run failed in https://github.com/argumentcomputer/lurk-rs/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV + run: echo "MESSAGE=${{ env.MESSAGE }} Exhaustive test run failed in https://github.com/argumentcomputer/lurk-beta/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV - name: Amend MESSAGE for benches if: steps.benches.outcome != 'success' - run: echo "MESSAGE=${{ env.MESSAGE }} Bench compilation failed in https://github.com/argumentcomputer/lurk-rs/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV + run: echo "MESSAGE=${{ env.MESSAGE }} Bench compilation failed in https://github.com/argumentcomputer/lurk-beta/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV - name: Amend MESSAGE for doctests if: steps.doctests.outcome != 'success' - run: echo "MESSAGE=${{ env.MESSAGE }} Doc test run failed in https://github.com/argumentcomputer/lurk-rs/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV + run: echo "MESSAGE=${{ env.MESSAGE }} Doc test run failed in https://github.com/argumentcomputer/lurk-beta/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV - name: Find the last report issue open id: last_issue diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf2732791..d667e64fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,13 +62,13 @@ flowchart TD ## Issues We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue. -## Lurk-rs Repository Organization and Dependency Management +## Lurk-beta Repository Organization and Dependency Management -Welcome to the Lurk-rs project! Here's an introduction to the branch organization and the chain of dependencies in the Lurk-rs repository. +Welcome to the Lurk-beta project! Here's an introduction to the branch organization and the chain of dependencies in the Lurk-beta repository. ### Major Dependencies -The main repo is [lurk-rs](https://github.com/argumentcomputer/lurk-rs) with major dependencies: +The main repo is [lurk-beta](https://github.com/argumentcomputer/lurk-beta) with major dependencies: - [bellpepper](https://github.com/argumentcomputer/bellpepper) - [neptune](https://github.com/argumentcomputer/neptune) @@ -76,7 +76,7 @@ The main repo is [lurk-rs](https://github.com/argumentcomputer/lurk-rs) with maj ### Forked Dependencies -Additionally, Lurk-rs depends on the following forked repositories: +Additionally, Lurk-beta depends on the following forked repositories: - [pasta_curves](https://github.com/argumentcomputer/pasta_curves) (forked from [zcash/pasta_curves](https://github.com/zcash/pasta_curves)) - [pasta-msm](https://github.com/argumentcomputer/pasta-msm) (forked from [supranational/pasta-msm](https://github.com/supranational/pasta-msm)) @@ -105,7 +105,7 @@ For rapid iterations and to address issues in these dependencies, Lurk's **main* ```mermaid graph TD - LURK[lurk-rs] --> BELL[bellpepper] + LURK[lurk-beta] --> BELL[bellpepper] LURK --> NEPT[neptune] LURK --> AREC[arecibo] AREC --> NOVA[nova] @@ -129,9 +129,9 @@ To trigger a benchmark: Then, check the following link for the benchmark reports: -https://argumentcomputer.github.io/lurk-rs/benchmarks/criterion/reports/ +https://argumentcomputer.github.io/lurk-beta/benchmarks/criterion/reports/ Ask a maintainer for a benchmark report if you can't find a recent one. ## License -By contributing to lurk-lang, you agree that your contributions will be licensed under both [MIT](https://opensource.org/license/MIT) and [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) licenses. +By contributing to `lurk-beta`, you agree that your contributions will be licensed under both [MIT](https://opensource.org/license/MIT) and [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) licenses. diff --git a/Cargo.toml b/Cargo.toml index 6279f6a58..8b5066697 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -145,9 +145,8 @@ tracing-subscriber = "0.3.17" [workspace.package] authors = ["Argument Engineering "] edition = "2021" -homepage = "https://lurk-lang.org/" license = "MIT OR Apache-2.0" -repository = "https://github.com/argumentcomputer/lurk-rs" +repository = "https://github.com/argumentcomputer/lurk-beta" rust-version = "1.74.1" [[bin]] diff --git a/README.md b/README.md index a7621ebec..578410994 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,17 @@ # Lurk -![lurk-rs](https://github.com/argumentcomputer/lurk-rs/actions/workflows/ci.yml/badge.svg) +![lurk-beta](https://github.com/argumentcomputer/lurk-beta/actions/workflows/ci.yml/badge.svg) ![minimum rustc 1.70][msrv-image] -[![dependency status](https://deps.rs/repo/github/argumentcomputer/lurk-rs/status.svg)](https://deps.rs/repo/github/argumentcomputer/lurk-rs) +[![dependency status](https://deps.rs/repo/github/argumentcomputer/lurk-beta/status.svg)](https://deps.rs/repo/github/argumentcomputer/lurk-beta) ![crates.io][crates-image] [msrv-image]: https://img.shields.io/badge/rustc-1.70+-blue.svg [crates-image]: https://img.shields.io/crates/v/lurk.svg -# Status (Beta) +# Status +> [!NOTE] This repository is in maintenance mode. Development has moved to https://github.com/argumentcomputer/lurk. -Lurk is currently in [Beta](https://blog.lurk-lang.org/posts/lurk-beta/), which is backwards compatible with code that ran in Lurk Alpha and is expected to be compatible with Lurk 1.0. However, some low-level data representations are anticipated to change, and we will be refactoring the evaluation model (and consequently its circuit) for efficiency purposes. Also note that since Lurk inherits some security properties from the underlying proving system, those who would rely on Lurk should investigate the security and status of Nova/SuperNova itself. We encourage early adopters to begin writing real applications taking advantage of Lurk so you can begin to familiarize yourself with the programming model. Likewise, we welcome your feedback -- which will help ensure ongoing development meets user need. +This repository contains the implementation for [Lurk Beta](https://argument.xyz/blog/lurk-beta/), which is backwards compatible with code that ran in Lurk Alpha and is expected to be compatible with Lurk 1.0. However, some low-level data representations are anticipated to change, and we will be refactoring the evaluation model (and consequently its circuit) for efficiency purposes. Also note that since Lurk inherits some security properties from the underlying proving system, those who would rely on Lurk should investigate the security and status of Nova/SuperNova itself. We encourage early adopters to begin writing real applications taking advantage of Lurk so you can begin to familiarize yourself with the programming model. Likewise, we welcome your feedback -- which will help ensure ongoing development meets user need. For support and discussions, please visit our [Zulip forum](https://zulip.argument.xyz/). @@ -40,12 +41,11 @@ It is an explicit design goal that statements about the evaluation of Lurk progr Lurk backend integration is still immature, so current performance is not representative. As a rough approximation, we estimate that for entirely general computation using Lurk's universal circuit, Nova proving throughput will be on the order of 1,000 iterations per second per GPU. We expect that most compute-heavy applications will use optimized 'coprocessor' circuits, which will dramatically improve performance. Planned improvements to Nova will allow for smaller inner circuits, further improving throughput -- and for full parallelization of reduction proofs. # Specs -- [Lurk Spec](https://blog.lurk-lang.org/posts/circuit-spec) - [Evaluation Spec](notes/eval.md) - [Reduction Notes](notes/reduction-notes.md) # Security Audit -Lurk's Alpha release has undergone a [security audit](https://blog.lurk-lang.org/posts/alpha-audit/inference-security-assessment-3-2023.pdf) as of 03/29/2023, performed by [Inference](https://inference.ag/about-us/). +Lurk's Alpha release has undergone a [security audit](https://argument.xyz/inference-security-assessment-3-2023.pdf) as of 03/29/2023, performed by [Inference](https://inference.ag/about-us/). # Versioning @@ -96,7 +96,7 @@ Set the environment variable `LURK_FIELD` to specify the scalar field of the Lur - `LURK_FIELD=VESTA`: scalar field of Vesta ```ignore -➜ lurk-rs ✗ bin/lurk +➜ lurk-beta ✗ bin/lurk Finished release [optimized] target(s) in 0.06s Running `target/release/lurk` Lurk REPL welcomes you. @@ -107,7 +107,7 @@ Lurk REPL welcomes you. Or enable `info` log-level for a trace of reduction frames: ```ignore -➜ lurk-rs ✗ RUST_LOG=lurk::lem::eval=info bin/lurk +➜ lurk-beta ✗ RUST_LOG=lurk::lem::eval=info bin/lurk Finished release [optimized] target(s) in 0.05s Running `target/release/lurk` Lurk REPL welcomes you. diff --git a/benches/common/mod.rs b/benches/common/mod.rs index 3a8c172a9..0bfa2de12 100644 --- a/benches/common/mod.rs +++ b/benches/common/mod.rs @@ -6,7 +6,7 @@ use lurk::config::lurk_config; use once_cell::sync::Lazy; /// Edit this path to use a config file specific to benchmarking -/// E.g. `Utf8PathBuf::from("/home//lurk-rs/lurk-bench.toml");` +/// E.g. `Utf8PathBuf::from("/home//lurk-beta/lurk-bench.toml");` pub(crate) static BENCH_CONFIG_PATH: Lazy = Lazy::new(|| lurk_default_dir().join("lurk.toml")); diff --git a/foil/Cargo.toml b/foil/Cargo.toml index ed3b7ef26..5895716e9 100644 --- a/foil/Cargo.toml +++ b/foil/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" authors = ["porcuquine "] description = "Flat Optimization Intermediate Language" -repository = "https://github.com/argumentcomputer/lurk-rs" +repository = "https://github.com/argumentcomputer/lurk-beta" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] diff --git a/notes/reduction-notes.md b/notes/reduction-notes.md index 29c70e7e6..5c47dd9ca 100644 --- a/notes/reduction-notes.md +++ b/notes/reduction-notes.md @@ -5,15 +5,15 @@ more normalized (but still WIP) specification, see the [Eval Spec](eval.md) The [Lurk Language Specification](https://github.com/argumentcomputer/lurk-lisp/blob/master/spec/v0-1.md) defines evaluation semantics without specifying the internal data structures or computational steps which an implementation must use to -calculate an evaluation. `lurk-rs` implements a concrete instance of the Lurk language for which proofs of correct -evaluation can be generated. `lurk-rs` generates zk-SNARK proofs for multiple backends, and verification of these +calculate an evaluation. `lurk-beta` implements a concrete instance of the Lurk language for which proofs of correct +evaluation can be generated. `lurk-beta` generates zk-SNARK proofs for multiple backends, and verification of these proofs requires reference to a verification key whose identity is derived from the computation encoded in the corresponding arithmetic circuit. The initial Lurk circuit implementation is specified as a Rank-1 Constraint System (R1CS), from which Nova or SuperNova proofs are created. Because the circuit must check the computation to be proved, many aspects of the implementation itself must be fully specified. The reference implementation of Lurk expression evaluation in -[`eval.rs`](https://github.com/argumentcomputer/lurk-rs/blob/main/src/lem/eval.rs) provides an intermediate step between the +[`eval.rs`](https://github.com/argumentcomputer/lurk-beta/blob/main/src/lem/eval.rs) provides an intermediate step between the high-level specification and the low-level circuit. Not every aspect of the implementation is essential, but every part which directly corresponds to the layout of the constraint system is. @@ -32,7 +32,7 @@ Taking these one at a time: 1. Because the SNARK-friendly Poseidon hashes (provided by the [Neptune](https://github.com/argumentcomputer/neptune) library) are relatively expensive, and because Lurk does not provide explicit access to the hash values, we avoid computing them during evaluation -- instead relying on the - [Store](https://github.com/argumentcomputer/lurk-rs/blob/main/src/lem/store.rs) to manage cheaper expression pointers in a way + [Store](https://github.com/argumentcomputer/lurk-beta/blob/main/src/lem/store.rs) to manage cheaper expression pointers in a way that preserves equality. All such pointers are resolved to content-addressable tagged hashes before circuit synthesis. The Store is used during synthesis when the preimage of a hash known at synthesis needs to be 'looked up'. @@ -43,9 +43,9 @@ Taking these one at a time: can then be fully parallelized as desired. -As a matter of interest, we note that the `lurk-rs` evaluator runs about 7x faster than the one implemented in [Common +As a matter of interest, we note that the `lurk-beta` evaluator runs about 7x faster than the one implemented in [Common Lisp](https://github.com/argumentcomputer/lurk-lisp/blob/master/api/api.lisp). The latter's design does not target speed, and we -make this observation only to support our suggestion that the `lurk-rs` evaluator performs well relative to the cost of +make this observation only to support our suggestion that the `lurk-beta` evaluator performs well relative to the cost of proving. It makes sense to evaluate many frames at a time before proving because doing so is cheap. @@ -64,9 +64,9 @@ Read from lurk-lib/example/fib.lurk: (LETREC bin/lurk lurk-lib/example/fib.lurk 2.02s user 0.32s system 98% cpu 2.366 total ``` -## `lurk-rs` (Rust), `(fib 5400)` +## `lurk-beta` (Rust), `(fib 5400)` ``` -➜ lurk-rs git:(spec) ✗ time bin/lurk ../lurk/lurk-lib/example/fib.lurk +➜ lurk-beta git:(spec) ✗ time bin/lurk ../lurk/lurk-lib/example/fib.lurk Finished release [optimized] target(s) in 0.06s Running `target/release/examples/lurk ../lurk/lurk-lib/example/fib.lurk` Lurk REPL welcomes you. @@ -86,7 +86,7 @@ Evaled: 0x1c5d87e5252b038cb7badf6ba7618014c7c16b1541ebece39ab9a40d4f030cbd bin/lurk ../lurk/lurk-lib/example/fib.lurk 0.21s user 0.04s system 74% cpu 0.335 total ``` -Because it also highlights an important detail of the formal reduction algorithm, we note that `lurk-rs` evaluation +Because it also highlights an important detail of the formal reduction algorithm, we note that `lurk-beta` evaluation automatically performs tail-call elimination, which the Common Lisp implementation currently does not. For that reason, the CL implementation encounters a stack overflow by `(fib 5500)`. @@ -108,10 +108,10 @@ This is probably due to heavily nested or infinitely recursive function calls, or a tail call that SBCL cannot or has not optimized away. ``` -Meanwhile, `lurk-rs` happily computes `(fib 500000)` in 12 seconds. +Meanwhile, `lurk-beta` happily computes `(fib 500000)` in 12 seconds. ``` -➜ lurk-rs git:(spec) ✗ time bin/lurk ../lurk/lurk-lib/example/fib.lurk +➜ lurk-beta git:(spec) ✗ time bin/lurk ../lurk/lurk-lib/example/fib.lurk Finished release [optimized] target(s) in 0.06s Running `target/release/examples/lurk ../lurk/lurk-lib/example/fib.lurk` Lurk REPL welcomes you. diff --git a/notes/soundness-notes.md b/notes/soundness-notes.md index faf07bdd9..b339f70b3 100644 --- a/notes/soundness-notes.md +++ b/notes/soundness-notes.md @@ -158,7 +158,7 @@ from the expression. Immediate values are derived with the identity function, an their constituents (both type and value elements) using a hash of appropriate arity and a type-specific preimage layout. For example, an actual Lurk cons has type tag -[`0x01`](https://github.com/argumentcomputer/lurk-rs/blob/a1242270a1285c15b7edb0ab1440f2247f950ead/src/store.rs#L2790), and its +[`0x01`](https://github.com/argumentcomputer/lurk-beta/blob/a1242270a1285c15b7edb0ab1440f2247f950ead/src/store.rs#L2790), and its value is `P4(t0, v0, t1, v1)` -- where `P4` is a 4-ary Poseidon hash, `t0` is the type tag of the first paired expression, `v0` is the value element of the first paired expression, `t1` is the type tag of the second paired expression, and `v1` is the value element of the second paired expression. diff --git a/src/cli/config.rs b/src/cli/config.rs index 2c0d24a0d..58837c00f 100644 --- a/src/cli/config.rs +++ b/src/cli/config.rs @@ -17,7 +17,7 @@ pub(crate) static CLI_CONFIG: OnceCell = OnceCell::new(); /// Gets the `CLI_CONFIG` settings. If uninitialized, sets the global variable /// in the following order (greatest to least precedence): -/// - `settings` map if provided, e.g. with key ("proofs", "$HOME/lurk-rs/proofs") +/// - `settings` map if provided, e.g. with key ("proofs", "$HOME/lurk-beta/proofs") /// This contains any CLI args, set e.g. by `lurk --proofs-dir /path/to/proofs_dir` /// - Env var per setting, e.g. `LURK_PROOFS_DIR` /// - Config file, which also has a configurable location (see `lurk_config_file()`), diff --git a/src/config.rs b/src/config.rs index 8ac79c02a..f1cba94c8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -17,7 +17,7 @@ pub static LURK_CONFIG_FILE: OnceCell = OnceCell::new(); /// Gets the `LURK_CONFIG` settings. If uninitialized, sets the global variable /// in the following order (greatest to least precedence): -/// - `settings` map if provided, e.g. with key ("public_params_dir", "$HOME/lurk-rs/public_params") +/// - `settings` map if provided, e.g. with key ("public_params_dir", "$HOME/lurk-beta/public_params") /// - Env var per setting, e.g. `LURK_PUBLIC_PARAMS_DIR` /// - Config file, which also has a configurable location (see `lurk_config_file()`), /// and has the following syntax for e.g. TOML: @@ -36,7 +36,7 @@ pub fn lurk_config( /// Gets the `LURK_CONFIG_FILE` path. If uninitialized, sets the global variable /// in the following order (greatest to least precedence): -/// - `config_file` parameter if provided, e.g. "$HOME/lurk-rs/lurk-local.toml" +/// - `config_file` parameter if provided, e.g. "$HOME/lurk-beta/lurk-local.toml" /// - `LURK_CONFIG_FILE` env var /// - Default location at `$HOME/.lurk/lurk.toml` or `/.config/lurk.toml` on WASM. pub fn lurk_config_file(config_file: Option<&Utf8PathBuf>) -> &'static Utf8PathBuf { diff --git a/src/proof/tests/nova_tests.rs b/src/proof/tests/nova_tests.rs index 995c4b58e..3fbc1fa9a 100644 --- a/src/proof/tests/nova_tests.rs +++ b/src/proof/tests/nova_tests.rs @@ -1851,7 +1851,7 @@ fn test_prove_fibonacci() { ); } -/// This test is a follow up to https://github.com/argumentcomputer/lurk-rs/pull/931, +/// This test is a follow up to https://github.com/argumentcomputer/lurk-beta/pull/931, /// which reverts a PR that made the "parallel steps" flow break #[test] #[ignore]