Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Fix verify_transfer_with_fee_proof broken by Rust 1.79.0 #7118

Closed
wants to merge 1 commit into from

Conversation

LucasSte
Copy link

@LucasSte LucasSte commented Aug 6, 2024

Problem

Rust does not have a stable ABI, so Rust programs are subject to changes in their memory layout. Rust 1.79.0 will break function verify_transfer_with_fee_proof with the following error:

Error: Function _ZN14spl_token_20229extension21confidential_transfer12verify_proof30verify_transfer_with_fee_proof17h830056199538c531E Stack offset of 4512 exceeded max offset of 4096 by 416 bytes, please minimize large stack variables. Estimated function frame size: 4576 bytes.

This will make the following tests fail:

    confidential_transfer_transfer_with_fee_and_split_proof_context
    confidential_transfer_transfer_with_fee_and_split_proof_context_in_parallel

Solution

I split the function in two new methods.

@LucasSte LucasSte marked this pull request as ready for review August 6, 2024 21:17
@samkim-crypto
Copy link
Contributor

@LucasSte, this function is actually on the way out with some of the new upcoming refactoring changes in the SPL repo. Can you give me a couple days to have these changes put in first?

@LucasSte
Copy link
Author

LucasSte commented Aug 7, 2024

@LucasSte, this function is actually on the way out with some of the new upcoming refactoring changes in the SPL repo. Can you give me a couple days to have these changes put in first?

Yes, no problem. Let me know when you are ready.

@joncinque
Copy link
Contributor

@LucasSte, I think @samkim-crypto has finished his work here -- do the tests pass if you use SPL's current master?

@LucasSte
Copy link
Author

All tests are passing now. Thanks!

@LucasSte LucasSte closed this Aug 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants