GET Documentation — Exploring an event wiring

KasperK
Open Ticketing Ecosystem
4 min readFeb 27, 2020

Wirings are instructions that describe how ticket executions can move around for a particular event. The tools and knowledge needed to understand and unpack wirings are explained in this blog. By blockchain developer Kasper Keunen.

Unfortunately, we are currently still waiting on the publication of improved tooling on how wirings work from the Statebox. Therefor, this blog will only cover how already wired contracts could be explored and verified.

Warning! Statebox is still full in development. While their core properties and features work in a robust fashion. Using the tooling can still be considered a rough experience(as it was for me).

Py-stbx-packetcodec

The Statebox module (in pyhton) that is able to wire nets and create firing executions.

Statebox cli-tool

A command-line tool that is able to encode and decode state changes and wirings.

Check the details of a certain statehash

Link to an example lookup of a random statehash.

https://testapi.statebox.io/tx/zFsGM27dEN5g3pWipCMe47qyqQtPNXEnSpX6BhkTL9bwd/or generalized:https://testapi.statebox.io/tx/[statehash]

Check the status of a specific execution

Link to an example lookup of a random execution.

https://testapi.statebox.io/tx/exec/zFsGM27dEN5g3pWipCMe47qyqQtPNXEnSpX6BhkTL9bwd

https://testapi.statebox.io/tx/exec/zFsGM27dEN5g3pWipCMe47qyqQtPNXEnSpX6BhkTL9bwdor generalized:https://testapi.statebox.io/tx/exec/[execution_id]

Lookup of an entire history of an execution

Statebox provides a ‘built in’ execution explorer.

https://stbx-browse-history.netlify.com/#!/tx/zFsGM27o59f9Lu8bWjNHBG7Wbq5iftQA6uDt14zRdjCrHor generalized:https://stbx-browse-history.netlify.com/#!/tx/[execution_id or statehash]
Image of Statebox native execution explorer.

Lookup of the intstruction of a specific wiring

Statebox provides a ‘built-in’ wiring viewer explorer.

https://stbx-tx-explorer.netlify.com/#!/tx/zFsGM27o59f9Lu8bWjNHBG7Wbq5iftQA6uDt14zRdjCrHor generalized:https://stbx-tx-explorer.netlify.com/#!/tx/[wiringhash]

For example:

https://stbx-tx-explorer.netlify.com/#!/tx/zFsGM27o59f9Lu8bWjNHBG7Wbq5iftQA6uDt14zRdjCrH

Deep-dive: Event wirings with Statebox Cloud

The Statebox studio is a web tool that allows those that are want to explore the wiring of certain contracts a visual way to do so.

In the box to enter the contractHash of the event wiring you want to explore. If you have no contractHash by hand, I suggest you use the following resource: Statebox Cloud.

Step 1. Enter the wiring address you want to explore

Go to https://browse.statebox.cloud/. Paste the wiring hash of an event configuration you would like to explore.

Example wiring to enter into the transaction hash box: zFsGM28HZcicx8uHpBseng9SFbM4YmYTGBEoNoUPQGp9Z

After entering the wiring you want to explore, click on the chain icon that appears on the left side of the page after plugging the wiring hash.

Step 2. Create executions and move them around

Fire the create_init firing by doubling clicking the green enabled firing

By clicking on the green highlighted boxes (firings) one executes a certain state stange. This will show up in the dynamic wiring as a black dot(that are located in a certain place). These dots are called executions (or tokens).

The black dots in the wiring represent executions (of a ticket in this case). Anything could be tracked with the execution of course. Including, spots in the waiting line for ticket sale, drink tokens or any other asset that would benefit from registration.

Step 3. Play around

In order to get a feel of how a wiring works go wild! In particular, note the one-way nature of firings and how some firings are immutable (meaning that there is no route back to its previous state).

Wiring bug (23/1/2020)

Over the course of 5 months we have discovered that in some cases, the Lambda instance has been repeating the storage of certain wiring firings to IPFS. Causing some wiring receipts to be stored several times in IPFS batches (same hashes).

The counter on the website is unaffected by this issue as it feeds of a different data feed. No ticket execution data has been corrupted as data isn’t deformed or lost. Merely stored several times to much. The bug will be fixed in the next deployment of Stoolbox.

More about the GET Protocol

Any questions or want to know more about what we do? Join our active Telegram community for any questions you might have, read our whitepaper, visit the website, join the discussion on the GET Protocol Reddit. Or get yourself a smart event ticket in our sandbox environment. Download the GUTS Tickets app on iOS or Android.

--

--