diff --git a/README.md b/README.md index a95ec0b7..2d4b6aba 100644 --- a/README.md +++ b/README.md @@ -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 ``` \ No newline at end of file