Skip to content
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: JS compress and decompress lamports #572

Merged
merged 7 commits into from
Apr 2, 2024

Conversation

SwenSchaeferjohann
Copy link
Contributor

  • tests
  • instructions (compress and decompress)

merge only after #567

@SwenSchaeferjohann
Copy link
Contributor Author

actually @ananas-block feel free to merge into #567 it's branched of from that and should make the CI for JS succeed.

const ixs = await LightSystemProgram.compress({
payer: payer.publicKey,
address: payer.publicKey,
lamports: 20,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactoring the lamports amount to a variable would make the test easier to maintain

@SwenSchaeferjohann SwenSchaeferjohann changed the base branch from main to jorrit/feat-de-compress-sol April 2, 2024 14:36
@SwenSchaeferjohann SwenSchaeferjohann merged commit 16e14db into jorrit/feat-de-compress-sol Apr 2, 2024
8 checks passed
@ananas-block ananas-block deleted the swen/feat-dec branch April 2, 2024 15:03
ananas-block added a commit that referenced this pull request Apr 2, 2024
* feat: sol de compression

* feat: JS compress and decompress lamports (#572)

---------

Co-authored-by: Swen Schäferjohann <[email protected]>
SwenSchaeferjohann pushed a commit that referenced this pull request Apr 8, 2024
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
SwenSchaeferjohann pushed a commit that referenced this pull request Apr 11, 2024
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
SwenSchaeferjohann pushed a commit that referenced this pull request Apr 11, 2024
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
SwenSchaeferjohann pushed a commit that referenced this pull request Apr 11, 2024
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
SwenSchaeferjohann pushed a commit that referenced this pull request Apr 11, 2024
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
sergeytimoshin added a commit that referenced this pull request Apr 12, 2024
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
SwenSchaeferjohann added a commit that referenced this pull request Apr 12, 2024
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants