Account Balance incorrect?

After:

  1. Minting 1000
  2. sending 222
  3. sending 222
  4. sending 222

How can my account balance be still 1000, if the tx seem confirmed in mined blocks?

https://librabrowser.io/account/a8cf1f8c62d5d1eb8df63fe4dd4f1510999c809f53154d3351d7e680b7291dc0

I am wondering if I have a conceptual misunderstanding but in the “My First Transaction” tutorial the “account balance” command should yield the updated amount once tx is confirmed, but on CLI I get 1000 same as in the explorer.

Or, are the tx not yet mined (I fail to see an indication for that)??

Thanks!

librabrowser is not official.
librabrowser didnt update your account data. Thets why you see old balance.

No you are wrong this is not about librabrowser, I get the same result on CLI, this is why I checked on the browser in the first place!

So my question is still open, since these transactions seem confirmed (on CLI same as in browser!), how come the account balance did not change??

here screenshot from CLI showing that same account has still balance of 1000 after the 3 tx, which can be seen on browser as well.

Something seems wrong, I do not see any other explanation besides the validators having an invalid state!

Feedback appreciated, thanks

1 Like

So the problem seems that the 3 transactions are in fact still pending, as manually gas price was set too low.

As also visible on my last screenshot the “Events” array is empty. So conclusion is that “Committed” does not mean added to blockchain, probably just means added to mempool. Only the “sent” event seems to confirm the tx being actually part of the blockchain.

This part was not entirely clear to me from the documentation and is also not well reflected on the browser if you ask me.

I am considering the initial topic closed unless someone has things to add or correct.

However now I am wondering:

  • can we somehow query the pending tx backlog from validators?

Give me please you account address, i want check pending transactions.

Thanks, adress is same as in given browser link:

a8cf1f8c62d5d1eb8df63fe4dd4f1510999c809f53154d3351d7e680b7291dc0

Would appreciate a quick hint on how to check the pending tx

Thanks for your help! :slight_smile:

if I find something interesting I will write

Hi @libraBTC, “Committed” does indeed mean that it was committed to the blockchain, but that doesn’t mean that it was successful. We are working to add better status codes, but if you fetch events and don’t see sent and received events, that means that the transaction actually did not succeed. It was committed, but it’s execution did not result in coins being transferred (and in a real validator, would have likely resulted in gas being charged)

1 Like

Hi @kph,

ok thanks. I find in this context the sequence number a bit confusing, since it permanently gets increased for committed tx, even though they might never actually make it out of pending state onto the blockchain if I understood correctly (due to manually set too low gas price). But I see that if you want to have such an incremental index this is not otherwise possible.

Can you point me to how to get the pending tx?

I can see for given address to run through the sequence numbers with “account txn_acc_seq…”, but for the blockchain as a whole? Do the validators offer something here to provide this info from their mempool?

Thanks again!

Hi @libraBTC,

I apologize, I seem to have done a poor job of explaining. Let me try again.

  1. You submit transaction tx1 on account A.
  2. tx1 is accepted to some validator’s mempool
  3. tx1 is proposed in a block by some validator
  4. All validators execute tx1 and find that something goes wrong that causes the txn to not actually send coins - maybe the account A runs out of funds to pay for gas, maybe the total gas amount is too low, maybe the “program” is bad, etc.
  5. gas is charged for the units of work used up until this error happened. So let’s say the issue was that we specified too low of a max gas amount. And the amount we specified was 100 microlibra. So now the account will be charged 100 microlibra and execution of the program will stop.
  6. tx1 is still committed to the chain now (assuming enough validators vote for this block). But you will see that there are no events emitted by it -> meaning that no coins were “sent” or “received”

By tx1 being committed, it doesn’t mean that the transaction was successful - it merely means that it was run and some amount of gas was charged. You need to look at the events to see if the execution did what you expected. Note that we are currently working on better status codes so that you will soon see if the result of execution was “execution completed”, “ran out of gas”, etc.

Also note that the transaction is NOT pending. It has indeed been committed to the chain and could not be replayed (because the sender’s sequence number was bumped).

3 Likes

Thanks a lot, this clarifies is perfectly :slight_smile:

Since it came up, I’d still be interested on the question of pending tx, if there is a way to get them for non-validator clients?

Much appreciated!

1 Like

There is not currently a way to retrieve pending transactions