an error occurs with get_nonce rpc method #84
sasdecompte
started this conversation in
General
Replies: 1 comment 8 replies
-
Did you try nonce 2? Because you have to add 1 to what the server returns. Also can you send me the full code of your transactions? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Thank you in advance for all your answers.
To obtain the nonce for each transaction, I use get_nonce rpc method, like this:
the system gives me :
Response { success: true, payload: { nonce: 0} }
and when I put this nonce in the transaction, the system says :
LOG [2024-01-09T11:46:42.088Z] Sent one transaction.
ERROR [2024-01-09T11:46:42.103Z] Failed to add one transaction to pool.
when I change 0 by 1, the transaction is completed correctly.
when I check the balance, it's ok :
Response { success: true, payload: { balance: '10' } }
and when I make a second transaction, I use a second time get_nonce rpc method, and the system gives me :
Response { success: true, payload: { nonce: 1 } }
and when I push the transaction with this nonce, the system says :
LOG [2024-01-09T11:59:46.605Z] Sent one transaction.
LOG [2024-01-09T11:59:46.620Z] Added one transaction to pool.
and when I check the balance, I see that the transaction is not completed correctly.
and I find myself stuck, no nonce works anymore.
It looks like there is a gap in the allocation of nonces.
Do you know what this is due to?
As a reminder :
"FIRST_ACCOUNT": "52472d59e3c01bc2cf9496c959d924ce5f469d4e097c395f5605f70633e44a28",
Address n°1, mining the blocks ->
Address : "60aafa56e838661b90a147d2fe13149ef8e3513a44530c5a7fa37301985ed349"
Public key : "04641218a10e698a21ac9eba4e3b29a30a9dd07bbb8d98136b576bbc19fe6f3187195936550cf4ce8d898b9e9687345ab62351df350f17d777e94e9cbaa9092f87"
Private key: "84f054b3f3183be5dab51d60d34cf6e0783ac9db6671ade83dfbda0f1cc88860"
Address n°2, do nothing, it only receives transactions
Address : "535f3a402d563320e153d902bcfe178572128033adc7d293760d4dd78c5c53d1"
Public key : "041ce8d242440c5dc46868eb73abc913c9875ebebcf3152070ae146655bfdeebf082ba329fc4a565040873a2cfe56f46dd045153654b48fb1ee794bec04d2105fd"
Private key: "a497a4a79ca256f5855e4b07d155c2a5f3c44d5d68700e58f7c6fc097efc34e1"
Beta Was this translation helpful? Give feedback.
All reactions