Extending this question I am interested in parsing the TX_EXTRA_TAG_ADDITIONAL_PUBKEYS
.
Here is how the extra
looks like:
ix value byte
0 1 01
1 73 49
...
32 230 e6
33 4 04
34 4 04
35 35 23
36 167 a7
...
161 86 56
162 148 94
where ix
is the 0-based index of the particular byte/value in the extra
part. In total there are 163 bytes.
First byte (index 0) means next 32 bytes will be the transaction public key (R
in the cryptonote paper). This moves us onto position 33
which is where the TX_EXTRA_TAG_ADDITIONAL_PUBKEYS
starts.
Next byte is \x04
which,I assume, is as a varint telling us that there are 4 extra pubkeys (we know each is 32B). This means we stop parsing at position 162 (the last byte of the extra field).
This seems to make sense, but I'd like to double check that it's the correct way to parse it.
For the sake of completeness here is the whole hexlified extra field (block 282032, transaction 1 on current stagenet)
0149fa9fbadf1c1a4d054c6cbf918778f869ad02103501d8da7eec8762eb2202e6040423a7b09c4078f5c9ea571e3db6e5406de7c27f5e9ec27c84575ce7ad247baf03c9b9152925ec1a3cb3afde3ba43d42581f032bfd39badb178058f654c74b860df4f3a6d5c3bd7abf9b4c183c5db3d4ae34cd2ebfe77be112ff28f869dc2e560035136f206595a6777ba3be8eda6baf036d425fffe0b8678c4ca5cc853f705694