Skip to content

link contract shift

Markus Sabadello edited this page Apr 24, 2015 · 10 revisions

Introduction

This branch implements the "Link Contract Shift".

This refers to a change to the XDI graph model in which the structure of link contract addresses has changed.

  • Before the Link Contract Shift, link contracts used $to and $from words.
  • After the Link Contract Shift, link contracts use inner roots.

Examples

Before the Link Contract Shift:

[=]!:uuid:1111$to[=]!:uuid:1111$from$do$if$and/$true/({$from}/$is/[=]!:uuid:1111)
[=]!:uuid:1111$to[=]!:uuid:1111$from$do$if$and$or/$true/({$msg}<$secret><$token><$valid>&/&/true)
[=]!:uuid:1111$to[=]!:uuid:1111$from$do$if$and$or/$true/({$msg}<$sig><$valid>&/&/true)
[=]!:uuid:1111$to[=]!:uuid:1111$from$do/$all/

After the Link Contract Shift:

[=]!:uuid:1111/[=]!:uuid:1111/($do$if$and$or/$true/({$msg}<$secret><$token><$valid>&/&/true))
[=]!:uuid:1111/[=]!:uuid:1111/($do$if$and$or/$true/({$msg}<$sig><$valid>&/&/true))
[=]!:uuid:1111/[=]!:uuid:1111/($do/$all/)
[=]!:uuid:1111/[=]!:uuid:1111/($do$if$and/$true/({$from}/$is/[=]!:uuid:1111))

Status

Merged per 1c1ae72 on 30th May 2014 after snapshot-0.4-pre-link-contract-shift.

Sample deployment before merge: https://server.xdi2.org/pre-link-contract-shift

Code Migration

The xdi2.core.features.linkcontracts package encapsulates most of the functionality affected by the Link Contract Shift.

Graph Migration

Graphs can be migrated using the xdi2-tools.

Clone this wiki locally