chore: limit v1 state tree, v2 state&address tree creations to protocol authority#2325
chore: limit v1 state tree, v2 state&address tree creations to protocol authority#2325ananas-block wants to merge 2 commits intomainfrom
Conversation
…ol authority Entire-Checkpoint: beb8e7abdeef
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughSemantic renaming of authorization parameters from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@programs/registry/src/lib.rs`:
- Around line 348-350: The authority check that compares
ctx.accounts.authority.key() to ctx.accounts.protocol_config_pda.authority must
run on all initialization paths (including the network_fee == None &&
forester.is_some() branch) so protocol-authority cannot be bypassed; modify the
v1 state tree creation logic to perform this comparison unconditionally before
branching on network_fee/forester (or add the same check into the forester-only
branch) so that non-protocol signers are rejected in both cases.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (8)
program-tests/account-compression-test/tests/batched_merkle_tree_test.rsis excluded by none and included by noneprogram-tests/registry-test/tests/tests.rsis excluded by none and included by noneprogram-tests/system-test/tests/test.rsis excluded by none and included by noneprogram-tests/utils/src/e2e_test_env.rsis excluded by none and included by nonextask/src/create_batch_address_tree.rsis excluded by none and included by nonextask/src/create_batch_state_tree.rsis excluded by none and included by nonextask/src/create_state_tree.rsis excluded by none and included by nonextask/src/new_deployment.rsis excluded by none and included by none
📒 Files selected for processing (7)
programs/registry/src/account_compression_cpi/sdk.rsprograms/registry/src/lib.rssdk-libs/program-test/src/accounts/address_tree_v2.rssdk-libs/program-test/src/accounts/initialize.rssdk-libs/program-test/src/accounts/state_tree.rssdk-libs/program-test/src/accounts/state_tree_v2.rssdk-libs/program-test/src/indexer/test_indexer.rs
Entire-Checkpoint: ed8d74024c1f
network fee
initialization
create_initialize_batched_merkle_tree_instruction, and create_initialize_batched_address_merkle_tree_instruction
Entire-Checkpoint: beb8e7abdeef
Summary by CodeRabbit
Bug Fixes
Chores