Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvja committed Oct 18, 2023
1 parent cad2766 commit ab19538
Showing 1 changed file with 13 additions and 6 deletions.
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
```

0 comments on commit ab19538

Please sign in to comment.