Skip to content

A Blockchain-based Toll Collection System for Heterogeneous Public Edge Platforms

License

Notifications You must be signed in to change notification settings

HCSLab/EdgeToll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EdgeToll

A Blockchain-based Toll Collection System for Heterogeneous Public Edge Platforms

Click for papers

The file architecture

Inside EdgeToll folder, there are 2 folder:

SmartContract (used smart contract development tool named truffle)

edgeBlockChain (used django for proxy server)

To start

Publishing Contract

if you want to publish the contract in local:

  1. go to SmartContract
  2. Open Ganache client
$ truffle compile
$ truffle migrate --reset

So the address of contract can be found at Ganache, and you can get abi code at builds PC.json

Set Up server

  1. open a terminal and go to edgeblockchain in EdgeToll
  2. runserver
$ python manage.py runserver

API of existing system

All methods should be used as Post Request and listed parameters should be provided as data.

for edge device to register in server, after posting request, the proxy will open a paymentchannel for the provided address parameter:

  • 'address' : the blockchain ethereum address of edge (string in python) return: gas fee of registeration

for user to post cheque to proxy parameter:

  • 'senderAddress' : user address
  • 'recipientAddress' = proxy address
  • 'valueTransferred' = the value of cheque
  • 'v' = the information of signed signature
  • 'r' = the information of signed signature
  • 's' = the information of signed signature
  • 'edgeAddress' = the selected edge address
  • 'withdraw' = whether to withdraw, can only be True or False (bool) return: gas cost of publish trasactions when 'withdraw' = True

for user to select a target edge, parameter:

  • 'edgesWiFi': available edges of user (ssid of WiFi) return: a target edge's ssid for connection

About

A Blockchain-based Toll Collection System for Heterogeneous Public Edge Platforms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published