Skip to main content

Data Point

What is a Data Point?

Data Point is a uniquely identifiable unit that serves as the essential reference for asset-related information. It acts as the fundamental identifier for storage and is managed by components like the Data Object and Data Manager. The Data Point is primarily generated through the Data Point Registry, which handles its creation, ownership, transfer, and access control.

When a Data Point is created (allocated), it is assigned to an owner who can grant or revoke administrative permissions to other accounts. This administrative control allows the owner or designated administrators to define who can interact with the Data Point, ensuring secure and flexible data management. The Data Point functions as a "pointer" linking to the data stored within the Data Object.

Data Points act as unique references to asset data, facilitating interactions between Data Managers and Data Objects. They do not store data themselves but serve as pointers to the data within Data Objects. Data Managers use Data Points to execute asset operations, while the Data Point Registry handles their creation, ownership control, and ensures compatibility. The Data Index enforces access control by validating permissions for operations involving Data Points.

Data Point

Fig 1. Suggested internal structure for a Data Point.

In order to create a DataPoint, it must be called the allocate() method.

Although for the user is something transparent and will never use this low-level storage, inside dataPointRegistry exists a relation between the DataPoint and it's creator. In order for any action be able to modify storage, DataPoint admin should first initialize the Data Manager with the DataPoint.

Encoding and decoding a DataPoint can be very useful to understand information like: DataPoint version, a local identifier, the source chain and the registry where it has been generated. This is just a recomendation and could change depending on technical requirements.

// Example of a generation of a DataPoint
function allocate(address owner) external payable returns (DataPoint){
// ...
DataPoint dp = DataPoints.encode(address(this), uint32(local_identifier));
DPAccessData storage dpd = _dataPointData[dp];
dpd.owner = owner;
dpd.isAdmin[owner] = true;
emit DataPointAllocated(dp, owner);
return dp;
}
note

For more on Data Point structure and usage, refer to the Data Point Smart Contract Section).