-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Severe issue of inconsistent instruction arg value. #2955
Comments
Thanks for the report, but could you also include a full reproduction example, as I believe this issue is related to memory usage in your program, and cannot be isolated with only one account.
I've first run into a similar issue during our Solana solana-labs/solana#35330 reduced the memory usage, and our examples continued to work again. However, the problem still seems to persist in some cases as your issue suggests. If my reasoning is correct, this issue should also be reproducable in non-Anchor programs. It's just easier to hit this in Anchor programs due to comparatively higher memory usage. |
Yeah that make sense. Any suggestions on how to walk around it? |
FYI the full code:
|
Update on this: I changed the instruction arg type from [u8; 16] to hex string with manual decode, and it works. Not sure whether it suggests an issue with array arg processing in Anchor. |
Based on this, probably not an issue with memory, as even the hex string doubled the memory usage of the args and still no issue. |
Anchor doesn't have separate logic based on the parameter type you provide. They are all |
Are you able to reproduce the issue? |
Not from the code you shared since there is no client code, but I had similar examples before as I've mentioned earlier. Need either a repo with both program and client code, or an example shared in Solana Playground to fully reproduce your problem. For example using |
Seems to be related with anza-xyz/agave#1186. |
Yeah, I suspected that to be the case in #2955 (comment), and now that we have more information on this topic, it's almost certain all these weird behavior issues are related to Closing this as |
Greetings.
I just observed a super weird instruction arg value inconsistency issue during development. It happened on my side in both Anchor 0.29.0 & 0.30.0
The program layout I have:
The program logs I'm seeing:
As you can see, there is a constraint to check whether the
from_deid_account.deid == from_deid
that is satisfied with no issue. However within the instruction handler body, thefrom_deid
arg value become inconsistent. This is a super disturbing observation as it makes me feel there could be some severe bugs within the Anchor framework.Another disturbing fact is that: we didn't see the inconsistency issue in our previous revision, until when we added a new account to MakePaymentTransfer context. This suggests some uncertainty and flakiness for replacing the issue.
Please prioritize the investigation of this issue as it seems super severe.
The text was updated successfully, but these errors were encountered: