1

Reading the following question/answers:

Both say that after the 04 extra type byte is a varint of the count of extra public keys.

But looking at this transaction, the extra field is:

014ead13075e025b64ae67567b4f23e5814ba75997ab84623003cb131a8120ab8b044ead13075e025b64ae67567b4f23e5814ba75997ab84623003cb131a8120ab8b

My attempt at parsing it:

01 4ead13075e025b64ae67567b4f23e5814ba75997ab84623003cb131a8120ab8b
04 4ead13075e025b64ae67567b4f23e5814ba75997ab84623003cb131a8120ab8b

I see the TX_EXTRA_TAG_ADDITIONAL_PUBKEYS byte but there's no count varint.

What am I doing wrong / misunderstanding?

jtgrassie
  • 19,601
  • 4
  • 17
  • 54
wad
  • 21
  • 1

1 Answers1

2

Quite why you can have a TX_EXTRA_TAG_ADDITIONAL_PUBKEYS without a count I'm not clear on (it surely wasn't created by an official Monero wallet). But if you read the byte and it's less than 64, you can assume it's the count.

It's worth noting, the format used for the extra field is not enforced by the network, hence a wallet not conforming to the format as used by the official wallet, can put whatever data in whatever format they like into the field. Of course in doing so, they risk the transaction not being parsable by an official wallet.

jtgrassie
  • 19,601
  • 4
  • 17
  • 54