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

Improvement claimAll #10

Open
liobrasil opened this issue Mar 26, 2024 · 1 comment
Open

Improvement claimAll #10

liobrasil opened this issue Mar 26, 2024 · 1 comment

Comments

@liobrasil
Copy link

liobrasil commented Mar 26, 2024

  • Issue: when calling claimAll, the time between when we get blockhash (at the beginning of the function execution) and when the transaction is constructed can be greater than 151 blocks. When constructing a transaction, recentBlockhash need to be passed as an arg to the new TransactionMessage constructor. The transactions can expired and error of type TransactionExpiredBlockheightExceededError: Signature jtsGz2RHt2LTUeN5vsGD6YTd2cj3BjKjUGAPW7z7LMWwJwjoruZwMYsrc9XXKL24RypfatMN3w4w34JdhhEmSHo has expired: block height exceeded. appears.
  • Cause: When executing the claimAll function most of execution runtime is linking to getReferralTokenAccounts especially if the referral token account owns several token accounts (like a DEX using Jupiter). For around 300 tokens, It took around 1m30s...
  • Solution: get blockHash after getReferralTokenAccounts
@liobrasil
Copy link
Author

Screenshot 2024-03-25 at 23 01 18

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

No branches or pull requests

1 participant