This question frequently comes up in conversations: When a Corda transaction is sent to a non-validating notary service for finalisation, what can the notary service see and deduce about the world?
The notary is Corda's uniqueness consensus service. It prevents double-spends by ensuring each transaction contains only unique input states. A notary service is formed by one or more notary workers that together form a notary cluster. The notary's role is to ensure a transaction contains only unique input states.
5) Which of the following types of verification must go in the flow? Answer : Checking that the signatures on the Transaction are valid.
A notary is a trusted party (or parties working together) which guarantees that a particular state is only consumed once. Each state has a specific notary, which must sign any transaction in which that state is consumed. Once a notary has done this, it must not sign another transaction for the same state.
Corda uses a UTXO (unspent transaction output) model where every state on the ledger is immutable. The ledger evolves over time by applying transactions. Transactions update the ledger by marking zero or more existing ledger states as historic (the inputs), and producing zero or more new ledger states (the outputs).
Before sending a transaction to a non-validating notary, it is filtered as follows:
stx.buildFilteredTransaction(Predicate {
it is StateRef || it is TimeWindow || it == notaryParty
})
(see NotaryFlow.kt in the main Corda repo). This means that the non-validating notary will only see:
StateRef
sBecause the transaction is a Merkle tree (see https://docs.corda.net/_images/merkleTree.png), although the remaining components have been removed and can't be seen by the notary, the contents of the transaction can't be changed later once the notary signature has been applied.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With