Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvja committed Oct 18, 2023
2 parents 7fc7272 + a1c5e6d commit 036692f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ base64 = { version = "0.21", default-features = false, features = ["alloc"] }
bincode = "1.3.3"
borsh = { version = "0.10.3", default-features = false }
derive_more = "0.99.17"
ibc = { version = "0.45.0", default-features = false, features = ["serde", "mocks", "std", "borsh"] }
ibc = { version = "0.45.0", default-features = false, features = ["serde", "borsh"] }
ibc-proto = { version = "0.35.0", default-features = false, features = ["serde"] }
pretty_assertions = "1.4.0"
rand = { version = "0.8.5" }
Expand Down
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
```
2 changes: 1 addition & 1 deletion solana/solana-ibc/programs/solana-ibc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
mocks = []
mocks = ["ibc/mocks", "ibc/std"]

[dependencies]
anchor-lang.workspace = true
Expand Down

0 comments on commit 036692f

Please sign in to comment.