Jk_
Jk_

Reputation: 105

Consensus algorithm in Corda

Normaly the nottary node is defined like as shown below in build.gradle file enter image description here

From above image how do we understand the consensus algorithm of this particular notary? or from where(which file) we can get information regarding the consensus algorithm of Notary Used?

Upvotes: 0

Views: 581

Answers (2)

Arun Salaria
Arun Salaria

Reputation: 984

Consensus algorithms generally works with cluster you need to have multiple notary nodes in order to achieve it. Below is the sample notary config file

devMode=true

dataSourceProperties {
    dataSource.password : "test"
}
myLegalName="O=Notary2,L=Zurich,C=CH"
notary {

    raft {

        clusterAddresses=[
            "localhost:10012",
            "localhost:10015",
            "localhost:10019",
            "localhost:10022"
        ]

        nodeAddress="localhost:10016"
    }

    serviceLegalName="O=Raft,L=Zurich,C=CH"

    validating=false

}

p2pAddress="localhost:10017"

rpcSettings {

    address="localhost:10018"

    adminAddress="localhost:10118"

}

More info can be found here Corda notary cluster demo

Upvotes: 3

Dan Newton
Dan Newton

Reputation: 920

All that notary does is check that no states have been spent already when a transaction is sent to it. It does so by storing hashes of spent states and checks that the states in the transaction are not stored in the notary.

It is not using a consensus algorithm.

The validating=true is saying that it will execute the contract validation as part of checking the transaction. If that was set to false, it would only check for double spends.

Upvotes: 0

Related Questions