Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Corda, what data is sent to a non-validating notary service?

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?

like image 489
Antony Avatar asked Nov 20 '17 08:11

Antony


People also ask

What is a Corda notary?

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.

Which of the following types of verification must go in the flow?

5) Which of the following types of verification must go in the flow? Answer : Checking that the signatures on the Transaction are valid.

How does the notary ensure that each output state is only consumed once?

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.

What does a transaction in Corda represent?

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).


1 Answers

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:

  • Any inputs, in the form of StateRefs
  • The time-window, if it exists (since the notary is also the timestamping authority)
  • The identity of the transaction's notary

Because 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.

like image 113
Joel Avatar answered Oct 20 '22 09:10

Joel