-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Solana Attestation Signer Registry changeset #19149
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
Conversation
| return nil | ||
| } | ||
|
|
||
| func downloadReleaseArtifactsFromGithubWorkflowRun( |
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.
can any of this be reused from the function that does this for ccip contracts ?
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.
Not easily no, the CCIP contracts one has a chain of closures and each of them has a bit of coupling to CCIP so it's hard to unravel that.
|
|
||
| configPda, _, _ := solana.FindProgramAddress([][]byte{[]byte("config")}, signerRegistry.ProgramID) | ||
| signersPda, _, _ := solana.FindProgramAddress([][]byte{[]byte("signers")}, signerRegistry.ProgramID) | ||
| ix, err := signerRegistry.NewInitializeInstruction(c.Owner, authority, solana.SystemProgramID, configPda, signersPda) |
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.
how come we are not doing signerRegistry.SetProgramId ?
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.
In the latest version of anchor-go, the program ID is hardcoded in the bindings, so it's not necessary. Here's now the new binding looks:
// Code generated by https://github.com/gagliardetto/anchor-go. DO NOT EDIT.
// This file contains the program ID.
package ccip_signer_registry
import solanago "github.com/gagliardetto/solana-go"
var ProgramID = solanago.MustPublicKeyFromBase58("ULwL2Wcf7qdUkPhJc3nZmfQuGLAAP4kpnXBi2dkRitS")And here's the old ones (for CCIP solana programs):
var ProgramID ag_solanago.PublicKey
func SetProgramID(pubkey ag_solanago.PublicKey) {
ProgramID = pubkey
ag_solanago.RegisterInstructionDecoder(ProgramID, registryDecodeInstruction)
}| chain := e.BlockChains.SolanaChains()[c.ChainSelector] | ||
| c.Validate(e) | ||
|
|
||
| configPda, _, _ := solana.FindProgramAddress([][]byte{[]byte("config")}, signerRegistry.ProgramID) |
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.
same, how come we dont have setProgramId anywhere?
| @@ -0,0 +1,210 @@ | |||
| package ccipbase | |||
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 should be able to add a test pretty easily no ?
setup env -> deploy -> run the ops ?
if possible, best to do it because it really helps future dev
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 are pushing this back for the time being as I ran into several issues when attempting to write a test. Had a chat with Agustina and it seems that was an issue for ccip-solana too. Would be nice to revisit later, but we can't block the release. on it.
6a6d08a to
20b1ae0
Compare
58cb25c to
8d22875
Compare
8d22875 to
117f73b
Compare
Deploy base signer registry changeset Error improvements Add initialize changeset Add changeset for NOP rotation Add green key changeset Add promotion changesets Adjust visibility WIP test Add IDL changeset Add timelock transfer Cleanup Add upgrade authority transfer changeset Add MCMS ownership validation checks MCMS support Update with contract changes from audit feedback
117f73b to
9d3d96d
Compare
| // ExecuteOrBuildMCMSProposal handles the decision to execute instructions directly or build an MCMS proposal. | ||
| // If mcmsConfig is nil, it executes the instructions directly on the chain. | ||
| // If mcmsConfig is provided, it builds MCMS transactions and creates a proposal. | ||
| func ExecuteOrBuildMCMSProposal( |
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.
this method can be private, right?
| for _, hexKey := range c.NopKeysToRemove { | ||
| key, _ := parseEVMAddress(hexKey) | ||
|
|
||
| ix, err := signer_registry.NewRemoveSignerInstruction(key, chain.DeployerKey.PublicKey(), configPda, signersPda, eventAuthorityPda, signer_registry.ProgramID) |
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.
who is the authority for this ix? signer_registry.ProgramID? Is it always the same if you are running it through MCMS or with the deployer key?
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.
Good catch, will fix!
|
d137b22




Requires
Supports