-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 router deploy (D) #15871
base: develop
Are you sure you want to change the base?
Solana router deploy (D) #15871
Conversation
This reverts commit aaab52e.
…k into solana-link-deploy
…k into solana-link-deploy
…k into solana-updates
…-to-build-contracts-2
…solana-router-deploy
Let's move any remaining changes into #15892 and merge that instead? |
yes I think we just want to get the router deploy and CI changes fixed here and the rest can go into the home chain PR |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
privateKeyBytes, err := base58.Decode(privateKey.String()) | ||
if err != nil { | ||
return solana.PrivateKey{}, "", fmt.Errorf("failed to decode private key: %w", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just cast the type, it's already []byte
privateKeyBytes, err := base58.Decode(privateKey.String()) | |
if err != nil { | |
return solana.PrivateKey{}, "", fmt.Errorf("failed to decode private key: %w", err) | |
} | |
privateKeyBytes := []byte(privateKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will handle this in the home chain PR
// SolChainState holds a Go binding for all the currently deployed CCIP programs | ||
// on a chain. If a binding is nil, it means here is no such contract on the chain. | ||
type SolCCIPChainState struct { | ||
LinkToken solana.PublicKey | ||
SolCcipRouter solana.PublicKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SolCcipRouter solana.PublicKey | |
CCIPRouter solana.PublicKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will handle this in the home chain PR
// GetRouterStatePDA returns the PDA for the "state" account. | ||
func GetRouterStatePDA(ccipRouterProgramID solana.PublicKey) solana.PublicKey { | ||
pda, _, _ := solana.FindProgramAddress( | ||
[][]byte{[]byte("state")}, | ||
ccipRouterProgramID, | ||
) | ||
return pda | ||
} | ||
|
||
// GetExternalExecutionConfigPDA returns the PDA for the "external_execution_config" account. | ||
func GetExternalExecutionConfigPDA(ccipRouterProgramID solana.PublicKey) solana.PublicKey { | ||
pda, _, _ := solana.FindProgramAddress( | ||
[][]byte{[]byte("external_execution_config")}, | ||
ccipRouterProgramID, | ||
) | ||
return pda | ||
} | ||
|
||
// GetExternalTokenPoolsSignerPDA returns the PDA for the "external_token_pools_signer" account. | ||
func GetExternalTokenPoolsSignerPDA(ccipRouterProgramID solana.PublicKey) solana.PublicKey { | ||
pda, _, _ := solana.FindProgramAddress( | ||
[][]byte{[]byte("external_token_pools_signer")}, | ||
ccipRouterProgramID, | ||
) | ||
return pda | ||
} | ||
|
||
// GetSolanaSourceChainStatePDA returns the PDA for the "source_chain_state" account for Solana. | ||
func GetSolanaSourceChainStatePDA(ccipRouterProgramID solana.PublicKey, solanaChainSelector uint64) solana.PublicKey { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already import chainlink-ccip, why not use the Solana utils available there? https://github.com/smartcontractkit/chainlink-ccip/blob/62ce73c2841d5bc14221737597c16b95b573907a/chains/solana/utils/ccip/ccip_transactions.go#L39-L61
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when we originally started these changes, these weren't available. It looks like right now those are hardcoded to use the test config. We can refactor but might want to do it in a followup. https://github.com/smartcontractkit/chainlink-ccip/blob/60504624690889155c2cc5aea142d2af7733f5e3/chains/solana/contracts/tests/config/ccip_config.go#L16
…solana-router-deploy
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will handle any comments in #15892
Adding router deploy for solana
NOTE: uploading the .so and the corresponding keypair for initial dev efforts
TODO:
Requires
#15870
Supports