Open
Conversation
aoikurokawa
approved these changes
Apr 24, 2026
| /// | ||
| /// Instruction data: none | ||
| pub fn process(program_id: &Address, accounts: &[AccountView], _data: &[u8]) -> ProgramResult { | ||
| let [authority, config, program_config] = accounts else { |
ebatsell
reviewed
Apr 29, 2026
| pub delegate_authority: Address, | ||
| pub seqno_instruction_data_offset: MemCmp, | ||
| pub signer_configs: [SignerConfig; PROGRAM_SIGNER_COUNT], | ||
| pub market_configs: [MarketConfig; MARKET_CONFIG_COUNT], |
There was a problem hiding this comment.
what would propAMMs have to do if they exceed 32 markets?
| Some(rent_sysvar), | ||
| &[signer], | ||
| )?; | ||
|
|
There was a problem hiding this comment.
seems there's no way to actually set the initial admins on the config?
| program_config_state.seqno_instruction_data_offset = MemCmp { | ||
| offset: instruction_data.offset, | ||
| length: instruction_data.length, | ||
| }; |
There was a problem hiding this comment.
Worth doing any boundary checks on the offset or length? for example maximum TX size could inform highest possible offset
ebatsell
reviewed
Apr 29, 2026
| .map_err(|_| ProgramError::InvalidInstructionData)?; | ||
| let bump = instruction_data.bump; | ||
| let expected = | ||
| pinocchio_pubkey::derive_address(&[b"config".as_ref()], Some(bump), program_id.as_array()); |
There was a problem hiding this comment.
nit: Could be nice to put this in a method on Config
ebatsell
reviewed
Apr 29, 2026
| &[target_program_id.as_ref()], | ||
| Some(bump), | ||
| program_id.as_array(), | ||
| ); |
There was a problem hiding this comment.
nit: Could be nice to put this in a method on Config
Also for future proofing if we want to add multiple plugin types to this program, adding another string "maker_priority" to the seeds could be useful to distinguish from other program configs
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.
Change Summary
Enable plugin enrollment and configuration on-chain. A program can be enrolled with it's
upgrade_authorityor the program'soverride_authorityto address lost keys and frozen upgrade authorities. A optionaldelegate_authoritycan also be assigned to a program by either theupgrade_authorityoroverride_authority. This is useful in scenarios where a multisig or DAO holds the upgrade authority. See the README.md for a deeper dive.ProgramConfig
The signers, instruction data memcmp, and writable accounts required for plugin configuration.
MarketConfig
A generated ID and writable account used for inclusion logic in the BAM node.
ProgramConfig Status
upgrade_authorityoroverride_authorityhas initialized the on-chain state for the programs configoverride_authorityhas opt-ed the program out of the pluginPermissions
status_authority(Jito Labs or BAM Node set)admin_authoritycan set other authorities (other than delegate), this is set when the programconfig is initialized, the admin authority can change itselfdelegate_authoritycan be assigned at the ProgramConfig level only by the upgrade authority or override authority onlydelegate_authoritycan unenroll the programconfigupgrade_authorityoroverride_authoritycan enroll a programMilestones