fanchorRequest procedure

The fanchorRequest procedure reads data in the database, constructs a Merkle tree representing that data, stores the Merkle tree in the provendbrequests table, and anchors the root of the merkle tree to a public blockchain. This allows us to detect any changes to nominated columns and rows in the table and confirm the origin date of the data through blockchain proofs.






varchar, mandatory

The table with is to be anchored


varchar, optional

comma-seperated list of columns to be anchored. If ommitted, all columns will be anchored. Any columns not listed will not be anchored and can be modified without invalidating the proof.


varchar, optional

Whereclause determining the columns to be anchored.


varchar, optional

The column to be used to identify specific rows when identifying which rows might have been modified. Defaults to RID.


In this example, we anchor rows from the CONTRACTSTABLE table, with a CONTRACTID between 0 and 100. Only the columns contractData and metaData are included in the proof. CONTRACTID is used to identify rows:

1> EXEC [dbo].[fanchorrequest] 'provendbdemo.dbo.contractstable' , 'contractData,metaData', 'contractId BETWEEN 0 and 100' , 'CONTRACTID'
2> go

(1 rows affected)

The request returns a RequestId of 4.