diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr-rust.yml similarity index 72% rename from .github/workflows/release-pr.yml rename to .github/workflows/release-pr-rust.yml index db7b9b523f..3c35bb66ff 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr-rust.yml @@ -17,9 +17,8 @@ on: - light-macros - light-merkle-tree-event - light-merkle-tree-reference - - light-protocol + - light-registry - light-test-utils - - light-user-registry - light-utils - light-wasm-hasher - account-compression @@ -51,14 +50,26 @@ jobs: toolchain: stable - name: Install cargo-release + shell: bash run: | VERSION="$(curl --silent "https://api.github.com/repos/crate-ci/cargo-release/releases/latest" | jq -r .tag_name)" + pushd /tmp wget https://github.com/crate-ci/cargo-release/releases/download/"$VERSION"/cargo-release-"$VERSION"-x86_64-unknown-linux-gnu.tar.gz tar -xzvf cargo-release-"$VERSION"-x86_64-unknown-linux-gnu.tar.gz --wildcards '*cargo-release' --strip-components=1 cp cargo-release "$HOME"/.cargo/bin + popd - - uses: cargo-bins/release-pr@v2 + - name: Bump crate version + run: | + cargo release version --execute --no-confirm \ + -p "${{ inputs.crate }}" "${{ inputs.version }}" + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + env: + COMMIT_MESSAGE: "chore: bump version of ${{ inputs.crate }} to ${{ inputs.version }}" with: - github-token: ${{ secrets.GITHUB_TOKEN }} - version: ${{ inputs.version }} - crate-name: ${{ inputs.crate }} + commit-message: ${{ env.COMMIT_MESSAGE }} + title: ${{ env.COMMIT_MESSAGE }} + branch: "bump-${{ inputs.crate }}-to-${{ inputs.version }}" + labels: "version bump" diff --git a/.github/workflows/release-pr-ts.yml b/.github/workflows/release-pr-ts.yml new file mode 100644 index 0000000000..f4e99768e4 --- /dev/null +++ b/.github/workflows/release-pr-ts.yml @@ -0,0 +1,67 @@ +name: Open a TypeScript release PR +on: + workflow_dispatch: + inputs: + package: + description: Package to release + required: true + type: choice + options: + - circuit-lib.js + - cli + - compressed-token + - prover.js + - stateless.js + version: + description: Version to release + required: true + type: string + +jobs: + bump-version: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v2.4.0 + with: + version: 8 + run_install: false + + - name: Install dependencies + run: pnpm install + + - name: Determine the subdirectory + id: subdir + run: | + PROJECT_NAME="${{ inputs.package }}" + if [[ "$PROJECT_NAME" == *"circuit-lib.js"* ]]; then + SUBDIR="circuit-lib/circuit-lib.js" + elif [[ "$PROJECT_NAME" == *"cli"* ]]; then + SUBDIR="cli" + elif [[ "$PROJECT_NAME" == *"compressed-token"* ]]; then + SUBDIR="js/compressed-token" + elif [[ "$PROJECT_NAME" == *"prover.js"* ]]; then + SUBDIR="prover.js" + elif [[ "$PROJECT_NAME" == *"stateless.js"* ]]; then + SUBDIR="js/stateless.js" + fi + echo "subdir='$SUBDIR'" >> "$GITHUB_OUTPUT" + + - name: Bump package version + run: | + cd ${{ steps.subdir.outputs.subdir }} + pnpm version ${{ inputs.version }} + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + env: + COMMIT_MESSAGE: "chore: bump version of ${{ inputs.package }} to ${{ inputs.version }}" + with: + commit-message: ${{ env.COMMIT_MESSAGE }} + title: ${{ env.COMMIT_MESSAGE }} + branch: "bump-${{ inputs.package }}-to-${{ inputs.version }}" + labels: "version bump" + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60c6db87c3..0147a848dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,72 +1,132 @@ -name: Release programs +name: Release on: push: - tags: - - "*" - -permissions: - contents: write + branches: + - main jobs: - build: + auto-tag: runs-on: ubuntu-latest - steps: - name: Checkout sources uses: actions/checkout@v4 with: submodules: true - - name: Setup and build - uses: ./.github/actions/setup-and-build + - name: Setup pnpm + uses: pnpm/action-setup@v2.4.0 + with: + version: 8 + run_install: false + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + + - name: Extract version + id: version + shell: bash + run: | + set -eux + + function rust_version() { + cargo pkgid -p $1 | cut -d "@" -f2 + } + + function ts_version() { + pnpm list --filter $1 --depth 0 --json | jq -r '.[0].version' + } + + COMMIT_MESSAGE=$(git log -1 --pretty=format:'%s') + PACKAGE="" + VERSION="" + LANGUAGE="" + + if [[ "$COMMIT_MESSAGE" == *"bump version of"* ]]; then + PACKAGE=$(echo "$COMMIT_MESSAGE" | grep -o "bump version of [^ ]*" | cut -d " " -f4) + + if [[ -n "$PACKAGE_NAME" ]]; then + # First try getting the Rust version. + VERSION=$(rust_version "$PACKAGE_NAME") + LANGUAGE="rust" + if [[ -z "$VERSION" ]]; then + # If no version was found, try the TypeScript version. + VERSION=$(ts_version "$PACKAGE_NAME") + LANGUAGE="ts" + fi + fi + + if [[ -z "$VERSION" ]] || [[ -z "$LANGUAGE" ]]; then + echo "Could not detect the version ($VERSION) or language ($LANGUAGE) of project $PROJECT" + fi + fi + + echo "package=$PACKAGE" >> "$GITHUB_OUTPUT" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "language=$LANGUAGE" >> "$GITHUB_OUTPUT" - - name: Extract crate name from tag - id: extract-crate + - name: Tag + id: tag + if: ${{ steps.version.outputs.version }} + env: + VERSION: ${{ steps.version.outputs.version }} run: | - TAG_NAME="${GITHUB_REF#refs/tags/}" - CRATE_NAME="$(echo "$TAG_NAME" | rev | cut -d'-' -f2- | rev)" + echo "Creating tag for package: $PACKAGE_NAME v$VERSION" - if [[ "$CRATE_NAME" == *"account-compression"* ]]; then + NEW_TAG="v$VERSION" + git config user.name "GitHub Actions" + git config user.email "github-actions@github.com" + git tag "${PACKAGE_NAME}-${NEW_TAG}" + git push origin "${PACKAGE_NAME}-${NEW_TAG}" + + - name: Release Rust + if: ${{ steps.version.outputs.language }} == "rust" + shell: bash + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + PACKAGE: ${{ steps.version.outputs.package }} + run: | + # Check whether we are building an on-chain program. If yes, prepare + # an artifact. + ARTIFACT="" + if [[ "$ARTIFACT" == *"account-compression"* ]]; then ARTIFACT="account_compression.so" - elif [[ "$CRATE_NAME" == *"light-compressed-pda"* ]]; then + elif [[ "$ARTIFACT" == *"light-compressed-pda"* ]]; then ARTIFACT="light_compressed_pda.so" - elif [[ "$CRATE_NAME" == *"light-compressed-token"* ]]; then + elif [[ "$ARTIFACT" == *"light-compressed-token"* ]]; then ARTIFACT="light_compressed_token.so" - elif [[ "$CRATE_NAME" == *"light-user-registry"* ]]; then + elif [[ "$ARTIFACT" == *"light-user-registry"* ]]; then ARTIFACT="light_user_registry.so" - elif [[ "$CRATE_NAME" == *"light-registry"* ]]; then + elif [[ "$ARTIFACT" == *"light-registry"* ]]; then ARTIFACT="light_registry.so" fi - echo "crate=$CRATE_NAME" >> "$GITHUB_OUTPUT" echo "artifact=$ARTIFACT" >> "$GITHUB_OUTPUT" + if [[ -n "$ARTIFACT" ]]; then + anchor build -p "$PACKAGE" + fi - - name: Prepare artifacts + cargo publish \ + -p "${{ steps.extract-crate.outputs.crate }}" \ + --token "$CARGO_REGISTRY_TOKEN" + + - name: Release TypeScript + if: ${{ steps.version.outputs.language }} == "ts" + shell: bash + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} + NPM_CONFIG_PROVENANCE: true + PACKAGE: ${{ steps.version.outputs.package }} run: | - if [[ "$CRATE_NAME" == *"account-compression"* ]]; then - cp target/deploy/account_compression.so . - elif [[ "$CRATE_NAME" == *"light-compressed-pda"* ]]; then - cp target/deploy/light_compressed_pda.so . - elif [[ "$CRATE_NAME" == *"light-compressed-token"* ]]; then - cp target/deploy/light_compressed_token.so . - elif [[ "$CRATE_NAME" == *"light-user-registry"* ]]; then - cp target/deploy/light_user_registry.so . - elif [[ "$CRATE_NAME" == *"light-registry"* ]]; then - cp target/deploy/light_registry.so . - fi + SUBDIR=$(grep "$PACKAGE" pnpm-workspace.yaml | awk -F '"' '{gsub("/\\*\\*", "", $2); print $2}') + cd "$SUBDIR" + pnpm publish --access public --no-git-checks - - name: Release + - name: GitHub release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: token: ${{ secrets.PAT_TOKEN }} files: | "${{ steps.extract-crate.outputs.artifact }}" - - - name: Run cargo publish - # Skip macro-circom, it has a git dependency preventing it from publishing. - if: steps.extract-crate.outputs.crate != 'macro-circom' - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} - run: | - cargo publish -p "${{ steps.extract-crate.outputs.crate }}" --token "$CARGO_REGISTRY_TOKEN" diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index 9e6c65872b..0000000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Auto Tag Release - -on: - push: - branches: - - main - -jobs: - auto-tag: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - with: - submodules: true - - - name: Auto Tag - run: | - COMMIT_AUTHOR=$(git log -1 --pretty=format:'%an') - if [[ "$COMMIT_AUTHOR" == "github-actions"* ]]; then - CHANGED_FILES=$(git --no-pager show @ --name-only) - PACKAGE_NAME="" - - if [[ "$CHANGED_FILES" == *"macros/aligned-sized"* ]]; then - PACKAGE_NAME="aligned-sized" - elif [[ "$CHANGED_FILES" == *"macros/light"* ]]; then - PACKAGE_NAME="light-macros" - elif [[ "$CHANGED_FILES" == *"programs/merkle-tree"* ]]; then - PACKAGE_NAME="light-merkle-tree-program" - elif [[ "$CHANGED_FILES" == *"psp2in2out"* ]]; then - PACKAGE_NAME="light-psp2in2out" - elif [[ "$CHANGED_FILES" == *"psp10in2out"* ]]; then - PACKAGE_NAME="light-psp10in2out" - elif [[ "$CHANGED_FILES" == *"psp4in4out-app-storage"* ]]; then - PACKAGE_NAME="light-psp4in4out-app-storage" - elif [[ "$CHANGED_FILES" == *"psp2in2out-storage"* ]]; then - PACKAGE_NAME="light-psp2in2out-storage" - elif [[ "$CHANGED_FILES" == *"verifier-sdk"* ]]; then - PACKAGE_NAME="light-verifier-sdk" - elif [[ "$CHANGED_FILES" == *"macro-circom"* ]]; then - PACKAGE_NAME="macro-circom" - fi - - if [[ -n "$PACKAGE_NAME" ]]; then - NEW_TAG="v$(cargo metadata --format-version=1 | jq -r ".packages[] | select(.name == \"$PACKAGE_NAME\") | .version" | head -n 1)" - git config user.name "GitHub Actions" - git config user.email "github-actions@github.com" - git tag "${PACKAGE_NAME}-${NEW_TAG}" - git push origin "${PACKAGE_NAME}-${NEW_TAG}" - fi - fi diff --git a/Cargo.lock b/Cargo.lock index b7c4bb58b1..92397ef2cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -137,7 +137,7 @@ checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" [[package]] name = "aligned-sized" -version = "0.1.0" +version = "0.1.1" dependencies = [ "proc-macro2", "quote", diff --git a/circuit-lib/circuitlib-rs/Cargo.toml b/circuit-lib/circuitlib-rs/Cargo.toml index 291a945d09..c90b47d5f1 100644 --- a/circuit-lib/circuitlib-rs/Cargo.toml +++ b/circuit-lib/circuitlib-rs/Cargo.toml @@ -1,7 +1,11 @@ [package] name = "light-circuitlib-rs" version = "0.1.0" +description = "Crate for interacting with Light Protocol circuits" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" + [features] gnark = ["tokio", "reqwest"] default = ["gnark"] @@ -9,10 +13,10 @@ default = ["gnark"] [dependencies] # light local deps -light-merkle-tree-reference = { path = "../../merkle-tree/reference" } -light-hasher = { path = "../../merkle-tree/hasher" } -light-indexed-merkle-tree = { path = "../../merkle-tree/indexed" } -light-utils = { path = "../../utils" } +light-merkle-tree-reference = { path = "../../merkle-tree/reference", version = "0.1.0" } +light-hasher = { path = "../../merkle-tree/hasher", version = "0.1.0" } +light-indexed-merkle-tree = { path = "../../merkle-tree/indexed", version = "0.1.0" } +light-utils = { path = "../../utils", version = "0.1.0" } # ark dependencies ark-serialize = "0.4.2" ark-ec = "0.4.2" diff --git a/circuit-lib/verifier/Cargo.toml b/circuit-lib/verifier/Cargo.toml index 77f137853b..02489526a5 100644 --- a/circuit-lib/verifier/Cargo.toml +++ b/circuit-lib/verifier/Cargo.toml @@ -1,7 +1,11 @@ [package] name = "light-verifier" version = "0.1.0" +description = "ZKP proof verifier used in Light Protocol" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" + [features] solana = ["solana-program"] @@ -14,4 +18,4 @@ solana-program = { version = "1.18.11", optional = true } [dev-dependencies] tokio = { version = "1.36.0", features = ["rt", "macros"] } reqwest = { version = "0.11.24", features = ["json", "rustls-tls"] } -light-circuitlib-rs = { path = "../circuitlib-rs" } \ No newline at end of file +light-circuitlib-rs = { path = "../circuitlib-rs", version = "0.1.0" } diff --git a/examples/token-escrow/programs/token-escrow/Cargo.toml b/examples/token-escrow/programs/token-escrow/Cargo.toml index 14c6d61df9..1dcbc1e486 100644 --- a/examples/token-escrow/programs/token-escrow/Cargo.toml +++ b/examples/token-escrow/programs/token-escrow/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "token-escrow" version = "0.1.0" -description = "Created with Anchor" +description = "Solana escrow implementation using account compression" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [lib] @@ -18,12 +20,12 @@ default = ["custom-heap"] test-sbf = [] [dependencies] -anchor-lang ={ version="0.29.0", features = ["init-if-needed"] } -light-compressed-token = { path = "../../../../programs/compressed-token" , features = ["cpi"]} -light-compressed-pda = { path = "../../../../programs/compressed-pda" , features = ["cpi"]} -account-compression = { path = "../../../../programs/account-compression" , features = ["cpi"] } -light-hasher = { path = "../../../../merkle-tree/hasher" } -light-verifier = {path = "../../../../circuit-lib/verifier"} +anchor-lang = { version="0.29.0", features = ["init-if-needed"] } +light-compressed-token = { path = "../../../../programs/compressed-token", version = "0.3.0", features = ["cpi"]} +light-compressed-pda = { path = "../../../../programs/compressed-pda", version = "0.3.0", features = ["cpi"]} +account-compression = { path = "../../../../programs/account-compression", version = "0.3.1", features = ["cpi"] } +light-hasher = { path = "../../../../merkle-tree/hasher", version = "0.1.0" } +light-verifier = { path = "../../../../circuit-lib/verifier", version = "0.1.0" } [target.'cfg(not(target_os = "solana"))'.dependencies] solana-sdk = "1.18.11" @@ -33,7 +35,7 @@ solana-program-test = "1.18.11" light-test-utils = { version = "0.1.0", path = "../../../../test-utils", default-features= true, features = ["test_indexer", "light_program"] } reqwest = "0.12" tokio = "1.36.0" -light-circuitlib-rs = {path = "../../../../circuit-lib/circuitlib-rs"} +light-circuitlib-rs = { path = "../../../../circuit-lib/circuitlib-rs", version = "0.1.0" } num-bigint = "0.4.4" num-traits = "0.2.18" spl-token = "3.5.0" diff --git a/hasher.rs/src/wasm/Cargo.toml b/hasher.rs/src/wasm/Cargo.toml index fdcaeec816..bed1312417 100644 --- a/hasher.rs/src/wasm/Cargo.toml +++ b/hasher.rs/src/wasm/Cargo.toml @@ -2,8 +2,9 @@ name = "light-wasm-hasher" version = "0.1.0" edition = "2021" -description = "Light Protocol Rust client" -license = "GPL-3.0" +description = "WASM wrapper for blake2 and Poseidon hashing" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" [lib] crate-type = ["cdylib", "rlib"] diff --git a/heap/Cargo.toml b/heap/Cargo.toml index 02765beccf..a9a5701904 100644 --- a/heap/Cargo.toml +++ b/heap/Cargo.toml @@ -1,6 +1,9 @@ [package] name = "light-heap" version = "0.1.0" +description = "Custom heap allocator used in Light Protocol" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [dependencies] diff --git a/macros/aligned-sized/Cargo.toml b/macros/aligned-sized/Cargo.toml index 8c9342297b..166d441714 100644 --- a/macros/aligned-sized/Cargo.toml +++ b/macros/aligned-sized/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "aligned-sized" -version = "0.1.0" +version = "0.1.1" description = "A macro which ensures the alignment and calculates the size of a struct" -license = "GPL-3.0" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [lib] diff --git a/macros/light/Cargo.toml b/macros/light/Cargo.toml index 4de2530d5a..adc63c35a2 100644 --- a/macros/light/Cargo.toml +++ b/macros/light/Cargo.toml @@ -2,7 +2,8 @@ name = "light-macros" version = "0.3.1" description = "Macros used in Light Protocol on-chain programs" -license = "GPL-3.0" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [dependencies] diff --git a/merkle-tree/bounded-vec/Cargo.toml b/merkle-tree/bounded-vec/Cargo.toml index 5d63b6b3c2..670d1863da 100644 --- a/merkle-tree/bounded-vec/Cargo.toml +++ b/merkle-tree/bounded-vec/Cargo.toml @@ -1,6 +1,9 @@ [package] name = "light-bounded-vec" version = "0.1.0" +description = "Bounded and cyclic vector implementations" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [features] diff --git a/merkle-tree/concurrent/Cargo.toml b/merkle-tree/concurrent/Cargo.toml index 2c8326a711..a8d1cf53a2 100644 --- a/merkle-tree/concurrent/Cargo.toml +++ b/merkle-tree/concurrent/Cargo.toml @@ -3,6 +3,7 @@ name = "light-concurrent-merkle-tree" version = "0.1.0" edition = "2021" description = "Concurrent Merkle tree implementation" +repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" [features] diff --git a/merkle-tree/hash-set/Cargo.toml b/merkle-tree/hash-set/Cargo.toml index 9e6b23565a..0962c91532 100644 --- a/merkle-tree/hash-set/Cargo.toml +++ b/merkle-tree/hash-set/Cargo.toml @@ -1,14 +1,17 @@ [package] name = "light-hash-set" version = "0.1.0" +description = "Hash set which can be stored on a Solana account" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [features] solana = ["solana-program"] [dependencies] -light-bounded-vec = { path = "../bounded-vec" } -light-utils = { path = "../../utils" } +light-bounded-vec = { path = "../bounded-vec", version = "0.1.0" } +light-utils = { path = "../../utils", version = "0.1.0" } memoffset = "0.9" num-bigint = "0.4" num-traits = "0.2" diff --git a/merkle-tree/hasher/Cargo.toml b/merkle-tree/hasher/Cargo.toml index 83429b4862..7818cb4eda 100644 --- a/merkle-tree/hasher/Cargo.toml +++ b/merkle-tree/hasher/Cargo.toml @@ -1,6 +1,9 @@ [package] name = "light-hasher" version = "0.1.0" +description = "Trait for generic usage of hash functions on Solana" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [features] diff --git a/merkle-tree/indexed/Cargo.toml b/merkle-tree/indexed/Cargo.toml index de358612fe..4a3af3050c 100644 --- a/merkle-tree/indexed/Cargo.toml +++ b/merkle-tree/indexed/Cargo.toml @@ -1,6 +1,9 @@ [package] name = "light-indexed-merkle-tree" version = "0.1.0" +description = "Implementation of indexed (and concurrent) Merkle tree in Rust" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [features] diff --git a/merkle-tree/reference/Cargo.toml b/merkle-tree/reference/Cargo.toml index 72c1064641..b14f1622d3 100644 --- a/merkle-tree/reference/Cargo.toml +++ b/merkle-tree/reference/Cargo.toml @@ -1,6 +1,9 @@ [package] name = "light-merkle-tree-reference" version = "0.1.0" +description = "Non-sparse reference Merkle tree implementation" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [dependencies] diff --git a/programs/account-compression/Cargo.toml b/programs/account-compression/Cargo.toml index fec8ceadf3..bd47d6a0ab 100644 --- a/programs/account-compression/Cargo.toml +++ b/programs/account-compression/Cargo.toml @@ -2,6 +2,7 @@ name = "account-compression" version = "0.3.1" description = "Solana account compression program" +repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" edition = "2021" @@ -20,7 +21,7 @@ default = ["custom-heap", "mem-profiling"] test-sbf = [] [dependencies] -aligned-sized = { version = "0.1.0", path = "../../macros/aligned-sized" } +aligned-sized = { version = "0.1.1", path = "../../macros/aligned-sized" } anchor-lang = "0.29.0" ark-ff = "0.4.0" borsh = "0.10.3" @@ -29,12 +30,12 @@ light-bounded-vec = { version = "0.1.0", path = "../../merkle-tree/bounded-vec", light-hash-set = { version = "0.1.0", path = "../../merkle-tree/hash-set", features = ["solana"] } light-hasher = { version = "0.1.0", path = "../../merkle-tree/hasher", features = ["solana"] } light-heap = { version = "0.1.0", path = "../../heap", optional = true } -light-concurrent-merkle-tree = { path = "../../merkle-tree/concurrent", features = ["solana"] } +light-concurrent-merkle-tree = { version = "0.1.0", path = "../../merkle-tree/concurrent", features = ["solana"] } light-indexed-merkle-tree = { version = "0.1.0", path = "../../merkle-tree/indexed", features = ["solana"] } light-utils = { version = "0.1.0", path = "../../utils" } light-macros = { version = "0.3.1", path = "../../macros/light/" } num-bigint = "0.4" -light-verifier = {path = "../../circuit-lib/verifier" , features = ["solana"] } +light-verifier = { path = "../../circuit-lib/verifier", version = "0.1.0", features = ["solana"] } ark-serialize = "^0.4.0" num-traits = "0.2.18" diff --git a/programs/compressed-pda/Cargo.toml b/programs/compressed-pda/Cargo.toml index 100eb44f17..9cc54ef0b8 100644 --- a/programs/compressed-pda/Cargo.toml +++ b/programs/compressed-pda/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "light-compressed-pda" version = "0.3.0" -description = "Registry for Light Protocol users" +description = "Generalized PDA compression on Solana" +repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" edition = "2021" @@ -20,17 +21,17 @@ default = ["custom-heap", "mem-profiling"] test-sbf = [] [dependencies] -aligned-sized = { version = "0.1.0", path = "../../macros/aligned-sized" } +aligned-sized = { version = "0.1.1", path = "../../macros/aligned-sized" } anchor-lang = "0.29.0" bytemuck = "1.14" light-hasher = { version = "0.1.0", path = "../../merkle-tree/hasher" } light-heap = { version = "0.1.0", path = "../../heap", optional = true } -light-macros = { path = "../../macros/light" } +light-macros = { path = "../../macros/light", version = "0.3.1" } account-compression = { version = "0.3.1", path = "../account-compression", features = ["cpi"] } -light-concurrent-merkle-tree = { path = "../../merkle-tree/concurrent" } +light-concurrent-merkle-tree = { path = "../../merkle-tree/concurrent", version = "0.1.0" } light-utils = { version = "0.1.0", path = "../../utils" } -groth16-solana = { git= "https://github.com/Lightprotocol/groth16-solana", branch="master"} -light-verifier = {path = "../../circuit-lib/verifier" , features = ["solana"] } +groth16-solana = { git = "https://github.com/Lightprotocol/groth16-solana", branch="master"} +light-verifier = { path = "../../circuit-lib/verifier", version = "0.1.0", features = ["solana"] } [target.'cfg(not(target_os = "solana"))'.dependencies] solana-sdk = "1.18.11" @@ -43,10 +44,10 @@ solana-sdk = "1.18.11" serde_json = "1.0.114" reqwest = "0.12" tokio = "1.36.0" -light-test-utils = { version = "0.1.0", path = "../../test-utils"} -light-circuitlib-rs = {path = "../../circuit-lib/circuitlib-rs"} -light-merkle-tree-reference = {path = "../../merkle-tree/reference/"} -light-indexed-merkle-tree = {path = "../../merkle-tree/indexed/"} +light-test-utils = { version = "0.1.0", path = "../../test-utils" } +light-circuitlib-rs = { version = "0.1.0", path = "../../circuit-lib/circuitlib-rs" } +light-merkle-tree-reference = { version = "0.1.0", path = "../../merkle-tree/reference/" } +light-indexed-merkle-tree = { version = "0.1.0", path = "../../merkle-tree/indexed/" } num-bigint = "0.4.4" num-traits = "0.2.18" lazy_static = "1.4.0" diff --git a/programs/compressed-token/Cargo.toml b/programs/compressed-token/Cargo.toml index 400e0dc74f..fe57825eb7 100644 --- a/programs/compressed-token/Cargo.toml +++ b/programs/compressed-token/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "light-compressed-token" version = "0.3.0" -description = "Registry for Light Protocol users" +description = "Generalized token compression on Solana" +repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" edition = "2021" @@ -22,7 +23,7 @@ test-sbf = [] [dependencies] anchor-lang = "0.29.0" anchor-spl = "0.29.0" -aligned-sized = { version = "0.1.0", path = "../../macros/aligned-sized" } +aligned-sized = { version = "0.1.1", path = "../../macros/aligned-sized" } account-compression = { version = "0.3.1", path = "../account-compression", features = ["cpi"] } light-compressed-pda = { version = "0.3.0", path = "../compressed-pda", features = ["cpi"] } bytemuck = "1.14" @@ -30,7 +31,7 @@ solana-security-txt = "1.1.0" light-hasher = { version = "0.1.0", path = "../../merkle-tree/hasher" } light-heap = { version = "0.1.0", path = "../../heap", optional = true } light-utils = { version = "0.1.0", path = "../../utils" } -light-verifier = {path = "../../circuit-lib/verifier" } +light-verifier = { version = "0.1.0", path = "../../circuit-lib/verifier" } spl-token = "3.5.0" @@ -42,7 +43,7 @@ solana-program-test = "1.18.11" light-test-utils = { version = "0.1.0", path = "../../test-utils"} reqwest = "0.11.26" tokio = "1.36.0" -light-circuitlib-rs = {path = "../../circuit-lib/circuitlib-rs"} +light-circuitlib-rs = { version = "0.1.0", path = "../../circuit-lib/circuitlib-rs" } num-bigint = "0.4.4" num-traits = "0.2.18" light-merkle-tree-reference = { version = "0.1.0", path = "../../merkle-tree/reference" } diff --git a/programs/registry/Cargo.toml b/programs/registry/Cargo.toml index cd913b1bb1..70d2df844e 100644 --- a/programs/registry/Cargo.toml +++ b/programs/registry/Cargo.toml @@ -1,7 +1,8 @@ [package] name = "light-registry" version = "0.3.0" -description = "Light core protocol logic." +description = "Light core protocol logic" +repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" edition = "2021" @@ -20,7 +21,7 @@ default = ["custom-heap", "mem-profiling"] test-sbf = [] [dependencies] -aligned-sized = { version = "0.1.0", path = "../../macros/aligned-sized" } +aligned-sized = { version = "0.1.1", path = "../../macros/aligned-sized" } anchor-lang = "0.29.0" bytemuck = "1.14" light-hasher = { version = "0.1.0", path = "../../merkle-tree/hasher" } diff --git a/programs/user-registry/Cargo.toml b/programs/user-registry/Cargo.toml index 5b18bdb456..d0adef1b10 100644 --- a/programs/user-registry/Cargo.toml +++ b/programs/user-registry/Cargo.toml @@ -2,7 +2,8 @@ name = "light-user-registry" version = "0.3.0" description = "Registry for Light Protocol users" -license = "GPL-3.0" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [lib] @@ -17,6 +18,6 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -aligned-sized = { version = "0.1.0", path = "../../macros/aligned-sized" } +aligned-sized = { version = "0.1.1", path = "../../macros/aligned-sized" } anchor-lang = "0.29.0" bytemuck = "1.14" diff --git a/test-programs/program-owned-account-test/Cargo.toml b/test-programs/program-owned-account-test/Cargo.toml index 8c650b3cdf..e7f962296d 100644 --- a/test-programs/program-owned-account-test/Cargo.toml +++ b/test-programs/program-owned-account-test/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "program-owned-account-test" version = "0.1.0" -description = "Created with Anchor" +description = "Test program using generalized account compression" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [lib] @@ -19,11 +21,11 @@ default = ["custom-heap"] [dependencies] anchor-lang ={ version="0.29.0" } -light-compressed-token = { path = "../../programs/compressed-token" , features = ["cpi"]} -light-compressed-pda = { path = "../../programs/compressed-pda" , features = ["cpi"]} -account-compression = { path = "../../programs/account-compression" , features = ["cpi"] } -light-hasher = {path = "../../merkle-tree/hasher"} -light-utils = {path = "../../utils"} +light-compressed-token = { path = "../../programs/compressed-token", version = "0.3.0", features = ["cpi"]} +light-compressed-pda = { path = "../../programs/compressed-pda", version = "0.3.0", features = ["cpi"]} +account-compression = { path = "../../programs/account-compression", version = "0.3.1", features = ["cpi"] } +light-hasher = { path = "../../merkle-tree/hasher", version = "0.1.0" } +light-utils = { path = "../../utils", version = "0.1.0" } [target.'cfg(not(target_os = "solana"))'.dependencies] solana-sdk = "1.18.11" @@ -34,7 +36,7 @@ solana-program-test = "1.18.11" light-test-utils = { version = "0.1.0", path = "../../test-utils", default-features= true, features = ["test_indexer"] } reqwest = "0.11.26" tokio = "1.36.0" -light-circuitlib-rs = {path = "../../circuit-lib/circuitlib-rs"} +light-circuitlib-rs = { path = "../../circuit-lib/circuitlib-rs", version = "0.1.0" } num-bigint = "0.4.4" num-traits = "0.2.18" spl-token = "3.5.0" diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index aa29fa0495..2f21973226 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -1,6 +1,9 @@ [package] name = "light-test-utils" version = "0.1.0" +description = "Utilities used in Light Protocol program tests" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [features] @@ -13,26 +16,26 @@ default = ["light_program", "account_compression"] anchor-lang = "0.29.0" anyhow = "1.0" ark-ff = "0.4" -light-hash-set = { path = "../merkle-tree/hash-set", version = "0.1" } +light-hash-set = { path = "../merkle-tree/hash-set", version = "0.1.0" } num-bigint = "0.4" num-traits = "0.2" solana-program-test = "1.18.11" solana-sdk = "1.18.11" thiserror = "1.0" -light-macros = {path = "../macros/light"} -account-compression = {path = "../programs/account-compression", features = ["cpi"], optional= true} -light-compressed-token = {path = "../programs/compressed-token", features = ["cpi"], optional= true} -light-compressed-pda = {path = "../programs/compressed-pda", features = ["cpi"], optional= true} -light-registry = { path = "../programs/registry", features = ["cpi"], optional= true } -spl-token = {version="3.5.0", features = ["no-entrypoint"]} +light-macros = { path = "../macros/light", version = "0.3.1" } +account-compression = { path = "../programs/account-compression", version = "0.3.1", features = ["cpi"], optional = true } +light-compressed-token = { path = "../programs/compressed-token", version = "0.3.0", features = ["cpi"], optional= true } +light-compressed-pda = { path = "../programs/compressed-pda", version = "0.3.0", features = ["cpi"], optional= true} +light-registry = { path = "../programs/registry", version = "0.3.0", features = ["cpi"], optional= true } +spl-token = { version="3.5.0", features = ["no-entrypoint"] } tokio = "1.36" -light-circuitlib-rs = {path = "../circuit-lib/circuitlib-rs", version = "0.1"} +light-circuitlib-rs = { path = "../circuit-lib/circuitlib-rs", version = "0.1.0" } reqwest = "0.11.26" light-hasher = { version = "0.1.0", path = "../merkle-tree/hasher" } light-merkle-tree-reference = { version = "0.1.0", path = "../merkle-tree/reference" } anchor-spl = "0.29.0" -light-indexed-merkle-tree = {path = "../merkle-tree/indexed/"} -light-verifier = {path = "../circuit-lib/verifier" } +light-indexed-merkle-tree = { path = "../merkle-tree/indexed/", version = "0.1.0" } +light-verifier = { path = "../circuit-lib/verifier", version = "0.1.0" } [dev-dependencies] rand = "0.8" diff --git a/utils/Cargo.toml b/utils/Cargo.toml index 712cee5854..3d205cf777 100644 --- a/utils/Cargo.toml +++ b/utils/Cargo.toml @@ -1,6 +1,9 @@ [package] name = "light-utils" version = "0.1.0" +description = "Common utility functions used in Light Protocol" +repository = "https://github.com/Lightprotocol/light-protocol" +license = "Apache-2.0" edition = "2021" [dependencies] diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 5a890f51f4..07eb993a6c 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -account-compression = { path = "../programs/account-compression" } +account-compression = { path = "../programs/account-compression", version = "0.3.1" } anyhow = "1.0" ark-ff = "0.4" clap = { version = "4", features = ["derive"] }