Skip to content

Commit b39fd51

Browse files
committed
feat(solana): implement access-manager
1 parent d238b45 commit b39fd51

File tree

151 files changed

+9860
-1077
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+9860
-1077
lines changed

.github/workflows/e2e-full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ env:
3434
E2E_PRIVATE_CLUSTER: true
3535
E2E_WASM_LIGHT_CLIENT_TAG: ${{ inputs.wasm-eth-light-client-tag }}
3636
SOLANA_VERSION: "2.1.17"
37-
ANCHOR_VERSION: "0.31.1"
37+
ANCHOR_VERSION: "0.32.1"
3838
permissions:
3939
contents: read
4040

.github/workflows/e2e-minimal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ env:
3535
E2E_PRIVATE_CLUSTER: true
3636
E2E_WASM_LIGHT_CLIENT_TAG: ${{ inputs.wasm-eth-light-client-tag }}
3737
SOLANA_VERSION: "2.1.17"
38-
ANCHOR_VERSION: "0.31.1"
38+
ANCHOR_VERSION: "0.32.1"
3939
permissions:
4040
contents: read
4141

.github/workflows/e2e-mock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323
SP1_PROVER: mock
2424
E2E_PROOF_TYPE: groth16
2525
SOLANA_VERSION: "2.1.17"
26-
ANCHOR_VERSION: "0.31.1"
26+
ANCHOR_VERSION: "0.32.1"
2727

2828
permissions:
2929
contents: read

.github/workflows/solana.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ concurrency:
1616

1717
env:
1818
SOLANA_VERSION: "2.1.17"
19-
ANCHOR_VERSION: "0.31.1"
19+
ANCHOR_VERSION: "0.32.1"
2020

2121
jobs:
2222
build-and-test:
@@ -41,7 +41,7 @@ jobs:
4141
~/.cargo/registry/cache/
4242
~/.cargo/git/db/
4343
target/
44-
key: ${{ runner.os }}-cargo-solana-${{ hashFiles('**/Cargo.lock') }}
44+
key: ${{ runner.os }}-cargo-solana-${{ hashFiles('**/Cargo.lock') }}-anchor-${{ env.ANCHOR_VERSION }}
4545
restore-keys: |
4646
${{ runner.os }}-cargo-solana-
4747

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ programs/relayer/config.json
4343
scripts/genesis.json
4444
network_params.yaml
4545
test-ledger
46+
47+
# Solana keypairs - only localnet is tracked for E2E tests
48+
solana-keypairs/**/*
49+
!solana-keypairs/localnet/
50+
!solana-keypairs/localnet/**
51+
!solana-keypairs/**/.gitkeep

Cargo.lock

Lines changed: 79 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,14 @@ cw-ics08-wasm-eth-v1_2_0 = { package = "cw-ics08-wasm-eth", git = "https://githu
160160
ethereum-light-client-v1_2_0 = { package = "ethereum-light-client", git = "https://github.com/cosmos/solidity-ibc-eureka", tag = "cw-ics08-wasm-eth-v1.2.0", default-features = false }
161161

162162
# Solana dependencies
163+
solana-program = { version = "2.0" }
163164
solana-client = { version = "2.0" }
164165
solana-sdk = { version = "2.0" }
165166
solana-transaction-status = { version = "2.0" }
166167
borsh = { version = "1.3" }
167168
bincode = { version = "1.3" }
168-
anchor-lang = { version = "0.31.1" }
169-
anchor-client = { version = "0.31.1" }
169+
anchor-lang = { version = "0.32.1" }
170+
anchor-client = { version = "0.32.1" }
170171

171172
# TODO: Remove these dependencies once ethereum wasm client v1.2.0 backwards compatibility is not needed
172173
ibc-eureka-relayer-eth-to-cosmos-v1_2 = { package = "ibc-eureka-relayer-eth-to-cosmos", git = "https://github.com/cosmos/solidity-ibc-eureka", rev = "d9f58589bee5881561cd8c769750a35448e5ebc8", default-features = false }

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,18 @@ anchor deploy
138138
> ```
139139
>
140140
> Then navigate to the Solana programs directory and use anchor-nix commands:
141-
>
141+
>
142142
> ```sh
143143
> cd programs/solana
144144
> anchor-nix build
145145
> anchor-nix test
146146
> anchor-nix deploy
147147
> ```
148148
149+
### Solana Programs
150+
151+
For detailed information about Solana IBC programs including deployment, key generation, access control, and upgradability, see the **[Solana Programs README](programs/solana/README.md)**.
152+
149153
## Unit Testing
150154
151155
There are multiple unit tests for the solidity contracts located in the `test/` directory. The tests are written in Solidity using [foundry/forge](https://book.getfoundry.sh/forge/writing-tests).

bin/solana-ibc

14.9 MB
Binary file not shown.

e2e/interchaintestv8/relayer/solana_and_cosmos_config.go

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ type SolanaCosmosConfigInfo struct {
1414
ICS07ProgramID string
1515
// ICS26 Router program ID on Solana
1616
ICS26RouterProgramID string
17+
// Access Manager program ID on Solana
18+
AccessManagerProgramID string
1719
// IBC app program ID on Solana
1820
IBCAppProgramID string
1921
// Signer address for Cosmos transactions
@@ -50,6 +52,8 @@ type CosmosToSolanaModuleConfig struct {
5052
SolanaIcs26ProgramId string `json:"solana_ics26_program_id"`
5153
// Solana ICS07 Tendermint light client program ID (must be "solana_ics07_program_id")
5254
SolanaIcs07ProgramId string `json:"solana_ics07_program_id"`
55+
// Solana access manager program ID (must be "solana_access_manager_program_id")
56+
SolanaAccessManagerProgramId string `json:"solana_access_manager_program_id"`
5357
// Solana fee payer address for unsigned transactions
5458
SolanaFeePayer string `json:"solana_fee_payer"`
5559
// Address Lookup Table address for reducing transaction size (optional)
@@ -84,13 +88,14 @@ func CreateSolanaCosmosModules(configInfo SolanaCosmosConfigInfo) []ModuleConfig
8488
SrcChain: configInfo.CosmosChainID,
8589
DstChain: configInfo.SolanaChainID,
8690
Config: CosmosToSolanaModuleConfig{
87-
SourceRpcUrl: configInfo.TmRPC,
88-
TargetRpcUrl: configInfo.SolanaRPC,
89-
SolanaIcs26ProgramId: configInfo.ICS26RouterProgramID,
90-
SolanaIcs07ProgramId: configInfo.ICS07ProgramID,
91-
SolanaFeePayer: configInfo.SolanaFeePayer,
92-
SolanaAltAddress: altAddress,
93-
MockWasmClient: configInfo.MockWasmClient,
91+
SourceRpcUrl: configInfo.TmRPC,
92+
TargetRpcUrl: configInfo.SolanaRPC,
93+
SolanaIcs26ProgramId: configInfo.ICS26RouterProgramID,
94+
SolanaIcs07ProgramId: configInfo.ICS07ProgramID,
95+
SolanaAccessManagerProgramId: configInfo.AccessManagerProgramID,
96+
SolanaFeePayer: configInfo.SolanaFeePayer,
97+
SolanaAltAddress: altAddress,
98+
MockWasmClient: configInfo.MockWasmClient,
9499
},
95100
},
96101
}

0 commit comments

Comments
 (0)