Repository navigation
Conversation
Contributor
…-upgrade-authority-2
…thority-2' of github.com:cowprotocol/solana-programs into kaze/sc-438-gate-initialize-with-the-program-upgrade-authority-2
kaze-cow
marked this pull request as ready for review
October 9, 2026 07:40
fedgiac
reviewed
Oct 9, 2026
fedgiac
left a comment
Contributor
There was a problem hiding this comment.
Looks good. Main suggested change is that I don't like the name deployer because there's nothing in the code that really needs for this to be the actual deployer, it's just our own conventions leading to this. I suggest initializer everywhere instead.
Co-authored-by: Federico Giacon <58218759+fedgiac@users.noreply.github.com>
Co-authored-by: Federico Giacon <58218759+fedgiac@users.noreply.github.com>
…thority-2' of github.com:cowprotocol/solana-programs into kaze/sc-438-gate-initialize-with-the-program-upgrade-authority-2
…-upgrade-authority-2
kaze-cow
deleted the
kaze/sc-438-gate-initialize-with-the-program-upgrade-authority-2
branch
October 9, 2026 10:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Make it so that only a hardcoded address defined in the program can call
Initialize.Motivation
Its technically possible that after program deployment, someone could come in and call
Initialize, setting their own data and permissions, prior to us being able to do so. This, and could cause us to lose the ability to use a deployment address that we want to use. To prevent this from happening, we need some access control.Other considerations
It was also previously considered in #187 to use the BPF Upgradalbe loader's upgrade authority. In honesty this is probably the best way to go as the deployer would always be matched up with whoever actually pushed up the program, but we are in a hurry and this option is much simpler and works almost as well.
In the case that the program is accidentally deployed with the wrong
DEPLOYERset, it is possible for the upgrade authority to redeploy the program with the correctDEPLOYERand try again, so the consequences of a mistaken deployment are low.