Skip to content

Commit

Permalink
chore: photon 0.28.0 (#873)
Browse files Browse the repository at this point in the history
* bump photon

* Update photon-api to 0.28

* fix intero

---------

Co-authored-by: Swen <[email protected]>
Co-authored-by: Sergey Timoshin <[email protected]>
  • Loading branch information
3 people authored Jun 26, 2024
1 parent f576164 commit 647bc97
Show file tree
Hide file tree
Showing 104 changed files with 482 additions and 146 deletions.
1 change: 1 addition & 0 deletions .github/workflows/light-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
sub-tests: '[
"@lightprotocol/circuit-lib.js",
"@lightprotocol/prover.js",
"@lightprotocol/zk-compression-cli"
]'
steps:
- name: Checkout sources
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion cli/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const LIGHT_PROVER_PROCESS_NAME = "light-prover";
export const INDEXER_PROCESS_NAME = "photon";
export const FORESTER_PROCESS_NAME = "forester";

export const PHOTON_VERSION = "0.26.0";
export const PHOTON_VERSION = "0.28.0";

export const LIGHT_PROTOCOL_PROGRAMS_DIR_ENV = "LIGHT_PROTOCOL_PROGRAMS_DIR";
export const BASE_PATH = "../../bin/";
2 changes: 1 addition & 1 deletion forester/src/indexer/photon_indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl Indexer for PhotonIndexer {
merkle_tree: tree_pubkey.to_bytes(),
low_address_index: proofs.low_element_leaf_index as u64,
low_address_value: low_address_value.to_bytes(),
low_address_next_index: proofs.leaf_index as u64,
low_address_next_index: proofs.next_index as u64,
low_address_next_value: next_address_value.to_bytes(),
low_address_proof: {
let proof_vec: Vec<[u8; 32]> = proofs
Expand Down
2 changes: 1 addition & 1 deletion js/compressed-token/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"test:e2e:compress": "pnpm test-validator && vitest run tests/e2e/compress.test.ts --reporter=verbose",
"test:e2e:decompress": "pnpm test-validator && vitest run tests/e2e/decompress.test.ts --reporter=verbose",
"test:e2e:rpc-token-interop": "pnpm test-validator && vitest run tests/e2e/rpc-token-interop.test.ts --reporter=verbose",
"test:e2e:all": "pnpm test-validator && vitest run tests/e2e/create-mint.test.ts && vitest run tests/e2e/mint-to.test.ts && vitest run tests/e2e/transfer.test.ts && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/decompress.test.ts && vitest run tests/e2e/register-mint.test.ts && vitest run tests/e2e/approve-and-mint-to.test.ts",
"test:e2e:all": "pnpm test-validator && vitest run tests/e2e/create-mint.test.ts && vitest run tests/e2e/mint-to.test.ts && vitest run tests/e2e/transfer.test.ts && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/decompress.test.ts && vitest run tests/e2e/register-mint.test.ts && vitest run tests/e2e/approve-and-mint-to.test.ts && vitest run tests/e2e/rpc-token-interop.test.ts",
"pull-idl": "../../scripts/push-compressed-token-idl.sh",
"build": "rimraf dist && pnpm pull-idl && pnpm build:bundle",
"build:bundle": "rollup -c",
Expand Down
202 changes: 186 additions & 16 deletions js/compressed-token/src/idl/light_compressed_token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1348,23 +1348,108 @@ export type LightCompressedToken = {
errors: [
{
code: 6000;
name: 'SignerCheckFailed';
msg: 'Signer check failed';
name: 'PublicKeyAmountMissmatch';
msg: 'public keys and amounts must be of same length';
},
{
code: 6001;
name: 'CreateTransferInstructionFailed';
msg: 'Create transfer instruction failed';
name: 'SignerCheckFailed';
msg: 'SignerCheckFailed';
},
{
code: 6002;
name: 'AccountNotFound';
msg: 'Account not found';
name: 'ComputeInputSumFailed';
msg: 'ComputeInputSumFailed';
},
{
code: 6003;
name: 'SerializationError';
msg: 'Serialization error';
name: 'ComputeOutputSumFailed';
msg: 'ComputeOutputSumFailed';
},
{
code: 6004;
name: 'ComputeCompressSumFailed';
msg: 'ComputeCompressSumFailed';
},
{
code: 6005;
name: 'ComputeDecompressSumFailed';
msg: 'ComputeDecompressSumFailed';
},
{
code: 6006;
name: 'SumCheckFailed';
msg: 'SumCheckFailed';
},
{
code: 6007;
name: 'DecompressRecipientUndefinedForDecompress';
msg: 'DecompressRecipientUndefinedForDecompress';
},
{
code: 6008;
name: 'CompressedPdaUndefinedForDecompress';
msg: 'CompressedPdaUndefinedForDecompress';
},
{
code: 6009;
name: 'DeCompressAmountUndefinedForDecompress';
msg: 'DeCompressAmountUndefinedForDecompress';
},
{
code: 6010;
name: 'CompressedPdaUndefinedForCompress';
msg: 'CompressedPdaUndefinedForCompress';
},
{
code: 6011;
name: 'DeCompressAmountUndefinedForCompress';
msg: 'DeCompressAmountUndefinedForCompress';
},
{
code: 6012;
name: 'DelegateUndefined';
msg: 'DelegateUndefined while delegated amount is defined';
},
{
code: 6013;
name: 'DelegateSignerCheckFailed';
msg: 'DelegateSignerCheckFailed';
},
{
code: 6014;
name: 'SplTokenSupplyMismatch';
msg: 'SplTokenSupplyMismatch';
},
{
code: 6015;
name: 'HeapMemoryCheckFailed';
msg: 'HeapMemoryCheckFailed';
},
{
code: 6016;
name: 'InstructionNotCallable';
msg: 'The instruction is not callable';
},
{
code: 6017;
name: 'ArithmeticUnderflow';
msg: 'ArithmeticUnderflow';
},
{
code: 6018;
name: 'InvalidDelegate';
msg: 'InvalidDelegate';
},
{
code: 6019;
name: 'HashToFieldError';
msg: 'HashToFieldError';
},
{
code: 6020;
name: 'InvalidMint';
msg: 'InvalidMint';
},
];
};
Expand Down Expand Up @@ -2723,23 +2808,108 @@ export const IDL: LightCompressedToken = {
errors: [
{
code: 6000,
name: 'SignerCheckFailed',
msg: 'Signer check failed',
name: 'PublicKeyAmountMissmatch',
msg: 'public keys and amounts must be of same length',
},
{
code: 6001,
name: 'CreateTransferInstructionFailed',
msg: 'Create transfer instruction failed',
name: 'SignerCheckFailed',
msg: 'SignerCheckFailed',
},
{
code: 6002,
name: 'AccountNotFound',
msg: 'Account not found',
name: 'ComputeInputSumFailed',
msg: 'ComputeInputSumFailed',
},
{
code: 6003,
name: 'SerializationError',
msg: 'Serialization error',
name: 'ComputeOutputSumFailed',
msg: 'ComputeOutputSumFailed',
},
{
code: 6004,
name: 'ComputeCompressSumFailed',
msg: 'ComputeCompressSumFailed',
},
{
code: 6005,
name: 'ComputeDecompressSumFailed',
msg: 'ComputeDecompressSumFailed',
},
{
code: 6006,
name: 'SumCheckFailed',
msg: 'SumCheckFailed',
},
{
code: 6007,
name: 'DecompressRecipientUndefinedForDecompress',
msg: 'DecompressRecipientUndefinedForDecompress',
},
{
code: 6008,
name: 'CompressedPdaUndefinedForDecompress',
msg: 'CompressedPdaUndefinedForDecompress',
},
{
code: 6009,
name: 'DeCompressAmountUndefinedForDecompress',
msg: 'DeCompressAmountUndefinedForDecompress',
},
{
code: 6010,
name: 'CompressedPdaUndefinedForCompress',
msg: 'CompressedPdaUndefinedForCompress',
},
{
code: 6011,
name: 'DeCompressAmountUndefinedForCompress',
msg: 'DeCompressAmountUndefinedForCompress',
},
{
code: 6012,
name: 'DelegateUndefined',
msg: 'DelegateUndefined while delegated amount is defined',
},
{
code: 6013,
name: 'DelegateSignerCheckFailed',
msg: 'DelegateSignerCheckFailed',
},
{
code: 6014,
name: 'SplTokenSupplyMismatch',
msg: 'SplTokenSupplyMismatch',
},
{
code: 6015,
name: 'HeapMemoryCheckFailed',
msg: 'HeapMemoryCheckFailed',
},
{
code: 6016,
name: 'InstructionNotCallable',
msg: 'The instruction is not callable',
},
{
code: 6017,
name: 'ArithmeticUnderflow',
msg: 'ArithmeticUnderflow',
},
{
code: 6018,
name: 'InvalidDelegate',
msg: 'InvalidDelegate',
},
{
code: 6019,
name: 'HashToFieldError',
msg: 'HashToFieldError',
},
{
code: 6020,
name: 'InvalidMint',
msg: 'InvalidMint',
},
],
};
2 changes: 1 addition & 1 deletion js/stateless.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"test:e2e:test-rpc": "pnpm test-validator && vitest run tests/e2e/test-rpc.test.ts",
"test:e2e:rpc-interop": "pnpm test-validator && vitest run tests/e2e/rpc-interop.test.ts",
"test:e2e:browser": "pnpm playwright test",
"test:e2e:all": "pnpm test-validator && vitest run tests/e2e/test-rpc.test.ts && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/transfer.test.ts",
"test:e2e:all": "pnpm test-validator && vitest run tests/e2e/test-rpc.test.ts && vitest run tests/e2e/compress.test.ts && vitest run tests/e2e/transfer.test.ts && vitest run tests/e2e/rpc-interop.test.ts",
"test:index": "vitest run tests/e2e/program.test.ts",
"test:e2e:serde": "vitest run tests/e2e/serde.test.ts",
"test:verbose": "vitest run --reporter=verbose",
Expand Down
Loading

0 comments on commit 647bc97

Please sign in to comment.