Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ solana-test-validator \
--bpf-program JA5cjkRJ1euVi9xLWsCJVzsRzEkT8vcC4rqw9sVAo5d6 ./light-system-programs/target/deploy/merkle_tree_program.so \
--bpf-program 3KS2k14CmtnuVv2fvYcvdrNgC94Y11WETBpMUGgXyWZL ./light-system-programs/target/deploy/verifier_program_one.so \
--bpf-program GFDwN8PXuKZG2d2JLxRhbggXYe9eQHoGYoYK5K3G5tV8 ./light-system-programs/target/deploy/verifier_program_two.so \
--bpf-program DJpbogMSrK94E1zvvJydtkqoE4sknuzmMRoutd6B7TKj ./light-system-programs/target/deploy/verifier_program_storage.so \
--bpf-program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV ../solana/web3.js/test/fixtures/noop-program/solana_sbf_rust_noop.so \
--bpf-program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS ./mock-app-verifier/target/deploy/mock_verifier.so
```
Expand Down
10 changes: 9 additions & 1 deletion light-system-programs/runTest.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash -e
../../solana/validator/solana-test-validator --reset --limit-ledger-size 500000000 --bpf-program J1RRetZ4ujphU75LP8RadjXMf3sA12yC2R44CF7PmU7i ./target/deploy/verifier_program_zero.so --bpf-program JA5cjkRJ1euVi9xLWsCJVzsRzEkT8vcC4rqw9sVAo5d6 ./target/deploy/merkle_tree_program.so --bpf-program 3KS2k14CmtnuVv2fvYcvdrNgC94Y11WETBpMUGgXyWZL ./target/deploy/verifier_program_one.so --bpf-program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV ../../solana/web3.js/test/fixtures/noop-program/solana_sbf_rust_noop.so --bpf-program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS ./target/deploy/verifier_program.so --quiet &
solana-test-validator \
--reset \
--limit-ledger-size 500000000 \
--bpf-program J1RRetZ4ujphU75LP8RadjXMf3sA12yC2R44CF7PmU7i ./target/deploy/verifier_program_zero.so \
--bpf-program JA5cjkRJ1euVi9xLWsCJVzsRzEkT8vcC4rqw9sVAo5d6 ./target/deploy/merkle_tree_program.so \
--bpf-program 3KS2k14CmtnuVv2fvYcvdrNgC94Y11WETBpMUGgXyWZL ./target/deploy/verifier_program_one.so \
--bpf-program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV ../../solana/web3.js/test/fixtures/noop-program/solana_sbf_rust_noop.so \
Copy link
Contributor Author

@vadorovsky vadorovsky Feb 22, 2023

Choose a reason for hiding this comment

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

@ananas-block This doesn't exist enymore in Solana repo, all the web3.js got removed.

What I'm doing currently is:

Would you be fine with describing it here?

OTOH, I could try --clone noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV to copy the noop program from devnet, but not sure if it's going to work 100% for our tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

--clone didn't work for me the last time I tried

Copy link
Contributor

@ananas-block ananas-block Feb 22, 2023

Choose a reason for hiding this comment

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

maybe we should add solana_sbf_rust_noop.so to the our repo
I think that would be the easiest

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't have to use a cloned Solana repo anymore, the newest testnet versions of Solana CLI tools are working fine.

Have you tried the most recent solana cli version with --bpf-programs that gave me an error,
the Solana devs already closed the issue but I am not sure it is fixed and if it is whether it is in the current release already

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I tested now and:

  • --clone doesn't work for me
  • --bpf-program --bpf-program noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV ../../solana-program-library/account-compression/target/deploy/spl_noop.so works great. I tried both with master and account-compression-v0.1.8 tag of solana-program-library.

maybe we should add solana_sbf_rust_noop.so to the our repo

What about adding solana-program-library as a submodule? It would be easier to bump versions and the process would be more transparent to everyone - more than people pushing .so files manually. ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

if adding it as a submodule should add a script that builds the noop pogram?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was thinking about:

  • adding a submodule
  • adding a script for building the noop program
  • calling it from the current runTest.sh scripts

--bpf-program DJpbogMSrK94E1zvvJydtkqoE4sknuzmMRoutd6B7TKj ./target/deploy/verifier_program_storage.so \
--quiet &
sleep 7
PID=$!
$1;
Expand Down
11 changes: 9 additions & 2 deletions mock-app-verifier/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
./validator/solana-test-validator --reset --limit-ledger-size 500000000 --bpf-program J1RRetZ4ujphU75LP8RadjXMf3sA12yC2R44CF7PmU7i /home/ananas/test_light/light-protocol-onchain/light-system-programs/target/deploy/verifier_program_zero.so --bpf-program JA5cjkRJ1euVi9xLWsCJVzsRzEkT8vcC4rqw9sVAo5d6 /home/ananas/test_light/light-protocol-onchain/light-system-programs/target/deploy/merkle_tree_program.so --bpf-program GFDwN8PXuKZG2d2JLxRhbggXYe9eQHoGYoYK5K3G5tV8 /home/ananas/test_light/light-protocol-onchain/light-system-programs/target/deploy/verifier_program_two.so --bpf-program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS /home/ananas/test_light/light-protocol-onchain/market-place-verifier/target/deploy/market_place_verifier.so

```
solana-test-validator \
--reset \
--limit-ledger-size 500000000 \
--bpf-program J1RRetZ4ujphU75LP8RadjXMf3sA12yC2R44CF7PmU7i ../light-system-programs/target/deploy/verifier_program_zero.so \
--bpf-program JA5cjkRJ1euVi9xLWsCJVzsRzEkT8vcC4rqw9sVAo5d6 ../light-system-programs/target/deploy/merkle_tree_program.so \
--bpf-program GFDwN8PXuKZG2d2JLxRhbggXYe9eQHoGYoYK5K3G5tV8 ../light-system-programs/target/deploy/verifier_program_two.so \
--bpf-program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS ../market-place-verifier/target/deploy/market_place_verifier.so
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ananas-block This is different from what we have in mock-app-verifier/runTest.sh. Here we are using market_place_verifier.so, in the script we are using mock_verifier.so instead. Which one should we use?

Copy link
Contributor

Choose a reason for hiding this comment

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

it should be mock_verifier.so

```

TODO:
- Change Utxos
Expand Down
2 changes: 1 addition & 1 deletion mock-app-verifier/runTest.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash -e
../../solana/validator/solana-test-validator \
solana-test-validator \
--reset \
--limit-ledger-size 500000000 \
--bpf-program J1RRetZ4ujphU75LP8RadjXMf3sA12yC2R44CF7PmU7i ../light-system-programs/target/deploy/verifier_program_zero.so \
Expand Down