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

[Bug]: AuctioneerExecuteSale fails with Provided seeds do not result in a valid address #1055

Open
KartikSoneji opened this issue Mar 22, 2023 · 14 comments
Labels

Comments

@KartikSoneji
Copy link
Contributor

Which package is this bug report for?

auction-house

Which Type of Package is this bug report for?

Rust Contract

Issue description

Trying to finalize the sale of a timed auction results in an error.
I'm not sure if this is an issue with the accounts used in the tx or very bad luck with the pda seeds and bumps.

It looks like the issue is in the AuctioneerExecuteSale instruction since the cpi succeedes.

Here's the link to simulate the transaction:
https://explorer.solana.com/tx/inspector?signatures=%255B%25221111111111111111111111111111111111111111111111111111111111111111%2522%255D&message=AQAOGWJdA8E2UB0FUYnGqWSg%252BsgYXQDhtET1ULaTrOJUj5qcNzXQ4LhHNPFLhgPHhxr%252FDTC%252Fh5K50I5c6lcgR407VoM%252BQyIsDsJaq7zXt764XEDDeDKV7r72sGlgMioFTH5XGEZFeGSbzelgc1Ai7iTto6LERvKypouNwGzXJS%252FObsZEcL0%252FJ%252FY8CqdNNApRMWAdNchxz6x6vdYYapiNcxw%252BRMCE1kGNqyz6umt83ibJiLeKIZnOjmyurq2I0uS40mFWgIfNK9rmh9NIg5ZCi23GBKtokiFrU3TG6oNaBp544%252FyynbavCm%252BgrOdPCUmqyamJTnkih6ClFOsADdDRwlFvrG6xDYrywSQaxsIs%252FQSfNTx3WtQl4%252B8KfsDIwOPxhMJmA8AMwjCKVwGN6TzWxZCUwZ1zwQtugrqM58Iyzw%252FXjJaKx73P4SGOpq24xysmgJsXYbNyb8mLzxx94yUwLAClSNIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACtVHrtVhyribMnCf4V%252Ft3MdT%252FyRJSYAddc7h%252FYDk%252Fq7Wp3MsyAaW7l%252BIluuuNXFvKV%252Fo40Rif8inrVX55Ff%252FRpohL8LrGSXRiUvCHkZfyZrlkio%252Bls18yo11IuADvhHAIyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZsVfveZ40NZ1%252BE6qrh4BvbEMYP2VglMhwPXEzJZ710uy6MBN05L7iGhlp9p8BsNoiaESRMjj6ddMZkIrFTIw5aN1ikNBEuIwB%252F9MIn3HSz3XCg5%252FLSAvDQz%252BC9oTzeAURCmWThjy6RhVk6uQTc3IVRusBUckwgna71K0qHDpCEHv0JF6XdZMSX7FZQbbAqSYK9EOLzRA1UpKkCwXfh%252FXVIAuxtdQOT6iste2ZYfITUcSiFoUZzPsWwL6WJkZZac7KBpuIV%252F6rgYT7aH9jRhjANdrEOdwa6ztVmKDwAAAAAAEGp9UXGSxcUSGMyUw9SvF%252FWNruCJuh%252FUTj29mKAAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV%252B%252FwCpzfiMzsZK7C%252B7K0%252FP1dyjb4XAwfX1yi79X5k6zlUH%252BAUBFRoTCQYAARENFgMABBIOBwoIBQIMEBgLDxQXABwlStmdTzEjBv7%252F%252F%252F4AXtCyAAAAAAEAAAAAAAAA

Relevant log output

> Program logged: "Instruction: ExecuteSale"
> Program invoked: Unknown Program (hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk)
  > Program logged: "Instruction: AuctioneerExecuteSale"
  > Program consumed: 62005 of 132382 compute units
  > Program returned error: "Could not create program address with signer seeds:
          Provided seeds do not result in a valid address"
> Program returned error: "Program failed to complete"

Priority this issue should have

High (immediate attention needed)

@KartikSoneji KartikSoneji changed the title [Bug]: [Bug]: AuctioneerExecuteSale fails with Provided seeds do not result in a valid address Mar 22, 2023
@samuelvanderwaal
Copy link
Contributor

