Consensus Hackathon - Traffic Management Solution
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
.vscode
build/contracts
contracts
css
img
iot
mambo
migrations
.gitignore
ArchitectureDiagram.png
README.md
Virtual_Blackbox_Pitch_Deck_v2.pptx
WebDemoScreenshot.png
app.js
dependencyDiagram.graffle
index.html
package.json
truffle.js
whitepaper.md

README.md

Team Block Box - Consensus 2017 Hackathon

Inspiration

We wanted to create something that would push the limits of blockchain technology. So we came up with a traffic system that would require a high throughput solution with near realtime functionality.

A blockchain-based implementation makes sense for the following reasons:

  • Adversarial peer-to-peer context
  • Localised operation
  • Disintermediated time-stamping of events that would be a useful data source for insurance or crash investigation (blockchains are time-series state transition systems)
  • Traffic management has clear state-machine-like abstraction

What it does

We are using the blockchain to make our roads and skies safer.

Self driving cars and robot drones are coming, and will introduce a systemic risk to safety.

Each Smart Vehicle will track and measure various telemetry data.

These would include:

  • Proximity
  • Speeding
  • Indication
  • RedLight

Each vehicle will record safety events on the blockchain by interacting with a single global smart contract.

These events are sent to the Azure IoT hub, and can be connected to custom event handlers. In our demo we send an contract call that displays the location of the incident which can dispatch emergency services.

Architecture

ArchitectureDiagram

Smart Contract

The smart contracts are under the contracts folder.

testRPC

testRPC can be installed using npm which comes with Node.js

npm install -g ethereumjs-testrpc

To run testRPC simply run testrpc at the command line

Truffle

Truffle can be installed using npm which comes wirth Node.js

npm install -g truffle

Use truffle compile to compile all the contracts in the contracts folder

Use truffle deploy to deploy the compiled contracts. If the contracts are not compiled deploy will compile them for you.

Truffle generates the ABI under build/contracts

Web demo of cars changing lanes

  • index.html html and css
  • app.js JavaScript file that contains the web3 code to connect to Ethereum

Screenshot of web demo

Node.js programs

Links