Skip to content

Commit e96ca3c

Browse files
chore: cli 0.25.0 (#1813)
* chore: cli update version constants, bump version to 0.23.0 * chore: bump cli version to 0.24.0 (#1762) * feat: add --sbf-programs flag, chore: bump versions and template tag * bump * bump version, fix files --------- Co-authored-by: ananas-block <jorrit@lightprotocol.com> * chore: support v2 compressed account template * chore: bump cli version to 0.25.0 --------- Co-authored-by: Swen Schäferjohann <42959314+SwenSchaeferjohann@users.noreply.github.com>
1 parent e7aad59 commit e96ca3c

File tree

5 files changed

+123
-29
lines changed

5 files changed

+123
-29
lines changed

cli/package.json

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightprotocol/zk-compression-cli",
3-
"version": "0.22.0",
3+
"version": "0.25.0",
44
"description": "ZK Compression: Secure Scaling on Solana",
55
"maintainers": [
66
{
@@ -16,20 +16,55 @@
1616
"files": [
1717
"/accounts",
1818
"/bin",
19+
"!bin/cargo-generate",
1920
"/dist",
2021
"/test_bin",
2122
"./config.json",
2223
"/npm-shrinkwrap.json",
2324
"/oclif.manifest.json",
24-
"!bin/proving-keys/address-append_26_1.key",
25-
"!bin/proving-keys/address-append_26_1.vkey",
26-
"!bin/proving-keys/address-append_26_10.key",
27-
"!bin/proving-keys/address-append_26_10.vkey",
28-
"!bin/proving-keys/append-with-proofs_26_10.key",
29-
"!bin/proving-keys/append-with-proofs_26_10.vkey",
25+
"bin/proving-keys/combined_26_1_1.key",
26+
"bin/proving-keys/combined_26_1_1.vkey",
27+
"bin/proving-keys/combined_26_1_10.key",
28+
"bin/proving-keys/combined_26_1_10.vkey",
29+
"bin/proving-keys/combined_26_10_1.key",
30+
"bin/proving-keys/combined_26_10_1.vkey",
31+
"bin/proving-keys/combined_26_10_10.key",
32+
"bin/proving-keys/combined_26_10_10.vkey",
33+
"bin/proving-keys/inclusion_26_1.key",
34+
"bin/proving-keys/inclusion_26_1.vkey",
35+
"bin/proving-keys/inclusion_26_10.key",
36+
"bin/proving-keys/inclusion_26_10.vkey",
37+
"bin/proving-keys/non-inclusion_26_1.key",
38+
"bin/proving-keys/non-inclusion_26_1.vkey",
39+
"bin/proving-keys/non-inclusion_26_10.key",
40+
"bin/proving-keys/non-inclusion_26_10.vkey",
3041
"!bin/proving-keys/update_26_10.key",
3142
"!bin/proving-keys/update_26_10.vkey",
32-
"!bin/cargo-generate"
43+
"!bin/proving-keys/address-append_40_1.key",
44+
"!bin/proving-keys/address-append_40_1.vkey",
45+
"!bin/proving-keys/address-append_40_10.key",
46+
"!bin/proving-keys/address-append_40_10.vkey",
47+
"!bin/proving-keys/append-with-proofs_26_10.key",
48+
"!bin/proving-keys/append-with-proofs_26_10.vkey",
49+
"!bin/proving-keys/append-with-subtrees_26_10.key",
50+
"!bin/proving-keys/append-with-subtrees_26_10.vkey",
51+
"!bin/proving-keys/non-inclusion_40_1.vkey",
52+
"!bin/proving-keys/non-inclusion_40_2.vkey",
53+
"!bin/proving-keys/non-inclusion_40_3.vkey",
54+
"!bin/proving-keys/non-inclusion_40_4.vkey",
55+
"!bin/proving-keys/non-inclusion_40_8.vkey",
56+
"!bin/proving-keys/mainnet_inclusion_26_1.key",
57+
"!bin/proving-keys/mainnet_inclusion_26_1.vkey",
58+
"!bin/proving-keys/mainnet_inclusion_26_2.vkey",
59+
"!bin/proving-keys/mainnet_inclusion_26_3.vkey",
60+
"!bin/proving-keys/mainnet_inclusion_26_4.vkey",
61+
"!bin/proving-keys/mainnet_inclusion_26_8.vkey",
62+
"!bin/proving-keys/inclusion_32_1.key",
63+
"!bin/proving-keys/inclusion_32_1.vkey",
64+
"!bin/proving-keys/inclusion_32_2.vkey",
65+
"!bin/proving-keys/inclusion_32_3.vkey",
66+
"!bin/proving-keys/inclusion_32_4.vkey",
67+
"!bin/proving-keys/inclusion_32_8.vkey"
3368
],
3469
"dependencies": {
3570
"@coral-xyz/anchor": "0.29.0",

cli/src/commands/init/index.ts

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { sleep, UtilsError, UtilsErrorCode } from "@lightprotocol/stateless.js";
1+
import {
2+
sleep,
3+
STATE_MERKLE_TREE_NETWORK_FEE,
4+
UtilsError,
5+
UtilsErrorCode,
6+
} from "@lightprotocol/stateless.js";
27
import { Args, Command, Flags } from "@oclif/core";
38
import { executeCommand } from "../../utils/process";
49
import { downloadBinIfNotExists } from "../../psp-utils";
@@ -9,6 +14,8 @@ import {
914
LIGHT_HASHER_VERSION,
1015
LIGHT_MACROS_VERSION,
1116
LIGHT_SDK_VERSION,
17+
LIGHT_SDK_MACROS_VERSION,
18+
LIGHT_UTILS_VERSION,
1219
LIGHT_VERIFIER_VERSION,
1320
SOLANA_SDK_VERSION,
1421
LIGHT_CLIENT_VERSION,
@@ -17,6 +24,10 @@ import {
1724
TOKIO_VERSION,
1825
COMPRESSED_PROGRAM_TEMPLATE_TAG,
1926
LIGHT_COMPRESSED_ACCOUNT_VERSION,
27+
LIGHT_ACCOUNT_CHECKS,
28+
STATELESS_JS_VERSION,
29+
LIGHT_CLI_VERSION,
30+
SOLANA_CLI_VERSION,
2031
} from "../../utils/constants";
2132
import {
2233
CARGO_GENERATE_TAG,
@@ -73,10 +84,8 @@ export const initRepo = async (name: string, flags: any) => {
7384
kebabCaseName,
7485
"--git",
7586
"https://github.com/Lightprotocol/compressed-program-template",
76-
// "--tag",
77-
// COMPRESSED_PROGRAM_TEMPLATE_TAG,
78-
"--branch",
79-
"jorrit/refactor-to-light-sdk-v2",
87+
"--tag",
88+
COMPRESSED_PROGRAM_TEMPLATE_TAG,
8089
"--define",
8190
`rust-name=${kebabCaseName}`,
8291
"--define",
@@ -94,8 +103,14 @@ export const initRepo = async (name: string, flags: any) => {
94103
"--define",
95104
`light-macros-version=${LIGHT_MACROS_VERSION}`,
96105
"--define",
106+
`light-account-checks-version=${LIGHT_ACCOUNT_CHECKS}`,
107+
"--define",
97108
`light-sdk-version=${LIGHT_SDK_VERSION}`,
98109
"--define",
110+
`light-sdk-macros-version=${LIGHT_SDK_MACROS_VERSION}`,
111+
"--define",
112+
`light-utils-version=${LIGHT_UTILS_VERSION}`,
113+
"--define",
99114
`light-compressed-account-version=${LIGHT_COMPRESSED_ACCOUNT_VERSION}`,
100115
"--define",
101116
`light-verifier-version=${LIGHT_VERIFIER_VERSION}`, // TODO: remove
@@ -111,6 +126,14 @@ export const initRepo = async (name: string, flags: any) => {
111126
`solana-program-test-version=${SOLANA_PROGRAM_TEST_VERSION}`, // TODO: remove
112127
"--define",
113128
`tokio-version=${TOKIO_VERSION}`,
129+
"--define",
130+
`stateless-js-version=${STATELESS_JS_VERSION}`,
131+
"--define",
132+
`anchor-js-version=${ANCHOR_VERSION}`,
133+
"--define",
134+
`light-cli-version=${LIGHT_CLI_VERSION}`,
135+
"--define",
136+
`solana-cli-version=${SOLANA_CLI_VERSION}`,
114137
],
115138
logFile: true,
116139
env: env,

cli/src/commands/test-validator/index.ts

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import { Command, Flags } from "@oclif/core";
2+
import { initTestEnv, stopTestEnv } from "../../utils/initTestEnv";
23
import {
3-
initTestEnv,
4-
stopTestEnv,
5-
SYSTEM_PROGRAMS,
6-
} from "../../utils/initTestEnv";
7-
import { CustomLoader } from "../../utils/index";
4+
CustomLoader,
5+
LIGHT_ACCOUNT_COMPRESSION_TAG,
6+
LIGHT_COMPRESSED_TOKEN_TAG,
7+
LIGHT_REGISTRY_TAG,
8+
LIGHT_SYSTEM_PROGRAM_TAG,
9+
SPL_NOOP_PROGRAM_TAG,
10+
} from "../../utils/index";
811
import path from "path";
912
import fs from "fs";
1013

@@ -241,3 +244,31 @@ class SetupCommand extends Command {
241244
}
242245

243246
export default SetupCommand;
247+
248+
export const SYSTEM_PROGRAMS = [
249+
{
250+
id: "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV",
251+
name: "spl_noop.so",
252+
tag: SPL_NOOP_PROGRAM_TAG,
253+
},
254+
{
255+
id: "SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7",
256+
name: "light_system_program.so",
257+
tag: LIGHT_SYSTEM_PROGRAM_TAG,
258+
},
259+
{
260+
id: "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",
261+
name: "light_compressed_token.so",
262+
tag: LIGHT_COMPRESSED_TOKEN_TAG,
263+
},
264+
{
265+
id: "compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq",
266+
name: "account_compression.so",
267+
tag: LIGHT_ACCOUNT_COMPRESSION_TAG,
268+
},
269+
{
270+
id: "Lighton6oQpVkeewmo2mcPTQQp7kYHr4fWpAgJyEmDX",
271+
name: "light_registry.so",
272+
tag: LIGHT_REGISTRY_TAG,
273+
},
274+
];

cli/src/utils/constants.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,24 @@ export const LIGHT_PROTOCOL_PROGRAMS_DIR_ENV = "LIGHT_PROTOCOL_PROGRAMS_DIR";
2525
export const BASE_PATH = "../../bin/";
2626

2727
export const PROGRAM_ID = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS";
28-
export const SOLANA_SDK_VERSION = "2.2.1";
28+
export const SOLANA_SDK_VERSION = "2.2";
2929
export const ANCHOR_VERSION = "0.31.1";
3030
export const BORSH_VERSION = "0.10.4";
31-
export const COMPRESSED_PROGRAM_TEMPLATE_TAG = "v0.1.2";
31+
export const COMPRESSED_PROGRAM_TEMPLATE_TAG = "v0.3.0";
3232
export const TOKIO_VERSION = "1.36.0";
33-
export const SOLANA_PROGRAM_TEST_VERSION = "2.2.1";
34-
35-
export const LIGHT_HASHER_VERSION = "2.0.0";
36-
export const LIGHT_MACROS_VERSION = "1.1.0";
37-
export const LIGHT_SDK_VERSION = "0.10.0";
38-
export const LIGHT_COMPRESSED_ACCOUNT_VERSION = "0.1.0";
39-
export const LIGHT_VERIFIER_VERSION = "1.1.0";
33+
export const SOLANA_PROGRAM_TEST_VERSION = "2.2";
34+
export const LIGHT_CLI_VERSION = "0.25.0";
35+
export const SOLANA_CLI_VERSION = "2.2.15";
36+
37+
export const LIGHT_HASHER_VERSION = "3.1.0";
38+
export const LIGHT_MACROS_VERSION = "2.1.0";
39+
export const LIGHT_SDK_VERSION = "0.13.0";
40+
export const LIGHT_SDK_MACROS_VERSION = "0.13.0";
41+
export const LIGHT_UTILS_VERSION = "0.13.0";
42+
export const LIGHT_COMPRESSED_ACCOUNT_VERSION = "0.3.0";
43+
export const LIGHT_VERIFIER_VERSION = "2.0.0";
4044
export const LIGHT_CLIENT_VERSION = "0.9.1";
4145
// TODO: replace with light program test
4246
export const LIGHT_TEST_UTILS_VERSION = "1.2.1";
47+
export const LIGHT_ACCOUNT_CHECKS = "0.3.0";
48+
export const STATELESS_JS_VERSION = "0.21.0";

program-tests/sdk-test/tests/test.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@ async fn test_sdk_test() {
5858
let compressed_pda = rpc
5959
.indexer()
6060
.unwrap()
61-
.get_compressed_accounts_by_owner(&sdk_test::ID, None, None)
61+
.get_compressed_account(address, None)
6262
.await
6363
.unwrap()
6464
.value
65-
.items[0]
6665
.clone();
6766
assert_eq!(compressed_pda.address.unwrap(), address);
6867

0 commit comments

Comments
 (0)