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

fix/warn user on composite accounts and continue fuzz test generation #133

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

Ikrk
Copy link
Contributor

@Ikrk Ikrk commented Feb 29, 2024

With this PR, the user gets notified in case the anchor program uses currently unsupported composite accounts. Now the fuzz test generation is not aborted but continues and the composite account deserialization code is replaced with a todo!() macro.

A warning example:

Warning: The context `Initialize` has a field named `comp_acc` of composite type `LiqPoolInitialize < 'info >`. The automatic deserialization of composite types is currently not supported. You will have to implement it manually in the generated `accounts_snapshots.rs` file. The field deserialization was replaced by a `todo!()` macro. Also, you might want to adapt the corresponding FuzzInstruction variants in `fuzz_instructions.rs` file.

@Ikrk Ikrk requested a review from lukacan February 29, 2024 22:06
@Ikrk Ikrk force-pushed the fix/warn-on-composite-accounts branch from 62ca205 to 86aaa3f Compare February 29, 2024 23:42
Copy link
Collaborator

@lukacan lukacan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks nice, for the fuzz tests, however for the PoC Tests there is a problem within the .program_client, where the path to the composite account is not correctly derived. I would suggest that this can be fixed with including pub module accounts derived by anchor. However, from my side, this can be resolved as a different fix.

@Ikrk
Copy link
Contributor Author

Ikrk commented Mar 1, 2024

Yes, I am aware of it. I have already created a new bug issue in Jira.

@lukacan lukacan merged commit 24e07a8 into develop Mar 1, 2024
7 checks passed
@lukacan lukacan deleted the fix/warn-on-composite-accounts branch March 1, 2024 14:35
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.

None yet

2 participants