Corda中非验证公证人如何确认发起方有权消耗指定输入状态?
Great question—let’s unpack this using your cash transfer example to make it concrete. First, let’s clarify what a non-validating notary doesn’t do vs. what it does do:
What a Non-Validating Notary Skips
It doesn’t run the smart contract’s verify() function—so it never checks if your transfer transaction complies with rules like "only the input state’s owner can spend it." That’s the job of the transaction’s participants, not the notary.
What a Non-Validating Notary Does Check (And This Is Key)
Even without validating contract rules, the notary has two critical jobs that ensure the transaction is legitimate:
Signature Validation for Input States
Every input state in a transaction (like State1 in your example, owned by the issuer) requires a signature from its current owner (or any party the contract deems authorized to spend it). The notary verifies that:- The signatures attached to the transaction match the public keys associated with the input states’ owners.
- All required signers (in this case, the issuer) have actually signed off on consuming the state.
In your transferTX, the notary will confirm that the issuer’s signature is present and valid, proving they consent to splitting State1 into State2 and State3.
Double-Spend Prevention
The notary maintains a canonical record of all states that have already been consumed (via previously notarized transactions). It checks every input state in the submitted transaction to ensure none of them have been marked as consumed before.For your example, the notary will look up State1’s unique identifier and confirm it hasn’t been used in any prior notarized transaction—so the issuer isn’t trying to spend the same 1000 units twice.
Why This Works (And Where Contract Rules Come In)
Contract rules like "only the owner can spend the state" are enforced before the transaction ever reaches the notary. Here’s the flow:
- The transaction initiator (say, the issuer) builds the transferTX.
- Every participant in the transaction (the issuer and CompanyA, in this case) runs the cash contract’s
verify()function locally to ensure the transaction follows all rules. - Only once all participants have verified the contract rules and signed the transaction is it sent to the notary.
So the notary doesn’t need to understand the contract’s business logic—it just needs to confirm that the people who should be approving the spend have done so, and that the states aren’t being double-spent. That’s enough to guarantee the transaction is legitimate in the context of the Corda network.
内容的提问来源于stack exchange,提问作者ivicaa

