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

solana-ibc: update test instructions in README #32

Merged
merged 1 commit into from
Oct 18, 2023
Merged
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
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@ This is our attempt to build a bridge between Solana and Cosmos using IBC

## Instructions to test solana program

Since the solana program takes more than the default compute units, we need to run a local validator with increased compute units for the program to run successfully. The steps are given below.
Since the solana program takes more than the default compute units (200000), we need to run a local validator with increased compute units for the program to run successfully. The steps are given below.

Start a local validator with increased compute units
1. Start a local validator with increased compute units
```
solana-test-validator -r --max-compute-units 5000000
```

In another terminal, run anchor test with `mocks` feature. Since we are already running a local validator, we have to tell anchor to skip starting up another validator
2. In another terminal, run anchor test with `mocks` feature. Since we cannot pass features to anchor test command, we need to build it.
```
anchor test --skip-local-validator — --features mocks
anchor build -- --features mocks
```

If you want to deploy the program with `mocks` feature, u need to pass the `mocks` feature while deploying like below.
3. Now while running the tests, we need to provide a flag to skip build and validator since they are already set. Not providing the flag to skip build would make the program to be built again but without any features ( which we dont want for testing ).
```
anchor deploy — --features mocks
anchor test --skip-local-validator --skip-build
```

### Note:
If you want to deploy the program with `mocks` feature, you need to build the program with the mocks feature and then deploy.
```
anchor build -- --features mocks
anchor deploy
```
Loading