Skip to main content

2. Explore, purchase and consume assets

Necessary steps to explore, purchase, and consume assets in the AgrospAI data space.

Exploring the data space marketplace

The simplest way to discover the services published in the data space is through the main portal: portal.agrospai.udl.cat.

The portal landing pages offer an overview of selected data and service offerings through a catalog that also allows filtering them, 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 they are registered. Additionally, each asset is tagged 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. Furthermore, assets can be a data asset marked as "DATASET" or a data processing service marked as "ALGORITHM".

Datasets and algorithms can be consumed by downloading the contained data or code, respectively, when they are tagged as "DOWNLOAD". On the other hand, if a dataset is tagged 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 computing environment along with the chosen algorithm to process it, among those previously consented to by the owner. The consumer only has access to the calculation result, not the raw data, which remains under the owner's control.

When a particular asset is clicked, it is possible to inspect it in detail, and more information becomes available. All assets are identified by a unique identifier, the DID. Additional information, as shown in Fig. 3, includes the asset owner, identified by the public address corresponding to the private one associated with the relevant participant, as previously detailed for the onboarding procedure in section 2. The registered participant's name is displayed instead of their public address to improve marketplace usability. Below the owner's information, the token governing access to the asset is displayed.

Furthermore, if a Gaia-X compliant 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 for this asset, denominated in a currency specified by the service provider, i.e., in euros. This currency will be used for prepaid settlement of a subscription, and settlement must be completed before the asset can be accessed during the subscription period.

Fig. 3. Details about an asset in the marketplace (source: https://portal.agrospai.udl.cat)

🎥 If you prefer, you can follow this step-by-step video guide.

Acquiring an asset

To consume a selected dataset, the consumer must first meet the following conditions:

  • Must be eligible to consume the asset or combination of assets (e.g., a dataset and the algorithm to be processed if consumption is limited to compute). By default, services can be consumed by any participant unless the owner restricts access to certain potential consumers or purposes.

  • The consumer must have a sufficient balance associated with their public address, enough to cover network fees and the costs of all involved assets, plus computing resources to execute the algorithm on the dataset if consumption is restricted to the compute-to-data approach.

  • The consumer must be connected via the portal to the network where the asset is registered and do so using their public address.

If all conditions are met, the purchase button will indicate this by being available and not grayed out. Otherwise, the user receives an indication on the frontend with a message describing the issue and information on how to resolve it.

If consumption is triggered, the user will be prompted to sign several transactions. If the asset consumption type is by download, the procedure is as follows:

  • Register consent with the asset's Terms and Conditions.

  • Make the required balance available for the transaction.

  • Pay for the asset to acquire the token that grants access to it.

  • Finally, exchange the acquired access token to consume the asset, in this case by downloading.

The first transaction will establish and approve a maximum spending limit for the subsequent 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 required access token for the asset. This transaction will include network fees to cover the cost of federation services and infrastructure provided by the federators (network validators). When 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 trail entry and marks the beginning of the service subscription, which is documented in the federated ledger service.

The access controller used by the service provider will use this audit trail event and transaction proof to determine if a user has the right to access the service and to verify a user's identity. All participants will be able to assess the transaction status through the ledger service, as detailed in point 3.9.

The service can now be downloaded as detailed in the next subsection. Note that, in the case of an asset restricted to compute consumption, there will be a second service offering and contracting process 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 next subsection.

Consuming an acquired asset

Now that the asset has been acquired, it can be consumed. If the consumption type is "download", this will be indicated by the availability of an activated "Download" button. When consumption is requested, the data space access controller designated by the asset provider will verify that the consumer's identity matches the identity of the party who 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 compute-to-data, the calculation results can be downloaded after verifying the consumer's identity.

It is also possible to access your consumption history through the data space marketplace, by going through the "View profile" option associated with the current user, as shown in Fig. 4. Once the identifier has been connected via the MetaMask extension, or a similar one that allows managing the associated private key. In the "Downloads" section, 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 "compute" processes activated by the user, the respective audit trails, and options to access the results of previous calculations.

Fig. 4. User profile with history of assets acquired for download and compute-to-data (source: https://portal.agrospai.udl.cat)

🎥 If you prefer, you can follow this step-by-step video guide.