@KartikSoneji I'm not sure how to write a test to duplicate this. If this is still an issue for you, let me know, and we can work to duplicate it and figure out what the bug is.

If other people are experiencing this please upvote and drop a comment here with as many details as you can to allow me to try to write a test that can duplicate it. Otherwise, if there's no activity here I'm going to close it eventually as stale.

@KartikSoneji
Copy link
Contributor Author

OK, someone else reported the same issue:
https://explorer.solana.com/tx/inspector?signatures=%255B%25221111111111111111111111111111111111111111111111111111111111111111%2522%255D&message=AQAOGbAMl5cdeX8u9lMKSDZqSmJ3CRI9oRgRqj9fQ228noMGHDADcwAv84BGTL4Dert%252F6oxUk7wvHBZHnk78ePrTstIeLSx%252BGz%252FoSQp30snJ8%252BOL5H9uJ%252Bzjrhs5oCPtNPF%252FjEZoqmkImmtpqM%252BbErfnEFMLur5jyHEkhl59Vl%252FFtdinYyhoRAjj31AEAtxCdxP7UgUXpFy4kZnONhqDX9leGYyEevGxh9g2QcBWVeN%252Bepb1N2XbT0q%252BnDacWolOaGmg4wiCpUGEn6In8dixNtE2zrGqvXiE%252F%252BSoe33Ksi1sI1gjnbavCm%252BgrOdPCUmqyamJTnkih6ClFOsADdDRwlFvrG6jrNg2QSwsMKQD1V15MsGBU%252FhTANO6BBH%252BeCJoyY2z6q5qEwjTrPVpUeodotPrf8ycy1qPBBbmv9Mij2PkzF7Ax73P4SGOpq24xysmgJsXYbNyb8mLzxx94yUwLAClSNIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACtVHrtVhyribMnCf4V%252Ft3MdT%252FyRJSYAddc7h%252FYDk%252Fq7aIS%252FC6xkl0YlLwh5GX8ma5ZIqPpbNfMqNdSLgA74RwBqnNaJ9SC70tceiUclkkxrgtFv9rK%252Feazyu86WVzBn84yXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZsVfveZ40NZ1%252BE6qrh4BvbEMYP2VglMhwPXEzJZ710uwJmjr%252BJmaK2mXfvAUPHEuCObfPeGcaJ%252BvGdmYA6VIPW91ikNBEuIwB%252F9MIn3HSz3XCg5%252FLSAvDQz%252BC9oTzeAURCmWThjy6RhVk6uQTc3IVRusBUckwgna71K0qHDpCEHv0JF6XdZMSX7FZQbbAqSYK9EOLzRA1UpKkCwXfh%252FXVIAuxtdQOT6iste2ZYfITUcSiFoUZzPsWwL6WJkZZac7KBpuIV%252F6rgYT7aH9jRhjANdrEOdwa6ztVmKDwAAAAAAEGp9UXGSxcUSGMyUw9SvF%252FWNruCJuh%252FUTj29mKAAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV%252B%252FwCpezvfprZnW6oXcaolzBk%252FID8kZB2EfqLk5KQ1ahMFRTsCDwYABAkOCxgAFRoTAgkAAw4RFgYABBINBwoIBQEMEBgLDxQXABwlStmdTzEjBv7%252B%252F%252F6ANr4mAAAAAAEAAAAAAAAA

Please let me know what information you need to help debug this.
For what it's worth, the last time this happened, tx succeeded when retried after a few days so the issue might be time based.

@KartikSoneji
Copy link
Contributor Author

@samuelvanderwaal found another example:

