Skip to content

Conversation

@procdump
Copy link
Contributor

@procdump procdump commented Jan 8, 2026

The problem

With 0.9.0 the register-tracing feature has landed. The way it reaches to the elf bytes is to walk the directories, search for the .so files and do the SHA-256 hashing onward. This can be skipped because upon loading a program (.so) it finds its way in its own account according to the BPF loader and as a result we can simply fetch the elf bytes from there. Similar to (anza-xyz/mollusk#193)

The change

The idea of this PR is to simply fetch the elf bytes from LiteSVM's accounts_db searching by program_id key. I believe it's a much cleaner solution. Since we need access to the LiteSVM instance a reference to it is passed in the before/after invocation callbacks.

@procdump procdump marked this pull request as ready for review January 9, 2026 05:24
@procdump
Copy link
Contributor Author

procdump commented Jan 9, 2026

@Aursen, when you have some spare time can you have a look?

@Aursen
Copy link
Collaborator

Aursen commented Jan 15, 2026

I will take a look, I'm waiting to fix #279. Thank you for the PR

Gets the elf bytes from the program account instead of walking directories.
Don't create sha256 file if for some reason the elf bytes aren't accessible.
@procdump procdump force-pushed the elf_bytes_from_accounts branch from 0fbea16 to 7cf6d9e Compare January 15, 2026 08:09
@procdump
Copy link
Contributor Author

I will take a look, I'm waiting to fix #279. Thank you for the PR

Great, in the mean time I've reworked the PR to align it with #279.

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