1

For example, we have RCTTypeNull, RCTTypeSimple and RCTTypeFull.

If I were to make a change that was not backwards compatible to RCTTypeSimple, is this versioned in some way, or is another type of tx created?

I ask if another type of tx is created because we also have RCTTypeBulletproof and RCTTypeBulletproof2.

jtgrassie
  • 19,111
  • 4
  • 14
  • 51
WeCanBeFriends
  • 660
  • 3
  • 7

1 Answers1

2

Transactions have a version field (see here and here, which is currently 2, RingCT). However RingCT signatures also specify a type in rct_signatures.type. RCTTypeSimple etc, are the type of RingCT signature used and are defined here.

Therefore it depends what you intend on changing (transaction / signatures), that would determine which field(s) you should change to ensure backwards compatibility.

If you intend on doing away with RingCT altogether, you would of course change the transaction version field.

If you intend on creating a new type of RingCT signature, you would create a new signature type.

jtgrassie
  • 19,111
  • 4
  • 14
  • 51
  • So there is really only one transaction type? While RCTTypeSimple is not a tx type, but a signature type? – WeCanBeFriends Jun 24 '19 at 22:57
  • I must be wrong as this question/answer seems to imply that RCTTypeSimple is a tx type: https://monero.stackexchange.com/questions/3348/what-are-3-types-of-ring-ct-transactions – WeCanBeFriends Jun 24 '19 at 23:00
  • RCTTypeSimple is a signature type. That question and answer discusses signature types. Transaction version 2 is RingCT and has a number of different RCT signature types. There is no implication in the answer there that "RCTTypeSimple is a tx type". – jtgrassie Jun 24 '19 at 23:11
  • Ohh I got it. If a new signature type was added, then the tx version would not change. However, if a change is made to an existing signature type, then the tx version would be updated? – WeCanBeFriends Jun 24 '19 at 23:38
  • Ohh I got it. If a new signature type was added, then the tx version would not change. However, if a change is made to an existing signature type, then the tx version would be updated? – WeCanBeFriends Jun 24 '19 at 23:39
  • No. RingCT is a tx type (2). It has different signature types (RCTTypeSimple etc). If you added a new RingCT signature type, the tx version doesn't need changing, you just add a new RingCT signature type. However, if you wanted to do-away with RingCT (the tx type), you would change the tx version. If you modify an existing RingCT signature type, you create a new RingCT signature type, tx version stays the same. – jtgrassie Jun 24 '19 at 23:45
  • Oh so we have a coinbase tx (1) and ringct (2). The tx version is only ever changed, if we remove ringct, so any modifications made to ringct will not cause the tx version to change. If I were to add another tx type (3) would we change the tx version? – WeCanBeFriends Jun 24 '19 at 23:50
  • Does this mean that if we make any changes to RCTTypeSimple, then we will need to create a new signature type called RCTTypeSimple2? – WeCanBeFriends Jun 24 '19 at 23:51
  • 1
    "Oh so we have a coinbase tx (1) and ringct (2)" <- No. a coinbase tx is still a RingCT tx (version 2), it's type is RCTTypeNull. – jtgrassie Jun 25 '19 at 02:53
  • 1
    "Does this mean that if we make any changes to RCTTypeSimple, then we will need to create a new signature type called RCTTypeSimple2?" <- Call it whatever you like, but it has to be named differently so as not to break existing RCTTypeSimple txs. – jtgrassie Jun 25 '19 at 02:55
  • Oh, are you saying that that there is only one type of transaction, called a RingCT tx. But we are on version 2 of it? – WeCanBeFriends Jun 25 '19 at 15:33
  • 1
    No. Pre-RingCT (v1) and RingCT (v2) – jtgrassie Jun 25 '19 at 15:40