-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: sol decompression #567
Conversation
22d4a03
to
aa57979
Compare
aa57979
to
fdb9fff
Compare
fdb9fff
to
2a95c92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. should we find an alternative for de_compress
right away?
suggestions:
compress_decompress_lamports
and
fn compress_decompress_lamports()
and so forth.
yet another alternative may be
compress_or_decompress_lamports
shouldn't CI for the JS tests fail here since other nullable values ought to be encoded and decoded on the client? or does anchor auto-fill for appended nullable properties? @ananas-block |
* JS: added ixs + tests: compress, decompress lamports * fix event count on full test run statelessjs * ci debug js * rm paths ci * fix js workflow file * rm comments, assert uncompressed sbalances, fix js ci * rm only in conversion.ts
// #[cfg(feature = "psp_compressed_pda")] | ||
// { | ||
// let compressed_sol_pda = psp_compressed_pda::de_compression::get_compressed_sol_pda(); | ||
// let instruction_data = psp_compressed_pda::instruction::InitCompressSolPda {}; | ||
// let accounts = psp_compressed_pda::accounts::InitializeCompressedSolPda { | ||
// fee_payer: payer.pubkey(), | ||
// compressed_sol_pda: compressed_sol_pda, | ||
// system_program: anchor_lang::solana_program::system_program::ID, | ||
// }; | ||
// let instruction = Instruction { | ||
// program_id: psp_compressed_pda::ID, | ||
// accounts: accounts.to_account_metas(Some(true)), | ||
// data: instruction_data.data(), | ||
// }; | ||
// create_and_send_transaction(&mut context, &[instruction], &payer.pubkey(), &[&payer]) | ||
// .await | ||
// .unwrap(); | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a comment/todo above here?
feat: sol decompression (#567) * feat: sol de compression * feat: JS compress and decompress lamports (#572) --------- Co-authored-by: Swen Schäferjohann <[email protected]> ci: add github ci syntax linter (#574) chore: Remove patched arkworks crates (#575) We are using only upstream 0.4.0 arkworks crates now, there is no need to point to patched 0.3.0 crates. feat: gnark circuits inclusion + non-inclusion 2-in-1 (#569) * feat: inclusion + non-inclusion gnark circuits * Refactor gnark server spawning and killing process. add actions for initSolOmnibusAccount, compressLamports, decompressLamports + happy path tests (#578) refactor: rename gnark proof inputs to plural form (#579) * refactor: rename gnark proof inputs to plural form * formatting feat: add SOL compression and decompression cli commands (#580) * Add SOL compression and decompression commands * Use getTestRpc instead of Connection in decompress and compress cli cmds. sync interface
feat: sol decompression (#567) * feat: sol de compression * feat: JS compress and decompress lamports (#572) --------- Co-authored-by: Swen Schäferjohann <[email protected]> ci: add github ci syntax linter (#574) chore: Remove patched arkworks crates (#575) We are using only upstream 0.4.0 arkworks crates now, there is no need to point to patched 0.3.0 crates. feat: gnark circuits inclusion + non-inclusion 2-in-1 (#569) * feat: inclusion + non-inclusion gnark circuits * Refactor gnark server spawning and killing process. add actions for initSolOmnibusAccount, compressLamports, decompressLamports + happy path tests (#578) refactor: rename gnark proof inputs to plural form (#579) * refactor: rename gnark proof inputs to plural form * formatting feat: add SOL compression and decompression cli commands (#580) * Add SOL compression and decompression commands * Use getTestRpc instead of Connection in decompress and compress cli cmds. sync interface rpc-interface coerce from photon response. open: tests all endpoints except token wip: debug delay in photon indexing wip: RPC tests working. debug: merkleproof, notest: token wip: add sleep wip: fix cli build fresh install changes gnark-prover merkleproof confirmed for 2 consecutive leaves wip
feat: sol decompression (#567) * feat: sol de compression * feat: JS compress and decompress lamports (#572) --------- Co-authored-by: Swen Schäferjohann <[email protected]> ci: add github ci syntax linter (#574) chore: Remove patched arkworks crates (#575) We are using only upstream 0.4.0 arkworks crates now, there is no need to point to patched 0.3.0 crates. feat: gnark circuits inclusion + non-inclusion 2-in-1 (#569) * feat: inclusion + non-inclusion gnark circuits * Refactor gnark server spawning and killing process. add actions for initSolOmnibusAccount, compressLamports, decompressLamports + happy path tests (#578) refactor: rename gnark proof inputs to plural form (#579) * refactor: rename gnark proof inputs to plural form * formatting feat: add SOL compression and decompression cli commands (#580) * Add SOL compression and decompression commands * Use getTestRpc instead of Connection in decompress and compress cli cmds. sync interface rpc-interface coerce from photon response. open: tests all endpoints except token wip: debug delay in photon indexing wip: RPC tests working. debug: merkleproof, notest: token wip: add sleep wip: fix cli build fresh install changes gnark-prover merkleproof confirmed for 2 consecutive leaves wip
feat: sol decompression (#567) * feat: sol de compression * feat: JS compress and decompress lamports (#572) --------- Co-authored-by: Swen Schäferjohann <[email protected]> ci: add github ci syntax linter (#574) chore: Remove patched arkworks crates (#575) We are using only upstream 0.4.0 arkworks crates now, there is no need to point to patched 0.3.0 crates. feat: gnark circuits inclusion + non-inclusion 2-in-1 (#569) * feat: inclusion + non-inclusion gnark circuits * Refactor gnark server spawning and killing process. add actions for initSolOmnibusAccount, compressLamports, decompressLamports + happy path tests (#578) refactor: rename gnark proof inputs to plural form (#579) * refactor: rename gnark proof inputs to plural form * formatting feat: add SOL compression and decompression cli commands (#580) * Add SOL compression and decompression commands * Use getTestRpc instead of Connection in decompress and compress cli cmds. sync interface rpc-interface coerce from photon response. open: tests all endpoints except token wip: debug delay in photon indexing wip: RPC tests working. debug: merkleproof, notest: token wip: add sleep wip: fix cli build fresh install changes gnark-prover merkleproof confirmed for 2 consecutive leaves wip wip: built rm compress test dupe
feat: sol decompression (#567) * feat: sol de compression * feat: JS compress and decompress lamports (#572) --------- Co-authored-by: Swen Schäferjohann <[email protected]> ci: add github ci syntax linter (#574) chore: Remove patched arkworks crates (#575) We are using only upstream 0.4.0 arkworks crates now, there is no need to point to patched 0.3.0 crates. feat: gnark circuits inclusion + non-inclusion 2-in-1 (#569) * feat: inclusion + non-inclusion gnark circuits * Refactor gnark server spawning and killing process. add actions for initSolOmnibusAccount, compressLamports, decompressLamports + happy path tests (#578) refactor: rename gnark proof inputs to plural form (#579) * refactor: rename gnark proof inputs to plural form * formatting feat: add SOL compression and decompression cli commands (#580) * Add SOL compression and decompression commands * Use getTestRpc instead of Connection in decompress and compress cli cmds. sync interface rpc-interface coerce from photon response. open: tests all endpoints except token wip: debug delay in photon indexing wip: RPC tests working. debug: merkleproof, notest: token wip: add sleep wip: fix cli build fresh install changes gnark-prover merkleproof confirmed for 2 consecutive leaves wip wip: built rm compress test dupe
feat: sol decompression (#567) * feat: sol de compression * feat: JS compress and decompress lamports (#572) --------- Co-authored-by: Swen Schäferjohann <[email protected]> ci: add github ci syntax linter (#574) chore: Remove patched arkworks crates (#575) We are using only upstream 0.4.0 arkworks crates now, there is no need to point to patched 0.3.0 crates. feat: gnark circuits inclusion + non-inclusion 2-in-1 (#569) * feat: inclusion + non-inclusion gnark circuits * Refactor gnark server spawning and killing process. add actions for initSolOmnibusAccount, compressLamports, decompressLamports + happy path tests (#578) refactor: rename gnark proof inputs to plural form (#579) * refactor: rename gnark proof inputs to plural form * formatting feat: add SOL compression and decompression cli commands (#580) * Add SOL compression and decompression commands * Use getTestRpc instead of Connection in decompress and compress cli cmds. sync interface rpc-interface coerce from photon response. open: tests all endpoints except token wip: debug delay in photon indexing wip: RPC tests working. debug: merkleproof, notest: token wip: add sleep wip: fix cli build fresh install changes gnark-prover merkleproof confirmed for 2 consecutive leaves wip wip: built rm compress test dupe
* feat: non-inclusion gnark circuits (#559) feat: sol decompression (#567) * feat: sol de compression * feat: JS compress and decompress lamports (#572) --------- Co-authored-by: Swen Schäferjohann <[email protected]> ci: add github ci syntax linter (#574) chore: Remove patched arkworks crates (#575) We are using only upstream 0.4.0 arkworks crates now, there is no need to point to patched 0.3.0 crates. feat: gnark circuits inclusion + non-inclusion 2-in-1 (#569) * feat: inclusion + non-inclusion gnark circuits * Refactor gnark server spawning and killing process. add actions for initSolOmnibusAccount, compressLamports, decompressLamports + happy path tests (#578) refactor: rename gnark proof inputs to plural form (#579) * refactor: rename gnark proof inputs to plural form * formatting feat: add SOL compression and decompression cli commands (#580) * Add SOL compression and decompression commands * Use getTestRpc instead of Connection in decompress and compress cli cmds. sync interface rpc-interface coerce from photon response. open: tests all endpoints except token wip: debug delay in photon indexing wip: RPC tests working. debug: merkleproof, notest: token wip: add sleep wip: fix cli build fresh install changes gnark-prover merkleproof confirmed for 2 consecutive leaves wip wip: built rm compress test dupe * cli, stateless.js, ctoken working with photon * lint * stdout * cleanup logs * initTestEnvIfNeeded with prover and indexer * cli cmds: create-mint and mint-to working (happy path) * transfer cli command works * cli tests working: createmint, mint-to, transfer, balance * compress, decompress, initsolpool working. * linted * cleanup * disable vitest:browser for prover.js * update readme: add usage instructions * upd cli readme * fix typo * Update key loading logic and add test-validator options * fix cli tests + update oclif * Replace Connection with getTestRpc in cli command * fix create-mint * new cli + photon rpc * remove manual prover.sh invocation in compressed-token/package.json * clean up * Add CLI test to light-sdk-tests.yml workflow * Update cli/README.md Co-authored-by: Michal Rostecki <[email protected]> * fix cli prove test * add "build @lightprotocol/programs" step to setup-and-build action * Update cli/test/commands/config/index.test.ts Co-authored-by: Swen Schäferjohann <[email protected]> * Update test script in package.json The `test` script in the package.json file was updated to include `test-prove` and `test-init-sol-pool`. * Enable in-browser tests for prover.js package * Update test command in cli/package.json * rm commented code, address review --------- Co-authored-by: Swen <[email protected]> Co-authored-by: Michal Rostecki <[email protected]> Co-authored-by: Swen Schäferjohann <[email protected]>
Changes: