Side Chain Storage: Architecture Specifications

The physical architecture the Side Chain Storage project needs to be deployed is formed by:

  1. Vinduinos.

  2. Weather station.

  3. Raspberry pi.

  4. Ethereum Node (Echo: 10.112.48.25)

    OpenBravo (Bravo: 10.112.48.25)

  5. Ethereum Main Chain

The communication between this components is defined in the following schema:

Communication interface

Raspberry pi to Sidechain

To allow this communication we are going to use a python3 script that collects vinduino and weather station data, signs it and sends it to the ethereum side chain in echo using the web3 protocol. This script is going to connect to ethereum sidechain using an https connection with the node running on 10.112.48.25 on port 8545. The data structure to be sent by the raspberry willl be:

Vinduino:

  • string timestamp

  • uint16 sensor2

  • uint16 sensor1

  • uint16 sensor05

  • uint16 sensor005

  • uint8 battery

  • uint16 temperature

  • bytes32 hash (signature of the data using the Vinduino private key)

WeatherStation:

  • string timestamp

  • uint16 rain

  • uint16 wind_speed

  • uint16 wind_gust

  • uint16 wind_direction

  • uint16 pressure

  • uint16 temperature

  • uint16 humidity

  • bytes32 hash (signature of the data using the WeatherStation private key)

Sidechain to OpenBravo

As soon as data gets inserted in the blockchain, there will be an active  python3 listener script that will redirect it to openbravo leaving a trace so that, it is possible for any user to check its consistency. Comunication will be established using openbravo API and will carry the following information:

Vinduino:

  • string name

  • string timestamp

  • float sensor2

  • float sensor1

  • float sensor05

  • float sensor005

  • float battery

  • float temperature

  • uint256 reference

WeatherStation:

  • string name

  • string timestamp

  • float rain

  • float wind_speed

  • float wind_gust

  • float wind_direction

  • float pressure

  • float temperature

  • float humidity

  • uint256 reference

Vinduinos

Vinduinos will be used as a datasource for this project. Once getting the code they are running for now, we are going to implement a digital signature for the data. So our prerequisites are:

  • Vinduinos have to be installed in the vineyard.

    Vinduinos have to be able to run the data reading and forwarding script.

    Vinduinos need to have the signal correction implemented.

    Vinduinos have to be working properly and fully installed.

Our objective with the vinduinos is to change the actual code so that it digitally sign the data that is being sent. (Sign <> Encrypt)

Weather Station

Weather stations will work as a datasource for this project. The basic prerequisites for this component to start the project are:

  • The weather station have to be installed and working properly.

    The raspberry pi have to be capable of reading its data with an script.

Our objective with this component is just to read its data and forward it to the side chain with the raspberry pi.

Raspberry pi + Weather Station

The raspberry pi is going to be used as the connection point between the IoT sensors and the blockchain. This raspberry pi must met the following prerequisites:

  • We need to be granted access via ssh to the RPi.

  • Raspberry pi must have python 3 installed.

  • Specifications of the Raspberry pi have to be detailed.

  • The raspberry pi needs to have a weather station information reading script active.

Our objective with the raspberry pi is to refactor the actual code so that, instead of sending data to OpenBravo directly it sends it to the side chain by using its own pair of keys.

Ethereum sidechain

For the ethereum sidechain we need a server node. The selected server node for this is Echo (10.112.48.25)

  • We need to be granted access to the node.

  • The server node must be initialized and fully prepared to hold an ethereum node.

  • Specifications of the server node have to be detailed.

  • Specification modifications must be allowed in order to fit the necessity of the sidechain node.

Our objective with this server node is to use it as our first full ethereum node. This server is going to hold the full blockchain until local nodes are implemented. It will also hold a servicie to interact with bravo (to be discussed). As a summary it will:

  • Hold the ethereum sidechain node.

  • Be the boot-node for other nodes to connect.

  • Run a script to connect sidechain with openbravo.

  • Run a script to connect the sidechain to the mainchain.

Ethereum mainchain

The ethereum mainchain is the public ethereum ledger. We are going to use the existing ledger and the account used for the MTB18 ICO deployment.

  • A pair of private/public keys (account) to pay for the deployment.

    Ether to pay for the sidechain to mainchain hash transaction. (This is going to be a continuous flow of transactions, so ethers will have to be transferred to this account periodically.

OpenBravo

OpenBravo is going to work as a fast database for this project. Once data have been validated in the sidechain, it will be stored in OpenBravo. The requirements to use OpenBravo are:

  • Connection to OpenBravo have to be assured.

  • Specification of OpenBravo have to be detailed.