kinecosystem / kin-node

DEPRECATED! Please use Kinetic: https://developer.kin.org/docs/kinetic
https://developer.kin.org/docs/kinetic
MIT License
16 stars 14 forks source link

submitPayment method is super slow and Throw exception as BadNonce #22

Open bhaveshdaswani93 opened 2 years ago

bhaveshdaswani93 commented 2 years ago

I am using @kinecosystem/kin-sdk-v2 version 0.5.0 SDK I have two issue with submitPayment method

BadNonce at errorFromProto (path\node_modules\@kinecosystem\kin-sdk-v2\dist\errors.js:90:20) at Object.errorsFromSolanaTx (path\node_modules\@kinecosystem\kin-sdk-v2\dist\errors.js:18:17) at path\node_modules\@kinecosystem\kin-sdk-v2\dist\client\internal.js:346:58 at Object.onReceiveStatus (path\node_modules\grpc\src\client_interceptors.js:1212:9) at InterceptingListener._callNext (path\node_modules\grpc\src\client_interceptors.js:568:42) at InterceptingListener.onReceiveStatus (path\node_modules\grpc\src\client_interceptors.js:618:8) at callback (path\node_modules\grpc\src\client_interceptors.js:847:24)

I am using passing following options to submitPayment method

const txId = await kinClient.submitPayment( { sender: privateKey, destination: publicKey, type: TransactionType.P2P, quarks: kinToQuarks(kinAmount), invoice: { Items: [ { amount: kinToQuarks(kinAmount), description: "kin spent or p2p", sku: new Date().getTime().toString(), title: "kin spent or p2p", }, ], }, }, );

richardmands commented 2 years ago

Hi. Thanks for submitting this issue. We think this is due to issues on the Solana end. They are taking a bit of a battering at the moment in terms of performance. https://analytics.solscan.io/public/dashboard/8d888828-baae-47b9-948b-d087e5de1411?select_report_period=past30days image

For context, we really want this to be over 2000: image https://explorer.solana.com/ We can see it's running way below the normal levels.

bhaveshdaswani93 commented 2 years ago

So what can be done related to this? Do we need to raise issue with solana? If yes then where and how to generate issue with the solana?

richardmands commented 2 years ago

Hi. It looks like this is something Solana is aware of and a fix is coming. Link for some context: https://twitter.com/aeyakovenko/status/1512551478883405834

richardmands commented 2 years ago

There's some chat about this on our developer discord if you're not there already: https://discord.gg/kdRyUNmHDn