2. Exploring, buying and consuming assets in AgrospAI
Necessary steps to explore, buy and consume assets in the AgrospAI data space.
Exploring the data space marketplace
The easiest way to discover the services published in the data space is through the main portal: portal.agrospai.udl.cat.
The landing pages of the portals offer an overview of selected data and service offerings through a catalog that also allows filtering, as shown in Fig. 2.
Fig. 2. AgrospAI marketplace portal (source: https://marketplace.portal.agrospai.udl.cat)
The metadata summary of all listed assets provides information about their name, title, brief description, price, number of consumptions/sales and the network where it is registered. In addition, each asset is labeled as "DOWNLOAD" if it can be downloaded or "COMPUTE" if it cannot and can only be consumed in a compute-to-data environment, which guarantees sovereignty over its content by the asset owner. In addition, assets can be a data asset marked as "DATASET" or a data processing service marked as "ALGORITHM".
There are datasets and algorithms that can be consumed by downloading the data or the code contained, respectively, when they are labeled as "DOWNLOAD". On the other hand, if a dataset is labeled as "COMPUTE", the data cannot be downloaded and can only be consumed using the compute-to-data approach. In this case, the consumer does not have access to the data, it is loaded into the environment of computation along with the chosen algorithm to process them, among those previously consented by the owner. The consumer only has access to the result of the calculation, not the raw data that remains under the control of its owner.
When an asset is clicked on, it is possible to inspect it in detail and more information is available. All assets are identified by a unique identifier, the DID. Additional information, as shown in Fig. 3, will include the owner of the asset, identified by the public address corresponding to the private associated with the corresponding participant, as detailed above for the onboarding procedure in section 2. The name of the registered participant is displayed instead of their public address to improve the usability of the market. Below the owner information, the token governing access to the asset.
In addition, if a Gaia-X compatible service credential has been added to the service and if it matches this asset DID, a badge is displayed after validating it with a Gaia-X Digital Clearing House (GXDCH).
On the right side, there is a summary of the consumption costs of this asset, denominated in a currency specified by the service provider, i.e. in euros. This currency will be used for the prepaid settlement of a subscription and the settlement must be completed before the asset can be accessed during the subscription period.
Fig. 3. Details about an asset in the market (source: https://portal.agrospai.udl.cat)
Acquiring an asset
To consume a selected dataset, the consumer must first meet the following conditions:
-
Must be eligible to consume the asset or the combination of assets (for example, a dataset and the algorithm to be processed if consumption is limited to computation). By default, services can be consumed by any participant unless the owner restricts access to certain consumers or potential purposes.
-
The consumer must have a sufficient balance associated with their megaphone, sufficient to cover network fees and cover the costs of all assets involved, in addition to the compute resources to run the algorithm on the dataset if the consumption is restricted to the compute-to-data approach.
-
The consumer must be connected through the portal to the network where the asset is registered and do so using their address public.
If all conditions are met, the buy button will indicate being available and not grayed out. Otherwise, the user receives an indication on the frontend with a message describing the problem and information on how to solve it.
If consumption is triggered, the user will be asked to sign several transactions. If the asset consumption type is by download, the procedure is as follows:
-
Register consent with the Terms and Conditions of the asset.
-
Make the required balance available for the transaction.
-
Pay for the asset to acquire the token that grants access to it.
-
Finally, exchange the access token acquired to consume the asset, in this case by downloading.
The first transaction will establish and approve a maximum spending limit for the next transaction that determines how much can be paid for the service. In the next step, the consumer approves a second transaction to exchange currency for the access token required for the asset. This transaction will include network fees to cover the cost of federation services and infrastructure provided by federators (network validators). When it is approved, the transaction will be sent to the network, the exchange will be facilitated and the acquired access token will be exchanged to execute the right to use the service. This creates an audit tracking entry and marks the beginning of the service subscription, which is documented in the federated registry service.
The access controller used by the service provider will use this audit trail event and transaction proof to determine if a user is entitled to access the service and to verify a user's identity. All participants will be able to evaluate the status of the transaction through the registry service, as detailed in point 3.9.
The service can now be downloaded as detailed in the following subsection. Note that, in the case of an asset restricted to compute consumption, there will be a second offer and contracting process services involved and at least 5 transactions are required, as two contracts will be stipulated with up to three parties (the data owner, the algorithm provider, and the party providing the compute-to-data resources). After registering these transactions, and once the compute-to-data process has completed the execution of the algorithm on the dataset, the calculation results will be available for consumption as detailed in the following subsection.
Consumption of an acquired asset
Now that the asset has been acquired, it can be consumed. If the type of consumption is "download", it will be indicated by the availability of a activated "Download" button. When consumption is requested, the access controller to the data space designated by the provider of the asset will verify that the consumer's identity matches the identity of the party that acquired the asset. For this reason, a signature request is made to prove that the consumer has control of the private key associated with the consumer's public address. If the signature has been successfully verified by the access controller, the file can be downloaded. Similarly, if consumption is based on the compute-to-data process, the results of the calculation can be downloaded after verifying the consumer's identity.
It is also possible to access your consumption history through the data space market, going through the "View profile" option associated with the current user, as shown in Fig. 4. Once the identifier has been connected through the MetaMask extension, or a similar one that allows managing the associated private key. In the section "Downloads", the current user will find a complete description of all services that have been acquired for download. And in the "Compute jobs" section, there is a summary of all the processes of "compute" activated by the user, the respective audit trails and options to access the results of previous calculations.
Fig. 4. User profile with history of acquired assets to download and calculate to data
(source: https://portal.agrospai.udl.cat)