add LiteSVM tests for compute budget measurement#35
add LiteSVM tests for compute budget measurement#35zkr99 merged 5 commits intoentros-protocol:developfrom
Conversation
…ate_protocol_config, withdraw_treasury, migrate_admin authorize_new_wallet and migrate_identity; add compute unit measurement
zkr99
left a comment
There was a problem hiding this comment.
Solid execution on Task 7. All five estimated CU values are now real measurements (close_challenge 1767, close_verification_result 1866, update_protocol_config 4508, withdraw_treasury 7526, migrate_admin 11140), plus bonus measurements for authorize_new_wallet (15485) and migrate_identity (73669-87169) from #32. The setProgramDataAcct helper using svm.setAccount is exactly the right pattern for testing migrate_admin in LiteSVM, and adding RegistryError::ProgramDataPda for the canonical-PDA check is a nice tightening.
Covered the negative-test gap and the remaining Unauthorized distinct-errors split in Discord - those are conversation items, not blockers here. One small inline note on the migrate_admin row.
|
Two follow-ups from your earlier Discord questions, plus a small task. Not blocking the merge: 1. Distinct errors in
2. Negative test for migrate_admin — your setProgramDataAcct(programdataAddr, adminKp.publicKey, adminKp.publicKey);
migrateAdmin(user1Kp, protocolConfigPda, programdataAddr,
"Error Code: Unauthorized" // or WrongUpgradeAuthority after the split
);Admin is the registered upgrade authority but user1 signs — require! fires. 3. Renames — yes please, go ahead. Sweep the leftover from repo root, skip |
…istinct errors in migrate_admin(); Replace remaining iam wording by entros
zkr99
left a comment
There was a problem hiding this comment.
Distinct errors split applied cleanly, negative test for migrate_admin is exactly the right shape, renames are thorough. One small bug in errors.rs to fix before merge - inline.
zkr99
left a comment
There was a problem hiding this comment.
Both #[msg] strings updated cleanly, and good catch updating the negative test's expected error string to match - without it the substring check would have broken. Ready to merge.
close_challenge, close_verification_result, update_protocol_config, withdraw_treasury, migrate_adminauthorize_new_walletandmigrate_identity