Got empty ac_status when submitting transaction

Hi there,
I was trying to submit transaction through my grpc client. However, I got an empty response with

ac_status {

And after this transfer, the balance of the sender still remains the same. So it means the transfer doesn’t work.

I did get some errors like submit txn rejected before, so I’m quite sure that my connection is ok.

Also, did someone know how to see debug logs in libra_swarm? I was trying to connect to my local libra swarm to see if I could get some logs. However, I couldn’t find any logs in the base directory it specifies.

FYI, I was using the latest version (05364e6d updated a few days ago) on testnet branch.

Thanks a lot!

My signed transaction
public key: d6c622f571737434f4ab67cc8d4076f5dd9f4dd963d19949fe11a30f2a472081
raw tx: 0a20319c2bddb99cc05ccd7680277c0011daa7b0769aac453fc7acb1ec95dfd30cac10011aed010ab8014c49425241564d0a010007014a00000004000000034e000000060000000c54000000060000000d5a0000000600000005600000002900000004890000002000000007a90000000f00000000000001000200010300020002040200030003020402063c53454c463e0c4c696272614163636f756e74046d61696e0f7061795f66726f6d5f73656e6465720000000000000000000000000000000000000000000000000000000000000000000100020104000c000c0113010002122408011220ee0ee4d0037d699776ef1ec411642f2615160fac7a43d1c04d586956a167a59c120a1208809698000000000028a08d063886e6c9eb05
sig: 153073efbe12bc9c54e13ebbafca8632e111af607d2a875c2e7b2633a51b40d3706f2c89d8d52c1a453c63207e68fe32be79a4d8620e1b8299370d0b140ed105

Problem solved!
I accidentally left a gap in the sequence number (e.g the next seq should be 1 but I fill in 2), which validator won’t complain about this at all!!!
Also, after testing, 100000 for max_gas_amount is still not enough, I succeed at 140000.

Are you using the proto -files from master or testnet branch? Could you also post all the parameters of your transaction? It would be very helpful to have a transaction that works as a reference for tests, I have been trying to get this to work for java.

Hi @2kSiika,
Yes, I’m using proto files from latest testnet branch.
Here is my raw transaction structure:

from io import BytesIO

from lib.transaction_pb2 import RawTransaction, TransactionArgument

# You could compile this code (
# locally and convert the bytes code to hex string to get this value.
TRANSFER_OPCODE = '4c49425241564d0a010007014a00000004000000034e000000060000000c54000000060000000d5a0000000600000005600000002900000004890000002000000007a90000000f00000000000001000200010300020002040200030003020402063c53454c463e0c4c696272614163636f756e74046d61696e0f7061795f66726f6d5f73656e6465720000000000000000000000000000000000000000000000000000000000000000000100020104000c000c0113010002'

class Transaction:
    def __init__(
        self.sender = bytes.fromhex(sender)
        self.recipient = bytes.fromhex(recipient)
        self.amount = amount
        self.sequence = sequence
        self.max_gas_amount = max_gas_amount
        self.gas_unit_price = gas_unit_price
        self.expiration_time = expiration_time

    def raw_tx_bytes(self):
        raw_tx = RawTransaction()
        raw_tx.sender_account = self.sender
        raw_tx.sequence_number = self.sequence
        raw_tx.program.code = bytes.fromhex(TRANSFER_OPCODE)
        arg1 = raw_tx.program.arguments.add()
        arg1.type = TransactionArgument.ADDRESS = self.recipient
        arg2 = raw_tx.program.arguments.add()
        arg2.type = TransactionArgument.U64 = self.amount.to_bytes(8, 'little')
        raw_tx.max_gas_amount = self.max_gas_amount
        raw_tx.gas_unit_price = self.gas_unit_price
        raw_tx.expiration_time = self.expiration_time
        return raw_tx.SerializeToString()

Basically it’s the same as this project:

You should note that after this testnet update, the peer-to-peer opcode has changed. You should re-compile the to get the latest bytecode (or just copy mine lol).

1 Like

Ok, thank you, this was really helpful. I was under the impression that the new serialization is already in use for transactions and I tried to use that, but the only thing that has changed is the move script for the transaction and maybe the gas amount.
You saved me a lot of time :smiley:

1 Like

Hello @2kSiika and @bun919tw , I’m trying to make some transactions today, and are being rejected, a couple of days ago the same code was working just fine, do you know if something change in the testnet, maybe the new LCS Serialization ?

I also already updated the Transaction bytecode of the p2p transaction.

I’m recieving "submit txn rejected", hope can help me!

Thanks in advance.


Yes, the transactions have also been changed to use the LCS serialization. You need to update the proto files also and implement the serialization for the platform you are using.
I have been working on it for JLibra in a different branch
The transactions are now properly formed but I still have a couple of issues and lots of tests to fix :sweat_smile:

1 Like