Describe the bug
After successfully completing an address to address transaction using the send-money.sh script, the funds are transferred, but the counter variable, which represents the number of transactions performed using this address, is not updated (counter: 0 is not updated to counter: 1).
Mandatory Information
jcli --full-version output;jormungandr --full-version output;To Reproduce
Steps to reproduce the behavior:
$ ./jcli rest v0 account get ca1sk3aj54u0jh926adru453u0c0sln46pq06qdtsd4cf0e0fhzppxawdwhqx6 -h http://127.0.0.1:3101/api ---
counter: 0
delegation:
pools: []
value: 10000000000
2.) use send-money.sh to transfer funds from one address to another:
$ send-money.sh ca1sk3aj54u0jh926adru453u0c0sln46pq06qdtsd4cf0e0fhzppxawdwhqx6 10000015 3101 ed25519e_sk1uzq.....xhff3d
================Send Money=================
DESTINATION_ADDRESS: ca1sk3aj54u0jh926adru453u0c0sln46pq06qdtsd4cf0e0fhzppxawdwhqx6
DESTINATION_AMOUNT: 10000015
REST_PORT: 3101
SOURCE_SK: ed25519e_sk1uzq.....xhff3d
BLOCK0_HASH: ae57995b8fe086ba590c36dc930f2aa9b52b2ffa92c0698fff2347adafe8dc65
FEE_CONSTANT: 1000
FEE_COEFFICIENT: 50
==================================================
## Sending 10000015 to ca1sk3aj54u0jh926adru453u0c0sln46pq06qdtsd4cf0e0fhzppxawdwhqx6
discrimination: testing
account: ed25519_pk150v490ru4e2khtgl9dy0r7ru8uawsgr7sr2urdwzt7t6dcsgfhtsav65rh
##1. Create the offline transaction file
##2. Add input details
##3. Add output details
##4. Finalize the transactions
##5. Create the witness
##6. Add the witness to the transaction
##7. Show the transaction info
Transaction `b84da83e7aed87ad8a82b05fa733666bdc6bf9dc424c4f5c9c082fcd05ce362c' (finalizing)
Input: 10001115
Output: 10000015
Fees: 1100
Balance: 0
- 0f20b670776afabe28c7b457ea959f4341cd1462841644286d0bb14270a695bb 10001115
+ ca1sk3aj54u0jh926adru453u0c0sln46pq06qdtsd4cf0e0fhzppxawdwhqx6 10000015
##8. Finalize the transaction and send it
fa46c9c3ec29cc3b6f5c53fc6548de5ddca7a786a744eea2c253cbd7814a3462
##9. Remove the temporary files
##Waiting for new block to be created (timeout = 200 blocks = 400 secs).
New block was created - a184018c6185cc408d18c64060af7363fd67f72fc24e3a645b90310505c3ec79
##10. Check the account's balance
---
counter: 0
delegation:
pools: []
value: 10010000015
3.) Note that funds were successfully added, but counter was not updated.
$ ./jcli rest v0 account get ca1sk3aj54u0jh926adru453u0c0sln46pq06qdtsd4cf0e0fhzppxawdwhqx6 -h http://127.0.0.1:3101/api
---
counter: 0
delegation:
pools: []
value: 10010000015
NOTE THAT "counter: 0" was not updated.
Expected behavior
I expected output to show update output to "counter: 1". It is rare that any of my transactions make it to the blockchain. The fragments usually get a pending status in the message log, then disappear after some time without completing. But once in a while, a transaction appears to make it thought the process, as shown above, but the outcome is not what is expected.
**It should be noted that the counter was not updated to "counter: 1" when funds were added to the address the first time using the faucet either.
Additional context
Running Windows 10, git-bash.
https://input-output-hk.github.io/jormungandr/jcli/transaction.html#account-input the counter you are referring to is known as account spending counter and is not related to the account receiving funds but to the account that is sending funds.
thanks @rinor Indeed, this is the counter used to sign the transaction from this account, not the other way around.
Thank you for the clarification. I was confused.
https://input-output-hk.github.io/jormungandr/jcli/rest.html?highlight=counter#get-account-state indicates that:
counter is the number of transactions performed using this account this is useful to know when signing new transactions;
Just for clarity, perhaps the above documentation might better read:
"counter is the number of outgoing transactions performed using this account. This is useful to know when signing new transactions;"
Thanks again.
Most helpful comment
https://input-output-hk.github.io/jormungandr/jcli/transaction.html#account-input the counter you are referring to is known as account spending counter and is not related to the account receiving funds but to the account that is sending funds.