Skip to content

0.3.1

Latest
Compare
Choose a tag to compare
@cryptobench cryptobench released this 26 Nov 12:54

Release Notes - dapp-runner v0.2.0

New Features

Partner Scheme Support

  • Added support for Partner Scheme when using outbound networking.
  • New manifest_path and node_descriptor_path parameters replace base64-encoded manifest fields. Simply point to the two JSON files and let dapp-runner handle the rest.

Configuration Changes

Simplified Manifest Configuration

The runtime: "vm/manifest" payload type now supports a more user-friendly configuration:

Recommended (New Partner Scheme):

payloads:
  external-api-request:
    runtime: "vm/manifest"
    params:
      manifest_path: "./manifest.json"  # Plain JSON file
      node_descriptor_path: "./node-descriptor.signed.json"  # Signed descriptor file
      capabilities:
        - inet
        - manifest-support

Legacy Method for outbound (Not Recommended):

payloads:
  external-api-request:
    runtime: "vm/manifest"
    params:
      manifest: "<base64-encoded-manifest>"
      manifest_cert: "<base64-encoded-cert>"
      manifest_sig: "<base64-encoded-signature>"
      manifest_sig_algorithm: "sha256"
      capabilities:
        - inet
        - manifest-support

Complete Example

Using the new Partner Scheme (example in dapp-store):

meta:
  name: "External API request [EXPERIMENTAL]"
  description: "Example of a payload allowing external API requests"
  author: "Golem Factory"

payloads:
  external-api-request:
    runtime: "vm/manifest"
    params:
      manifest_path: "./manifest.json"
      node_descriptor_path: "./node-descriptor.signed.json"
      capabilities:
        - inet
        - manifest-support

nodes:
  external-api-request:
    payload: "external-api-request"
    init:
      - ["/bin/sh", "-c", "GOLEM_PRICE=`curl --silent -X 'GET' 
          'https://api.coingecko.com/api/v3/simple/price?ids=golem&vs_currencies=usd' 
          -H 'accept: application/json' | jq .golem.usd`; 
          echo \"Golem price: $GOLEM_PRICE USD\";"]

Benefits of Partner Scheme

  • No need to manually base64 encode files
  • Simpler configuration with direct file paths
  • Improved readability and maintainability
  • Reduced chance of configuration errors

Notes

  • The legacy manifest verification method is still supported but not recommended as it's hard to manage.
  • Partner Scheme is the preferred method for outbound networking.

Breaking Changes

None. All changes are backward compatible.