1
votes

In Corda, while every state can have a different notary, all of the states consumed by a particular transaction must be assigned to the same one.

  1. What's the impact of this newly-appointed notary to the original ones in terms of double-spending check? e.g.: cash state is handled by notary A. But due to a DvP transaction involving cash (notary A) and other asset (notary B) in its input states, let's say that we appoint notary B. How can notary B knows which cash states have been consumed, knowing the fact that notary A is the one currently owning the list of consumed cash states?

  2. The same question as 1), but the impact in terms of visibility of tx dependency chain. Following the above example, assuming that both notaries are validating, must notary B request notary A to give him the tx dependency chain of cash states?

Many thanks for clarification.

Best, Afrisal

1

1 Answers

1
votes

1) There will be no double spend, as you mentioned all of the states consumed by a particular transaction must be assigned to the same Notary. So before making any Tx that has different notaries, you'll make sure their notaries are the same. you'll do so by calling NotaryChangeFlow all the information about the consuming states will be transferred to the new notary.

2) you'll simply make a call likesubFlow(NotaryChangeFlow(stateRefOfYourState, newNotary)). This assembles the transaction for notary replacement and sends out change proposals to all participants of that state. If participants agree to the proposed change, they each sign the transaction and the notary gets changed.