0

I'm attempting to create a transaction for broadcast later but tx_blob always returns empty. tx_metadata is populated so I attempted to relay that at: https://monero-stagenet.exan.tech/rawtx but it was rejected.

The data does not appear to be signed raw tx! Data prefix: 0xffffffd3]z0xffffffef~0xffffffb90xffffffefn0xffffffbd0xffffffeb^0xffffff9c0xffffffeb0xffffffde0xffffffda0xffffffeb^0xfffffff80xffffffeb0xffffffde0xffffff9f

Request:

{
  "params": {
    "unlock_time": 0,
    "ring_size": 7,
    "priority": 1,
    "mixin": 7,
    "get_tx_metadata": true,
    "get_tx_key": true,
    "get_tx_hex ": true,
    "do_not_relay": true,
    "destinations": [
      {
        "amount": 1000000000000,
        "address": "56Wfz6VXwNJcek5fmSGV6P2Li5oSDzJvKf3rkfxue1Qd67Y18MPmKwTeR656bLqmXvHPFJ1vdsk6K4AzAuPp6yJmVSVqyqF"
      }
    ]
  },
  "method": "transfer",
  "jsonrpc": "2.0",
  "id": 0
}

Response:

{
  "id": 0,
  "jsonrpc": "2.0",
  "result": {
    "amount": 1000000000000,
    "fee": 13564070000,
    "multisig_txset": "",
    "unsigned_txset": "",
    "tx_blob": "",
    "tx_hash": "bc8bb62afca7bd35e8df7a9b8da71b33164a123d8b81b97413ea835e65908a3f",
    "tx_key": "8a607569d6d69e5888ba43bbb2020dd6fa5ba323393aba9eabff852ec45aea0b",
    "tx_metadata": "011673657269616c697a6174696f6e3a3a617263686976650000000103000001020000000101000000010300000..."
  }
}
0

If you are using the relay_tx method, you're supposed to pass the tx_metadata to it.

See the method here.

I can confirm it works fine.

  • So it appears that the transaction explorers are broken as they cannot relay transactions but the method you described works. – C Flip Sep 29 '18 at 18:41
  • It is not a transaction explorers job to relay transactions. Relaying is performed by the daemons. – jtgrassie Sep 29 '18 at 20:26
  • They have a feature that doesn't work. I can relay from my own daemon and not theirs. – C Flip Oct 22 '18 at 3:57
0

As per the docs, tx_blob is only returned if you relayed the tx from transfer.

If you wish to relay later, you use relay_tx passing in your returned tx_metadata from transfer.

https://getmonero.org/resources/developer-guides/wallet-rpc.html#relay_tx

0

The reason why you're not getting tx_blob back is that it is only returned if you set get_tx_hex to true. You did not, you set "get_tx_hex " with a space to true.

  • Whilst the json posted has an extraneous space, the docs are clear that you only get a blob after sending. "get_tx_hex - boolean; Return the transaction as hex string after sending (Defaults to false)" – jtgrassie Sep 29 '18 at 20:23
  • Send a patch for the docs then. I tried it, and it does what I said. I used transfer_split btw, transfer is obsolete. – user36303 Sep 29 '18 at 21:28
  • How did you broadcast tx_blob? relay_tx docs are specifying tx_metadata as input parameter, not tx_blob. OP is asking how to create tx and send later. – jtgrassie Sep 29 '18 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.