Skip to content
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

Jacob/evaluate cleanup #42

Merged
merged 7 commits into from
May 29, 2024
Merged

Jacob/evaluate cleanup #42

merged 7 commits into from
May 29, 2024

Conversation

Jac0xb
Copy link
Owner

@Jac0xb Jac0xb commented May 16, 2024

PR

  • Clean up evaluate macros, reducing their complexity, move log logic into AssertionResult implementation.

  • Improve program owner checks for token (duplicate checks) and mint assertions.

  • Create checked_get_slice util function and replace pleaces where there are checked slice gets.

  • Cleanup BubblegumTreeConfigAssertion, MintAccountAssertion, TokenAccountAssertion by using try_from_slice and try_from_slice_pubkey utility functions and making unpack_coption_u64 and unpack_coption_pubkey take offsets.

  • Add CU ceiling asserts to simple tests to ensure code changes don't increase CU use.

@Jac0xb Jac0xb changed the base branch from main to jacob/leb128-codecs May 16, 2024 06:02
programs/lighthouse/src/types/assert/assertion_result.rs Outdated Show resolved Hide resolved
programs/lighthouse/src/utils.rs Outdated Show resolved Hide resolved
programs/lighthouse/src/utils.rs Outdated Show resolved Hide resolved
programs/lighthouse/src/utils.rs Show resolved Hide resolved
programs/lighthouse/src/types/assert/operator.rs Outdated Show resolved Hide resolved
@Jac0xb Jac0xb marked this pull request as ready for review May 29, 2024 15:37
@Jac0xb Jac0xb changed the base branch from jacob/leb128-codecs to main May 29, 2024 15:38
@Jac0xb Jac0xb merged commit 7e2139b into main May 29, 2024
1 check passed
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