phantom / docs

32 stars 17 forks source link

any limit on .signAllTransactions()? #20

Closed neerajajaja closed 1 year ago

neerajajaja commented 2 years ago

hey, would like to know if there is any limit on the number of transactions i can sign with .signAllTransactions()?

AntonKrutikov commented 2 years ago

Have issue with this in example like buying many NFTs at once - with 3 transactions it properly show balance changes including '+NFT', but with 4+ it's always 'unable to fetch balance change'. Also with ignoring this error and signing, next sending this transactions - them executes. In solfare all transaction shown properly...

One more example:

  1. Go to MagicEden
  2. Add 5 NFTs to basket
  3. Click buy button
  4. There should be balance change with -SOL and +5 NFTs, but will be 'unable to fetch balance change'

Same behaviour in Chrome and Brave

bfriel commented 2 years ago

At this time, Phantom does not put a limit on the number of txs that can be signed with signAllTransactions. We have seen that the app may become unresponsive above 80 txs, likely due to the payload size becoming too large. If and when we do put a cap on this, we will document it.

@AntonKrutikov the simulation issue you're describing is due to a Solana JSON-RPC constraint with how we are simulating transactions. When multiple transactions are present, we attempt to simulate the transactions serially, rather than in parallel to each other, so that we can simulate the actual end state to the best of our ability. As you pointed out, this can cause issues when too many transactions are present. We are currently working on a fix for this.

AntonKrutikov commented 2 years ago

@bfriel Thank you, let me know if I can help somehow, maybe test more cases. For now it sometimes can be workaround if we divide complex transactions to more sign process (like sign all instructions of creating associated accounts first and next call programs, but this only possible for instructions that can be separated)

gigigaz commented 1 year ago

@bfriel now we have limit, right?