Skip to content

Commit

Permalink
chore: rename merkle-tree -> program-libs, create prover & sdk-libs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ananas-block authored Jan 2, 2025
1 parent d720cc9 commit 864a1a1
Show file tree
Hide file tree
Showing 643 changed files with 260 additions and 253 deletions.
6 changes: 3 additions & 3 deletions .github/actions/setup-and-build-nocheck/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
with:
path: |
.local
light-prover/proving-keys
prover/server/proving-keys
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh') }}

- name: Install dependencies
Expand Down Expand Up @@ -72,5 +72,5 @@ runs:
with:
path: |
.local
light-prover/proving-keys
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh') }}
prover/server/proving-keys
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh') }}
10 changes: 5 additions & 5 deletions .github/actions/setup-and-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ runs:
with:
path: |
.local
light-prover/proving-keys
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh', 'light-prover/scripts/download_keys.sh') }}
prover/server/proving-keys
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh', 'prover/server/scripts/download_keys.sh') }}

- name: Install dependencies
if: steps.restore-local-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -62,7 +62,7 @@ runs:
source ./scripts/devenv.sh
mkdir -p /home/runner/.config/solana/
solana-keygen new --no-bip39-passphrase -o /home/runner/.config/solana/id.json
- name: Copy spl_noop.so to target/deploy
shell: bash
run: |
Expand All @@ -75,8 +75,8 @@ runs:
with:
path: |
.local
light-prover/proving-keys
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh', 'light-prover/scripts/download_keys.sh') }}
prover/server/proving-keys
key: ${{ runner.os }}-local-${{ hashFiles('scripts/install.sh', 'prover/server/scripts/download_keys.sh') }}

- name: Check for git changes
shell: bash
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/light-system-programs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
- main
paths:
- "programs/**"
- "test-programs/**"
- "circuit-lib/verifier/**"
- "program-tests/**"
- "program-libs/verifier/**"
- "merkle-tree/**"
- ".github/workflows/light-system-programs-tests.yml"
- "test-utils/**"
Expand All @@ -14,8 +14,8 @@ on:
- "*"
paths:
- "programs/**"
- "test-programs/**"
- "circuit-lib/verifier/**"
- "program-tests/**"
- "program-libs/verifier/**"
- "merkle-tree/**"
- ".github/workflows/light-system-programs-tests.yml"
- "test-utils/**"
Expand Down Expand Up @@ -70,12 +70,12 @@ jobs:
run: |
source ./scripts/devenv.sh
anchor build
npx nx build @lightprotocol/test-programs
npx nx build @lightprotocol/program-tests
- name: ${{ matrix.program }}
run: |
source ./scripts/devenv.sh
IFS=',' read -r -a sub_tests <<< "${{ join(fromJSON(matrix['sub-tests']), ', ') }}"
for subtest in "${sub_tests[@]}"
do
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/prover-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release prover binaries
on:
push:
tags:
- 'light-prover*'
- "light-prover*"

jobs:
create_release:
Expand All @@ -18,7 +18,7 @@ jobs:

- name: Build artifacts
run: |
cd light-prover
cd prover/server
for cfgstr in "darwin amd64" "darwin arm64" "linux amd64" "windows amd64"; do
IFS=' ' read -r -a cfg <<< "$cfgstr"
export GOOS="${cfg[0]}"
Expand All @@ -31,7 +31,7 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: |
light-prover/prover-darwin-amd64
light-prover/prover-darwin-arm64
light-prover/prover-linux-amd64
light-prover/prover-windows-amd64
prover/server/prover-darwin-amd64
prover/server/prover-darwin-arm64
prover/server/prover-linux-amd64
prover/server/prover-windows-amd64
28 changes: 14 additions & 14 deletions .github/workflows/prover-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ on:
push:
branches:
- main
- 'release/**'
- "release/**"
paths:
- "light-prover/**"
- "prover/server/**"
- ".github/workflows/prover-test.yml"
- ".github/workflows/prover-release.yml"
pull_request:
branches:
- "*"
paths:
- "light-prover/**"
- "prover/server/**"
- ".github/workflows/prover-test.yml"
- ".github/workflows/prover-release.yml"
types:
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "./light-prover/go.mod"
go-version-file: "./prover/server/go.mod"

- name: Install Elan
run: |
Expand All @@ -43,50 +43,50 @@ jobs:
- name: Cache dependencies
uses: actions/cache@v4
with:
path: light-prover/formal-verification/lake-packages
path: prover/server/formal-verification/lake-packages
key: "${{ env.LAKE_VERSION }}"

- name: Download keys for lightweight tests
if: ${{ github.event.pull_request.base.ref == 'main' }}
run: |
cd light-prover
cd prover/server
./scripts/download_keys.sh light
- name: Download keys for full tests
if: ${{ github.event.pull_request.base.ref == 'release' }}
run: |
cd light-prover
cd prover/server
./scripts/download_keys.sh full
- name: Build
run: |
cd light-prover
cd prover/server
go build
- name: Unit tests
run: |
cd light-prover
cd prover/server
go test ./prover -timeout 60m
- name: Lightweight integration tests
if: ${{ github.event.pull_request.base.ref == 'main' }}
run: |
cd light-prover
cd prover/server
go test -run TestLightweight -timeout 15m
- name: Full integration tests
if: ${{ github.event.pull_request.base.ref == 'release' }}
run: |
cd light-prover
cd prover/server
go test -run TestFull -timeout 120m
# - name: Extract circuit to Lean
# run: |
# cd light-prover
# cd prover/server
# ./light-prover extract-circuit --output formal-verification/FormalVerification/Circuit.lean --tree-height=26 --compressed-accounts=8

# - name: Build lean project
# run: |
# cd light-prover/formal-verification
# cd prover/server/formal-verification
# ~/.elan/bin/lake exe cache get
# ~/.elan/bin/lake build
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
- ".cargo/**"
- "**/*.rs"
- "**/Cargo.*"
- "light-prover/**"
- "prover/server/**"
- ".github/workflows/rust.yml"
pull_request:
branches:
- "*"
paths:
- "**/*.rs"
- "**/Cargo.*"
- "light-prover/**"
- "prover/server/**"
- ".github/workflows/rust.yml"

types:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ node_modules

/cli/.crates2.json
/cli/.crates.toml
test-programs/e2e-test/**/*.txt
program-tests/e2e-test/**/*.txt
output.txt
.nx/cache
.nx/workspace-data
15 changes: 5 additions & 10 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
assets/ @SwenSchaeferjohann
circuit-lib/ @ananas-block @sergeytimoshin
program-libs/ @ananas-block @sergeytimoshin
cli/ @ananas-block @sergeytimoshin
macro-circom/ @ananas-block
macros/ @vadorovsky
merkle-tree/ @ananas-block @vadorovsky
programs/ @ananas-block @vadorovsky
programs/ @ananas-block
prover.js/ @sergeytimoshin
examples/ @ananas-block @SwenSchaeferjohann
rpc/ @sergeytimoshin @SwenSchaeferjohann
scripts/ @vadorovsky
third-party/ @vadorovsky
scripts/ @ananas-block @sergeytimoshin
third-party/ @ananas-block
tsconfig/ @SwenSchaeferjohann
utils/ @vadorovsky
verifier-sdk/ @ananas-block @vadorovsky
web/ @SwenSchaeferjohann
xtask/ @vadorovsky
xtask/ @ananans-block
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 49 additions & 41 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
[workspace]
resolver = "2"
members = [
"heap",
"circuit-lib/light-prover-client",
"circuit-lib/verifier",
"macros/aligned-sized",
"macros/light",
"macros/light-sdk-macros",
"merkle-tree/*",
"program-libs/aligned-sized",
"program-libs/batched-merkle-tree",
"program-libs/bloom-filter",
"program-libs/hasher",
"program-libs/utils",
"program-libs/verifier",
"program-libs/merkle-tree-metadata",
"program-libs/bounded-vec",
"program-libs/concurrent-merkle-tree",
"program-libs/hash-set",
"program-libs/indexed-merkle-tree",
"programs/account-compression",
"programs/system",
"programs/compressed-token",
"programs/registry",
"client",
"sdk",
"test-utils",
"utils",
"sdk-libs/client",
"sdk-libs/macros",
"sdk-libs/sdk",
"sdk-libs/photon-api",
"sdk-libs/program-test",
"xtask",
"examples/name-service/programs/*",
"examples/token-escrow/programs/*",
"test-programs/account-compression-test/",
"test-programs/compressed-token-test/",
"test-programs/e2e-test/",
"test-programs/registry-test/",
"test-programs/system-cpi-test/",
"test-programs/system-test/",
"test-programs/sdk-test-program/programs/sdk-test/",
"test-programs/create-address-test-program/",
"program-tests/account-compression-test/",
"program-tests/compressed-token-test/",
"program-tests/e2e-test/",
"program-tests/registry-test/",
"program-tests/system-cpi-test/",
"program-tests/system-test/",
"program-tests/sdk-test-program/programs/sdk-test/",
"program-tests/create-address-test-program/",
"program-tests/utils",
"program-tests/merkle-tree",
"forester-utils",
"forester",
"photon-api",
"light-program-test",
]

