1
votes

I would like to implement a four-node notary cluster in Corda that uses the following algorithm:

If at least two of the four notaries agree that the transaction is not a double-spend, the transaction is valid.

How can I implement this custom notary algorithm?

1

1 Answers

2
votes

Within a Corda notary cluster any node can service client requests and depending on the implementation one or more signatures are required to satisfy the notary composite key requirement.

Two consensus implementations are currently shipped with Corda – Raft which requires only one signatory and the BFT SMaRt implementation which requires a majority of signatories to sign i.e. three.

You can find an example that uses both Raft and BFT SMaRt implementations at https://github.com/corda/corda/tree/master/samples/notary-demo

In your case of requiring at least half the notaries agree, it might be worth checking out the BFT SMaRt implementation (https://bft-smart.github.io/library/) and making changes to that to support this requirement.

I'll follow up with an update to this post, providing an example of how a custom notary algorithm can be plugged into Corda.