Please login or register.

simplewallet returns invalid paymentId

I run bitmonerod and simplewallet version 0.9.4 (64-bit linux if it does matter). I have incoming transaction c67bff93bfb1ddad87994b44461be681b4ffb3c9b2c75ef7bffc2c52b880e4a3. Block explorer (minergate) shows that it has payment id: 0000000000000000000000000000000000000000000000000000000000122085. But get_bulk_payments rpc to simplewallet returns this:

[{
    u'payment_id': u'0000000000000000000000000000000000000000000000000000000000000000',
    u'tx_hash': u'c67bff93bfb1ddad87994b44461be681b4ffb3c9b2c75ef7bffc2c52b880e4a3',
    u'amount': 280408275859,
    u'unlock_time': 0,
    u'block_height': 1035449
}]

Any suggestions? What did i do wrong?

Edit: Maybe, it is worth mentioning. Here's a fragment of simplewallet.log:

2016-Apr-28 10:48:06.972304 failed to deserialize extra field. extra = 0107c6d85041f35062785d2297b03dd787c760afe145b04d5c595c2e77078376e6de2042e206e91b754e60889f23ed91020ad1fc03bad3c032edb863dd1f55fd3c300d0221000000000000000000000000000000000000000000000000000000000000122085
2016-Apr-28 10:48:06.972373 Transaction extra has unsupported format: 

Edit2: Indeed: 01 marks public key begin, followed by 32 bytes of public key. The tail contains: 02 (extra nonce tag), 21 (extra nonce length), 00 (payment id), 32 bytes of payment id. But what is it between?

de2042e206e91b754e60889f23ed91020ad1fc03bad3c032edb863dd1f55fd3c300d

Edit3: After all, the questions are:

  1. Why does block explorer ignore middle bytes of extra and successfully extract payment id?
  2. What wallet produced this transaction?
  3. What does these middle bytes mean?
  4. How should I fix the problem?

P.S. Thanks in advance. Sorry for my bad english.

Edit4: I've got an answer to the second question. All problematic transactions were sent from minergate. Did they upgrade something recently?

Replies: 6
blashyrkh posted 7 years ago Weight: 0 | Link [ - ]

Sorry for being silent, I had just forgotten about this forum thread. I hoped to get some approval from minergate, they certainly know about the meaning of that field (which I called just "mysterious"). Thanks for publishing the patch.

blashyrkh posted 8 years ago Weight: 0 | Link [ - ]

Here's my solution:

diff --git a/src/cryptonote_core/tx_extra.h b/src/cryptonote_core/tx_extra.h
index 93d2e21..6f5fbe4 100644
--- a/src/cryptonote_core/tx_extra.h
+++ b/src/cryptonote_core/tx_extra.h
@@ -38,6 +38,7 @@
 #define TX_EXTRA_TAG_PUBKEY                 0x01
 #define TX_EXTRA_NONCE                      0x02
 #define TX_EXTRA_MERGE_MINING_TAG           0x03
+#define TX_EXTRA_MYSTERIOUS_MINERGATE_TAG   0xDE

 #define TX_EXTRA_NONCE_PAYMENT_ID           0x00
 #define TX_EXTRA_NONCE_ENCRYPTED_PAYMENT_ID 0x01
@@ -158,14 +159,24 @@ namespace cryptonote
     }
   };

+  struct tx_extra_mysterious_minergate
+  {
+    std::string data;
+
+    BEGIN_SERIALIZE()
+      FIELD(data)
+    END_SERIALIZE()
+  };
+
   // tx_extra_field format, except tx_extra_padding and tx_extra_pub_key:
   //   varint tag;
   //   varint size;
   //   varint data[];
-  typedef boost::variant<tx_extra_padding, tx_extra_pub_key, tx_extra_nonce, tx_extra_merge_mining_tag> tx_extra_field;
+  typedef boost::variant<tx_extra_padding, tx_extra_pub_key, tx_extra_nonce, tx_extra_merge_mining_tag, tx_extra_mysterious_minergate> tx_extra_field;
 }

 VARIANT_TAG(binary_archive, cryptonote::tx_extra_padding, TX_EXTRA_TAG_PADDING);
 VARIANT_TAG(binary_archive, cryptonote::tx_extra_pub_key, TX_EXTRA_TAG_PUBKEY);
 VARIANT_TAG(binary_archive, cryptonote::tx_extra_nonce, TX_EXTRA_NONCE);
 VARIANT_TAG(binary_archive, cryptonote::tx_extra_merge_mining_tag, TX_EXTRA_MERGE_MINING_TAG);
+VARIANT_TAG(binary_archive, cryptonote::tx_extra_mysterious_minergate, TX_EXTRA_MYSTERIOUS_MINERGATE_TAG);
moneromooo posted 8 years ago Replies: 1 | Weight: 0 | Link [ - ]

If that new tag/field consistently parses all of these txes, then I think it's a good solution. Feel free to put it on github, maybe others will have comments.

Reply to: moneromooo
blashyrkh posted 8 years ago Weight: 0 | Link [ - ]

> If that new tag/field consistently parses all of these txes...

It does

moneromooo posted 8 years ago Replies: 1 | Weight: 0 | Link [ - ]

It'd be nice to get this on github. If you don't want to do it, I can do it. If I do, what author information would you like ? Just blashyrkh ? Another name ? An email address ?

Reply to: moneromooo
moneromooo edited 7 years ago Weight: 0 | Link [ - ]

Well, I have put it on github, attributed to just "blashyrkh". Thanks for the patch. If you want another attribution before this gets merged, let me know and I can change it easily.

https://github.com/monero-project/bitmonero/pull/856