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

Solana Test Validator Error Log Incorrect #22867

Closed
leofisG opened this issue Feb 1, 2022 · 2 comments
Closed

Solana Test Validator Error Log Incorrect #22867

leofisG opened this issue Feb 1, 2022 · 2 comments
Labels
stale [bot only] Added to stale content; results in auto-close after a week.

Comments

@leofisG
Copy link

leofisG commented Feb 1, 2022

Problem

The Solana test validator have a strange issue where waiting causes test to fail.

You can see a Proof of Concept here.

As you can see, the test is working in the main branch. The only change that I have made is that I added the line:

    await sleep(500) // This causes the error

The error message is the following:

Transaction simulation failed: Error processing Instruction 2: invalid account data for instruction 
    Program Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR invoke [1]
    Program log: Instruction: Init Obligation
    Program Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR consumed 5521 of 200000 compute units
    Program Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR success
    Program Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR invoke [1]
    Program log: Instruction: Refresh Reserve
    Program Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR consumed 24239 of 194479 compute units
    Program Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR success
    Program Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR invoke [1]
    Program log: Instruction: Deposit Obligation Collateral
    Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2]
    Program log: Instruction: Transfer
    Program log: Error: InvalidAccountData
    Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1583 of 157880 compute units
    Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: invalid account data for instruction
    Program Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR consumed 13943 of 170240 compute units
    Program Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR failed: invalid account data for instruction

You can see the complete error log here.

The error is related to a Token Program error. However, all the account that gets passed in is the same with the same set up except for just adding one line of sleep. We suspect the actual failure is not as displayed by the error, but instead it is because of the fake oracle time slot is too late. However, this is not correctly displayed in the test validator and causes a lot of confusion.

Proposed Solution

We hope that the Solana team can look into it and find the root cause.

@AsadAli414243
Copy link

@mvines Please look into this.

@mvines
Copy link
Member

mvines commented Mar 4, 2022

Please don’t summon me

@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Mar 6, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

No branches or pull requests

3 participants