https://explorer.solana.com/tx/inspector?signatures=%255B%25221111111111111111111111111111111111111111111111111111111111111111%2522%255D&message=AQAOGSr%252BHCQgKlj8515CJyp8BtEkUT75TH%252BGdtxjI%252FO38uZXNz1crdigJToeippMZs%252BhISZQDNqazuCh0aI2kdrDUHs7SuII9skGvWE6UUlRoJyEWgJ8K%252B16mGkEldL7VyakbXTz5t%252Bf1G%252BloHmBH6X93LVZHZU3%252FYdqsOncDWjmbclYfQrviZCLm5KGHZ%252FMepiZrluCREMOOcBrRrzWv5Gdk8EIgqVBhJ%252BiJ%252FHYsTbRNs6xqr14hP%252FkqHt9yrItbCNYI522rwpvoKznTwlJqsmpiU55IoegpRTrAA3Q0cJRb6xurmoTCNOs9WlR6h2i0%252Bt%252FzJzLWo8EFua%252F0yKPY%252BTMXsDMSIQiJx94WBZo8K0iIiHXObAzhpoG%252Blrd3FzucjCx7ce9z%252BEhjqatuMcrJoCbF2Gzcm%252FJi88cfeMlMCwApUjS%252B5cznUsUMQfmVZZltV9NCdO5tdV6wRAL7nZOLn6drP0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACtVHrtVhyribMnCf4V%252Ft3MdT%252FyRJSYAddc7h%252FYDk%252Fq7M3xa%252BX%252BAx0qisgIms4WCUegufh1rNOw7QlBKJPhq2LFohL8LrGSXRiUvCHkZfyZrlkio%252Bls18yo11IuADvhHAIiCzsh4kGO73m4lGwXgFj6w0YY8xb5KAVU6VV9gOSD5jJclj04kifG7PRApFI4NgwtaE5na%252FxCEBI572Nvp%252BFmxV%252B95njQ1nX4TqquHgG9sQxg%252FZWCUyHA9cTMlnvXS7N1ikNBEuIwB%252F9MIn3HSz3XCg5%252FLSAvDQz%252BC9oTzeAURCmWThjy6RhVk6uQTc3IVRusBUckwgna71K0qHDpCEHv0JF6XdZMSX7FZQbbAqSYK9EOLzRA1UpKkCwXfh%252FXVIAuxtdQOT6iste2ZYfITUcSiFoUZzPsWwL6WJkZZac7KBpuIV%252F6rgYT7aH9jRhjANdrEOdwa6ztVmKDwAAAAAAEGp9UXGSxcUSGMyUw9SvF%252FWNruCJuh%252FUTj29mKAAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV%252B%252FwCpQ4kR0A21Y%252Fl%252BJGMBVL%252BKW66ZD3QgBjWdogNHwwHCgyMCEAYACAcNCxgAFRoTAgcAAw0PFgUACBIOBgkECgEMERgLEBQXABwlStmdTzEjBv79%252F%252F4Aypo7AAAAAAEAAAAAAAAA

@blockiosaurus
Copy link
Contributor

Hey @KartikSoneji, are you trying to use receipts? AFAIK that's currently not supported under Auctioneer.

@KartikSoneji
Copy link
Contributor Author

I don't think so, most other auctions handled by the same code have no issues.

@KartikSoneji
Copy link
Contributor Author

KartikSoneji commented May 29, 2023

On a side note, can the IDL for Auctioneer please be published on-chain too?
It would make debugging in explorer much easier.

@blockiosaurus
Copy link
Contributor

Yeah I can do that.

@blockiosaurus
Copy link
Contributor

It's weird that this is happening on ExecuteSale since every PDA should already have been utilized and successfully derived. I'll dig into the runtime on find_program_address but I assumed it was deterministic.

The auctioneer PDA does look a little low on entropy so I'll also look into how hard it'd be to add more seeds in the future.

@StealthofFoster
Copy link

For whatever it's worth, when I spoke to a colleague at Superteam about this issue, he checked the tx simulation that kartik provided said that the error in the log seems to imply that the listing_config account owned by the auctioneer program is not created yet which is created in the sell ix

@KartikSoneji
Copy link
Contributor Author

Here's a tx that still shows the error:
https://explorer.solana.com/tx/inspector?signatures=%255B%25221111111111111111111111111111111111111111111111111111111111111111%2522%255D&message=AQAOGY6P4PPkduz%252B8cGI2lSd284qg%252BteyYGdNMjwAUy5oJTcKv4cJCAqWPznXkInKnwG0SRRPvlMf4Z23GMj87fy5ldXwzXfi6Y7XsXhWaEBUcotFUTlZjRzoZS8Sh%252FkR9nDV20VlwJvt5qX2AU77I4LQLVnCEgji9%252BG9tf9lG4rQSZNb9q0sLYksNzq01Cl4hfuuj4SRznKiLol5diLFbq6NV%252Bdtq8Kb6Cs508JSarJqYlOeSKHoKUU6wAN0NHCUW%252BsbsRbKAa07kld6fMfhk83LvirncIMMBWRfgNNaIDVZhe1ziQihycl3c1XO%252FLAvROoyPcgyXjzhljGWueWZR4OAlbHvc%252FhIY6mrbjHKyaAmxdhs3JvyYvPHH3jJTAsAKVI0s64UyBvFpYAJyV8BEd0QmjrWcLny%252BSO6lt9QqNcHBOc4SNPjX10wqyIjC3Q372ySB%252BamzgoErJZ365UwzqlD8cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACtVHrtVhyribMnCf4V%252Ft3MdT%252FyRJSYAddc7h%252FYDk%252Fq7ThkvWWlLmNpD%252FrtbjYzUhu2%252BmGjHC%252BxYq2xfIBBTlkZZvdHDWtyymPVf6VxYZinM9DllI0zftSzzRU%252B4Z3cEQmiEvwusZJdGJS8IeRl%252FJmuWSKj6WzXzKjXUi4AO%252BEcAjJclj04kifG7PRApFI4NgwtaE5na%252FxCEBI572Nvp%252BFmxV%252B95njQ1nX4TqquHgG9sQxg%252FZWCUyHA9cTMlnvXS7N1ikNBEuIwB%252F9MIn3HSz3XCg5%252FLSAvDQz%252BC9oTzeAURCmWThjy6RhVk6uQTc3IVRusBUckwgna71K0qHDpCEHv0JF6XdZMSX7FZQbbAqSYK9EOLzRA1UpKkCwXfh%252FXVIAuxtdQOT6iste2ZYfITUcSiFoUZzPsWwL6WJkZZac7KBpuIV%252F6rgYT7aH9jRhjANdrEOdwa6ztVmKDwAAAAAAEGp9UXGSxcUSGMyUw9SvF%252FWNruCJuh%252FUTj29mKAAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV%252B%252FwCpdsxvfqcyo2X0V4RsehcQCW9N88zxobWGU%252FO23zyhhS4CEAYABAENCxgAFRoTAwEACQ0OFgoABBIPBQgCBwYMERgLEBQXABwlStmdTzEjBv3%252F%252F%252F4Ao%252BERAAAAAAEAAAAAAAAA

@StealthofFoster
Copy link

Sup Metaplex -

Just wanted to drop by and let you guys know we finally figured out the issue for the auctioneer seeds error that was preventing token owners from finalizing the sale of a timed auction. The root cause of the issue was a deficient balance in the bidder’s escrow wallet.

Basically, the bidders escrow wallet was deficient by .0009 SOL (likely either a miscalculation in the program or our BE logic at the time funds were transferred to the escrow wallet). Due to that deficiency, it caused the 1st instruction for the program to fail. Although the cause of the balance deficiency itself was a short coming on our end, it would definitely be helpful if the program returned a sensible error message instead of “Error processing Instruction 1: Program failed to complete.” Just a thought that might help anyone who comes across this issue in the future to more easily identify the problem.

Have a good weekend!

@samuelvanderwaal
Copy link
Contributor

Sup Metaplex -

Just wanted to drop by and let you guys know we finally figured out the issue for the auctioneer seeds error that was preventing token owners from finalizing the sale of a timed auction. The root cause of the issue was a deficient balance in the bidder’s escrow wallet.

Basically, the bidders escrow wallet was deficient by .0009 SOL (likely either a miscalculation in the program or our BE logic at the time funds were transferred to the escrow wallet). Due to that deficiency, it caused the 1st instruction for the program to fail. Although the cause of the balance deficiency itself was a short coming on our end, it would definitely be helpful if the program returned a sensible error message instead of “Error processing Instruction 1: Program failed to complete.” Just a thought that might help anyone who comes across this issue in the future to more easily identify the problem.

Have a good weekend!

Thanks so much for the follow up! If you know exactly where this error should be raised and can make a PR I'll make sure it gets merged.

@ghost
Copy link

ghost commented Aug 8, 2023

@impin2rex
Copy link

impin2rex commented Nov 28, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants