-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat: protocol config #986
Conversation
8fb5872
to
8d8dc00
Compare
forester/src/rollover/operations.rs
Outdated
create_rollover_address_merkle_tree_instruction, create_rollover_state_merkle_tree_instruction, | ||
CreateRolloverMerkleTreeInstructionInputs, | ||
}; | ||
// use light_registry::sdk::{ |
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 we just remove these imports?
/// Anyone can create new trees just the fees cannot be set arbitrarily. | ||
#[account(mut)] | ||
pub authority: Signer<'info>, | ||
/// CHECK: |
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.
Could we at least add something like
/// CHECK: | |
/// CHECK: Is checked in the account-compression program during CPI. |
in all fields where Anchor requires CHECK
docstrings? I know it's obvious for us, but some context would be helpful (for auditors as well).
|
||
#[derive(Accounts)] | ||
pub struct NullifyLeaves<'info> { | ||
/// CHECK: |
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 here
#[account(mut)] | ||
#[account(seeds = [CPI_AUTHORITY_PDA_SEED], bump)] |
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.
First of all, does CPI authority need to be mutable here?
I don't think it should be necessary, but if I'm missing something and it needs to be mutable, could we merge these into one #[account]
attribute?
#[account(mut)] | |
#[account(seeds = [CPI_AUTHORITY_PDA_SEED], bump)] | |
#[account(mut, seeds = [CPI_AUTHORITY_PDA_SEED], bump)] |
pub account_compression_program: Program<'info, AccountCompression>, | ||
/// CHECK: when emitting event. | ||
pub log_wrapper: UncheckedAccount<'info>, | ||
/// CHECK: in account compression program |
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.
or, well, even such comment is sufficient, I would be fine with copying it to the empty CHECK:
fields
|
||
#[derive(Accounts)] | ||
pub struct RolloverMerkleTreeAndQueue<'info> { | ||
/// CHECK: |
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 here
8d8dc00
to
846372b
Compare
refactor: registry program add forester selection and contention fix rollover test, regenerate idl
846372b
to
6b91696
Compare
Conceptual Changes:
forester_account
sChanges:
Note:
msg!
prints in registry program for now for debugging