Skip to content
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

save solana pdas in address book #16135

Merged
merged 5 commits into from
Jan 31, 2025
Merged

save solana pdas in address book #16135

merged 5 commits into from
Jan 31, 2025

Conversation

tt-cll
Copy link
Contributor

@tt-cll tt-cll commented Jan 30, 2025

Requires

Supports

Copy link
Contributor

github-actions bot commented Jan 30, 2025

AER Report: CI Core ran successfully ✅

aer_workflow , commit

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@yashnevatia
Copy link
Contributor

As discussed offline, I think we should store the chain selectors instead of storing the source/dest PDAs and then add more flexibility in the values instead of having dynamic types

type SolCCIPChainState struct {
 ..
 // list of remote chains
 // type&Version -> RemoteChainSelcs
 RemoteChainSelcs []uint64 // eg: [1,2,3]


 // map of remote chains to tokens configured for billing
 // type&Version -> RemoteToBillingTokens
 RemoteToBillingTokens map[uint64][]sol.PublicKey // billing_1_TokenA, billing_2_TokenB


 // map of remote chains to tokens configured for tokenPools
 // type&Version -> RemoteToPoolTokens
 RemoteToPoolTokens map[uint64][]sol.PublicKey // pool_1_TokenA, pool_2_TokenB
}

when going from addressBook to state:

  • we first check the static type using switch case, which we do right now
  • we then deserialise the value instead of they dynamic type

@tt-cll
Copy link
Contributor Author

tt-cll commented Jan 30, 2025

As discussed offline, I think we should store the chain selectors instead of storing the source/dest PDAs and then add more flexibility in the values instead of having dynamic types

type SolCCIPChainState struct {
 ..
 // list of remote chains
 // type&Version -> RemoteChainSelcs
 RemoteChainSelcs []uint64 // eg: [1,2,3]


 // map of remote chains to tokens configured for billing
 // type&Version -> RemoteToBillingTokens
 RemoteToBillingTokens map[uint64][]sol.PublicKey // billing_1_TokenA, billing_2_TokenB


 // map of remote chains to tokens configured for tokenPools
 // type&Version -> RemoteToPoolTokens
 RemoteToPoolTokens map[uint64][]sol.PublicKey // pool_1_TokenA, pool_2_TokenB
}

when going from addressBook to state:

  • we first check the static type using switch case, which we do right now
  • we then deserialise the value instead of they dynamic type

will raise this for review after token pool merges

Base automatically changed from solana-token-pool to develop January 31, 2025 10:23
Copy link
Contributor

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

🎖️ No JIRA issue number found in: PR title, commit message, or branch name. Please include the issue ID in one of these.

@tt-cll tt-cll marked this pull request as ready for review January 31, 2025 10:46
@tt-cll tt-cll requested review from AnieeG, kylesmartin and a team as code owners January 31, 2025 10:46
@tt-cll tt-cll changed the title pda ab poc save solana pdas in address book Jan 31, 2025
@tt-cll tt-cll requested a review from ecPablo January 31, 2025 16:56
@kylesmartin kylesmartin added this pull request to the merge queue Jan 31, 2025
Merged via the queue into develop with commit 8af9a90 Jan 31, 2025
203 of 206 checks passed
@kylesmartin kylesmartin deleted the tt/savePDAs branch January 31, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants