Adjustments of loader-v4 (part 3)#2821
Conversation
|
The Firedancer team maintains a line-for-line reimplementation of the |
There was a problem hiding this comment.
Yes they were for the loaders-v1 and v2, which we deprecated.
There was a problem hiding this comment.
So these are pure deletion of the code. The new functions are not related to these.
(trying to avoid comparing two independent functions).
There was a problem hiding this comment.
Yes, implementation / code wise they are unrelated. Conceptually they are related because these are their replacements but for the newest loader. However, loader-v4 is closest to loader-v3 so comparing the new functions against load_upgradeable_program_and_advance_slot() makes more sense.
There was a problem hiding this comment.
Some documentation will be helpful here, as to why we are doing signers[index.min(signers.len() - 1)]. I am able to understand it right now, but may not be obvious for the future maintainers.
There was a problem hiding this comment.
I reimplemented it using iterators instead of indices, hopefully that makes it self explanatory.
|
The code looks good to me. Can we add some tests? |
…loader_v4(). Removes load_and_finalize_program() and load_program().
b280978 to
b9d5608
Compare
* Fixes two bugs in loader-v4. * Adds instructions_to_load_program_of_loader_v4() and load_program_of_loader_v4(). Removes load_and_finalize_program() and load_program().
Problem
Continuation of #2750.
Summary of Changes
load_and_finalize_program()andload_program()in loader utils.instructions_to_load_program_of_loader_v4()andload_program_of_loader_v4()to loader utils.