[profile.release]
Expand Down Expand Up @@ -78,32 +83,35 @@ log = "0.4"
thiserror = "1.0"

# Light Protocol
light-client = { path = "client", version = "0.9.1" }
light-concurrent-merkle-tree = { path = "merkle-tree/concurrent", version = "1.1.0" }
light-hasher = { path = "merkle-tree/hasher", version = "1.1.0" }
light-indexed-merkle-tree = { path = "merkle-tree/indexed", version = "1.1.0" }
light-macros = { path = "macros/light", version = "1.1.0" }
light-merkle-tree-reference = { path = "merkle-tree/reference", version = "1.1.0" }
light-prover-client = { path = "circuit-lib/light-prover-client", version = "1.2.0" }
light-sdk = { path = "sdk", version = "0.11.0" }
light-sdk-macros = { path = "macros/light-sdk-macros", version = "0.4.0" }
light-utils = { path = "utils", version = "1.1.0" }
light-verifier = { path = "circuit-lib/verifier", version = "1.1.0" }
photon-api = { path = "photon-api", version = "0.45.0" }
light-hash-set = { version = "1.2.0", path = "program-libs/hash-set" }
light-indexed-merkle-tree = { version = "1.1.0", path = "program-libs/indexed-merkle-tree" }
light-concurrent-merkle-tree = { version = "1.1.0" , path= "program-libs/concurrent-merkle-tree"}
light-client = { path = "sdk-libs/client", version = "0.9.1" }
light-hasher = { path = "program-libs/hasher", version = "1.1.0" }
light-macros = { path = "program-libs/macros", version = "1.1.0" }
light-merkle-tree-reference = { path = "program-tests/merkle-tree", version = "1.1.0" }
light-heap = { path = "program-libs/heap", version = "1.1.0" }
light-prover-client = { path = "prover/client", version = "1.2.0" }
light-sdk = { path = "sdk-libs/sdk", version = "0.11.0" }
light-sdk-macros = { path = "sdk-libs/macros", version = "0.4.0" }
light-utils = { path = "program-libs/utils", version = "1.1.0" }
light-verifier = { path = "program-libs/verifier", version = "1.1.0" }
photon-api = { path = "sdk-libs/photon-api", version = "0.45.0" }
forester-utils = { path = "forester-utils", version = "1.2.0" }
light-hash-set = { path = "merkle-tree/hash-set", version = "1.2.0" }
account-compression = { path = "programs/account-compression", version = "1.2.0", features = ["cpi"] }
light-compressed-token = { path = "programs/compressed-token", version = "1.2.0", features = ["cpi"] }
light-system-program = { path = "programs/system", version = "1.2.0", features = ["cpi"] }
light-registry = { path = "programs/registry", version = "1.2.0", features = ["cpi"]}
create-address-test-program = { path = "test-programs/create-address-test-program", version = "1.0.0", features = ["cpi"] }
light-program-test = { path = "light-program-test", version = "0.1.0" }
light-batched-merkle-tree = { path = "merkle-tree/batched", version = "0.1.0" }
light-merkle-tree-metadata = { path = "merkle-tree/metadata", version = "0.1.0" }
aligned-sized = { path = "macros/aligned-sized", version = "1.1.0" }
light-bloom-filter = { path = "merkle-tree/bloom-filter", version = "0.1.0" }
light-bounded-vec = { path = "merkle-tree/bounded-vec", version = "1.1.0" }
create-address-test-program = { path = "program-tests/create-address-test-program", version = "1.0.0", features = ["cpi"] }
light-program-test = { path = "sdk-libs/program-test", version = "0.1.0" }
light-batched-merkle-tree = { path = "program-libs/batched-merkle-tree", version = "0.1.0" }
light-merkle-tree-metadata = { path = "program-libs/merkle-tree-metadata", version = "0.1.0" }
aligned-sized = { path = "program-libs/aligned-sized", version = "1.1.0" }
light-bloom-filter = { path = "program-libs/bloom-filter", version = "0.1.0" }
light-bounded-vec = { path = "program-libs/bounded-vec", version = "1.1.0" }
light-poseidon = { version = "0.2.0" }
light-test-utils = { path = "program-tests/utils", version = "1.2.1" }
create-address-program-test = { path = "program-tests/create-address-test-program", version = "1.0.0" }
bytemuck = { version = "1.17" }
# Math and crypto
num-bigint = "0.4.6"
Expand Down
Loading

0 comments on commit 864a1a1

Please sign in to comment.