Between the 6th and 12th of June, the Blockfest was held at Ecole 42 in Paris.
We were there to welcome new members to the contributors team and work on a very first prototype: how to make 3 independent RaspPi Ethereum blockchain nodes to communicate with each other and make transaction.
You'll find the detailed documentation following THIS LINK. More specific documentation can be find HERE about how to deploy a local ethereum blockchain on one or more RaspPi. More specific documentation about the SmartContract is HERE. Last of all, our presentation about our production can be found HERE.
Who were the contributors ?
- Core Team (on site)
- Samira (full dev)
- Louis (hardware)
- Aude (TheDAO)
- Xavier (Ethereum)
- Nicolas (facilitator)
- Clément (curiosity)
- Core Team (remotely)
- Paul (Energy Monitor / CitizenWatt)
- Isabelle (design)
- Timothée (design)
- Alizée (design)
- Contributors (sprint)
- Sprinters Code
- Catherine : student at 42 / dev
- Yannick : IT Engineer.
- Petar : PhD in Physics and IT dev / SmartContract
- Sentia : PhD in Climate and Ice study / Engineer in environment / Dev PYTHON and atmosphere simulation/modelisation
- Olivia : PhD in ARtificial Intelligence / Digital Innvoation at TOTAL SA
- Sprinters Energy
- Laurence : digital usage professor. Co-founder CitoyensCapteur
- Antoine : Renault Co. IT engineer / Innovative project officer (Tweezee, 1L) / Electronic
- Mentors
- Jean-Henry : Professor at Geneva University (blockchain oriented IT)
- Jörn : PhD thesis in IT applied to law.
- Serge : note taking / Education / Badges for trust creation
- Observers
- Jean-Christophe : Renault Co. / Finance at Renault Nissan / Blockchain applied to banking and insurance.
- 1st iteration : fonctional description of a smart contract (SC)
- Assumption: each user pushes electric production and consumption data all together in real-time.
- For each user, the SC assesses which one is sur-producing and which one is over-consuming.
- The SC then calculate if electricity is available and/or needed depending on the information on the blockchain.
- If a user does not own enough electricity :
- If electricity is available on the blockchain, he buys some.
- If not enough electricity on the blockchain he buys at the main producers.
- If a user is sur-producing, then it put it on the blockchain ans making it available.
- If there is a need of electricity on the blockchain, he sells it.
- If there is no need, he sells at the main producers.
- 2nd iteration : Design of the SC transaction
- Tokken
- Exchange
- Ethereum
- Energy IoT Monitor
- if Positive Differencial > The Information fuel the IOT with electricity.
- UX with wbe platform either based on the IoT or using IPFS .
- Do we directly sell energy or difered in time ?
- Can the consumer directly buy to a specific producer ?
- Priority for direct exchange
- Stockage enables delays in time
- If no one on the grid need electricity then you store
- Electricity production for the producer
- Get back the production data from the IoT
- Store the data on the IoT (or use IFPS)
- Producer has a an "Wallet Ethereum" with coin on his/her IoT
- Get back the consumption data from the IoT
- Store the data on the IoT (or use IFPS)
- Producer has a an "Wallet Ethereum" with coin on his/her IoT
- Executing the SmartContract with buying rules
- The cosumer's account buying electricty
- Transaction is made towards the producer
- The producer's account is credited with the right amount of money (less the potential fee for running the grid
- from address to address
- towards a specific 0 address on the blockchain pointing towards the SC
- one for the currency transaction
- one for the energy transaction
Smart contract
Mentors reviewing smart-contract. Photo RIeul (CC-BY-NC-SA)
Exchange with Pierre-Alexis Ciavaldini (co-organiser of the BlockFest, student at 42).
Triptique :
Principle :
To be defined :
Paradigm :
How would it work between a producer and a consumer ?
Transactions :
2 timing :
- Equipment
- 3 Raspberry Pi with ethereum client installed (each rasp is a node of a local ethereum blockchain)
- 3 SD cards
- 2 computers
- Other Solution
- Using wiolink to simulate energy production and consumption.
- Get the energy balance data on the blockchain from the past hour
- Call the SC with input and show the effective SC transaction
- Ethereum Transaction
- Following steps to be followed here : https://github.com/EthEmbedded/Raspi-Eth-Install
- install Raspbian Jessie Lite on the SD card for each Raps https://www.raspberrypi.org/downloads/raspbian/
- Turn on the raspberry and SSH connect : ssh <user>@<ip_adress>
- Install Go Ethereum on the raspberry
- tar -xvzf v0.3.3.tar.gz
- cd Raspi-Eth-Install-0.3.3/
- ./geth-installer.sh
- Add "geth" in the PATH
- export PATH=$PATH:$HOME/go-ethereum/build/bin
- Get and copy the folder "data4" from Xavier containing a local blockchain (few nodes/blocks)
- Modification of the key in nodekey in order to make each node unique
- vi /home/pi/data4/nodekey
- Launch the node on the Raspberry
- geth --rpc --rpcaddr <ip_adress> --rpccorsdomain="*" --networkid <network_id> --identity <node_name> --datadir <data_dir> --verbosity N --maxpeers M --ipcpath <ipc_path>
- <ip_adress> : ip of the raspberry
- <network_id> : common id for all the raspberry
- <node_name> : name of the node of a raspberry which will be different for each raspberry
- <data_dir> : folder
- N : log level
- M : max number of nodes
- <ipc_path> : path to geth.ipc
- Connect to node
- geth attach <ipc_path>
- <ipc_path> : path to geth.ipc
- Add the other Rasp
Ethereum / IoT
An Ethereum node running on a Raspberry Pi. Photo RIeul (CC-BY-NC-SA)
For each 3 Pi, here are the steps for setting up a local blockchain:
- PI Information
- b8:27:eb:20:64:45 / bf7-1 / ssh pi@10.19.244.249
- b8:27:eb:7c:65:bc / bf7-2 / ssh pi@10.19.244.247
- b8:27:eb:e4:ae:c6 / bf7-3 / ssh pi@10.19.244.240
- To launch the Geth console :
- geth attach ipc:/home/pi/data4/geth.ipc
- Users
- Sur bf7-1,
- Account #0: {60d6f22d9b5684160065542a9a1c76f6139019a4} /home/pi/.ethereum/keystore/UTC--2016-06-12T05-11-22.486302973Z--60d6f22d9b5684160065542a9a1c76f6139019a4
- Passphrase = bf71
- Sur bf7-2,
- Account #0: {088a02f7ab6ea9f007ce4cd4b0aa2710a2e99725} /home/pi/.ethereum/keystore/UTC--2016-06-12T05-11-50.666476289Z--088a02f7ab6ea9f007ce4cd4b0aa2710a2e99725
- Passphrase = bf72
- Sur bf7-3,
- Account #0: {655eb76642212093c8d2a5f59ae671c9601607fc} /home/pi/.ethereum/keystore/UTC--2016-06-12T05-12-03.156618517Z--655eb76642212093c8d2a5f59ae671c9601607fc
- Passphrase = bf73
- Adding nodes in static-nodes.json for automatically adding nodes
- Before making 2 rasp commnicate on a same blockchain it is necessary to mine a first block manually to get a common base (same root)
- In the specific case of the Blockfest, the fist blocks have been given to us by the mentors.
Note: If the Geth command does not work > export PATH=$PATH:$HOME/go-ethereum/build/bin
RaspEth communication
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.