Skip to content

Conversation

@Nagaprasadvr
Copy link
Contributor

  1. use derive_pda_address when we are just validating pdas
  2. remove redundant checks
  3. remove accounts which arent required and few checks
  4. Add cu tracker
  5. show cus and cu diffs using a python script
  6. remove example

@Nagaprasadvr Nagaprasadvr force-pushed the time-005-optimize-ixs branch from 4062beb to 02aaf01 Compare August 7, 2025 04:49
@zfedoran
Copy link
Collaborator

zfedoran commented Aug 7, 2025

This looks awesome, give me some time to review it

@zfedoran
Copy link
Collaborator

zfedoran commented Aug 9, 2025

Looking through this, one thing I'd like to keep is the pda calculations in dev/test. I think what I have here is a good compromise. Take a look at this comment for the why.

What are your thoughts on this?

Regarding the simple hash over the on-curve point method, I do really like that and would prefer to use it over the more expensive is_on_curve checked version that find_program_address ships with.

@Nagaprasadvr
Copy link
Contributor Author

Nagaprasadvr commented Aug 10, 2025

Cool i will add those tests back

ig we can just move thse pda find fncs inside the cfg tests module wyt ? so they are scoped only inside tests #[cfg(debug_assertions)] pub fn archive_pda() -> (Pubkey, u8) { Pubkey::find_program_address(&[ARCHIVE], &crate::id()) }

@Nagaprasadvr
Copy link
Contributor Author

Looking through this, one thing I'd like to keep is the pda calculations in dev/test. I think what I have here is a good compromise. Take a look at this comment for the why.

What are your thoughts on this?

Regarding the simple hash over the on-curve point method, I do really like that and would prefer to use it over the more expensive is_on_curve checked version that find_program_address ships with.

Yeah actually we don't have to check if it's on curve while validating but only while creating the account so we have the canonical bump

@Nagaprasadvr Nagaprasadvr force-pushed the time-005-optimize-ixs branch 2 times, most recently from 771d2a3 to 6c724e7 Compare August 17, 2025 05:55
@Nagaprasadvr Nagaprasadvr force-pushed the time-005-optimize-ixs branch 4 times, most recently from c3e3333 to 7a34b44 Compare August 28, 2025 15:25
@Nagaprasadvr
Copy link
Contributor Author

Nagaprasadvr commented Sep 3, 2025

@zfedoran let me know what do u think, more cus to optimize we can do it parallely as we develop. But steel is so cus hungry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants