Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blockchain Engineering - class of 2022 #6741

Closed
synctext opened this issue Jan 23, 2022 · 3 comments
Closed

Blockchain Engineering - class of 2022 #6741

synctext opened this issue Jan 23, 2022 · 3 comments

Comments

@synctext
Copy link
Member

synctext commented Jan 23, 2022

<ongoing editing, will be finalised today>

Official place for "class projects" of the Feb 2022 edition of CS4160 by Delft University of Technology. Prior year examples: 2021 edition, the 2020 edition projects, and 2018 projects.

Abstract: BrainDAO - unification of all human intellect and artificial intelligence.

During this class you will attempt to start building the societal infrastructure for intelligence. Fully blockchain-based using "BrainCoins". We now have isolated infrastructure for facts(Wikipedia), science(ArXiv), money(Bitcoin), code(GitHub), data(Bittorrent), and what the world thinks(Twitter). You will build on decades of work by others: class of 2021 and our first code from April 2005.

Consists of 9 tasks, each task is for a team of 5 students (smaller teams sadly not possible). 45 students working for 10 weeks on BrainDAO. Example tasks (full details below)

  • BrainCoins. fork Bitcoin and create the DAO fabric. Taproot. challenging!
  • Train-AI. train AI with your GPU for eternal glory, BrainCoins or Bitcoin
  • Contribute intelligence. facts, scrape, image annotations, datasets, etc.

The Details: what is a DAO, class schedule, etc.

Online Lecture URL

On campus lectures: first lecture in in EWI, Ampere hall.

on-campus education - class schedule (slides will be updated) :

Week Description
3.1 course outline slides and presentation of available projects and formation of teams (each 4-5 students)
  8:45 - 9:45 : present all available projects
  9:45 - 10:30 : self-organise and form teams of 4-5 students. Professors available for questions
3.2 Introduction to blockchains, Bitcoin, ledger technology, and DAO (slides)
  short 10 minute introduction to Superapp
3.3 Slides for the lecture and Detailed blockchain engineering using: https://github.com/grimadas/BlockchainEngineering
  Distributed systems. Overlays and communication network. Introduction to simulation framework
  Gossip. Convergence of the transactions, information
  Faults in distributed systems: crashes and disruptions
  Malicious nodes, adversary model
  Consensus and agreement despite malicious nodes
3.4 General lessons from 14 years of ledger science experience. Additional detailed reading: IPv8 documentation, the tutorial and Trustchain.
3.5 Authority Financial Markets - Who is in Charge: Centralised and decentralised infrastructures (final class lecture)

Project: BrainDAO (5 teams, maximum 25 students)

Advisor: J.A. Pouwelse, TUDelft blockchain lab founder (weekly meetings on Wednesdays)

Students from Delft have created a blockchain-based infrastructure with AI. This AI is still rudimentary and not yet used for real-world applications.

The five students teams will work together on a cutting-edge scientific problem: how to create a software system which can be expanded in real-time and increasingly become more 'intelligent'. Build upon the open source app by TUDelft on the Android Play store using blockchain technology. See: Github Superapp and play store.

DAO - organisations in software

To make a "self-evolving" app we use the DAO concept. What is a DAO? Within the coming decades the future of jobs, employment and the nature of the firm will change profoundly. Automation, AI, and robots will replace many of today's jobs. A new type of company is a company without any employees, without any machines or physical infrastructure. A Decentralized Autonomous Organizations, DAO, only exists in software. It goes beyond smart contracts, it is a complete company inside software. DAO development is still in the experimental stage. Background reading. Very optimistic view on DAO, official US review of DAO by Securities and Exchange Commission.

Within this master course you can create your very own autonomous organisation, the AI-DAO. Learn to engineer a decentralised autonomous organisation, use the existing tools, and understand the security risks. The aim is to alter the nature of the firm in the Internet age, see the Nobel prize winning theory. Production cost become essentially cost-free. An organisation which exists purely in cyberspace. The AI-DAO is designed to be the first sustainable DAO. How can we empower leaderless organizations? How can it earn money from manipulating bits?

Scientific challenge: Self-evolving

A key step in an autonomous system is that it can evolve independently. This enables growth and evolution independently of any central organisation, sponsoring government, or tribe of volunteers.

You will collectively solve the problem of paying somebody to make new features in open systems which are fully decentralised. This goes further then paying somebody Bitcoins to create a new version. Decentralised technology is very robust to failures, manipulation, faults, and courtcases. For instance, The Internet itself is almost impossible to shutdown so is the "Tor darknet". With other teams you will address a key drawback of decentralised technology: difficult to update, nearly impossible to evolve, and lacks incentives to develop new features.

dApp ecosystem

"Distributed Applications" are a distributed way of running code. You will help develop an ecosystem of "global code". Code is running atop a blockchain and peer-to-peer (P2P) network that acts as a kind of operating system. This provides security, resilience, privacy, and novel features. This is related to smart contracts, but has no slow single virtual machine (all discussed in the online classes material). Background material, read FBASE trustworthy code execution

PNG: difference between cloud and decentralised Apps

Big Tech focused application

The application side of the BrainDAO is very familiar. Its offering an alternative to the services of Big Tech without any cloud, server, or monopoly company. We picked music, as that is easiest. Finding good music is a difficult AI problem. You will help transform essential parts of the music industry and replace them with open source software.

Demo .APK to install for understanding the Superapp quickly (100MB)

Current code:

GIF: Browsing and streaming music with Bittorrent
GIF: Sending money to artists using Bitcoin

Running code of prior years

We have running code! Class of 2021 is adding the following to the Superapp:

Detailed BrainDAO task descriptions

  • Team M1: BrainCoins I. This task creates the essential BrainDAO building block for all others below. You will repair the core flaw of Bitcoin: the lack of scalability. You will create Schnorr Threshold Signatures compatible with the live Bitcoin network and Android. Goal: to unlock the collective ownership of money for groups of millions of people; the core of any DAO. Nobody has ever been able to realise this cryptographic primitive. Nobody. You might be the first to crack it 🥇 (or learn lots of "Blockchain Engineering"). Reading: the FROST algorithm, some details on Taproot upgrade our non-scaling DAO, and partial FROST implementation progress by Delft.challenging!
  • Team M2: BrainCoins II. Two team can select this challenging task. Both teams will openly share their results on Github, can freely collaborate, and share Kotlin source code.
  • Team P1: AI from scratch. Your task is to build a new brain for the BrainDAO. You will learn how to engineer federated machine learning by starting almost from scratch. You can re-use our Internet deployed code from prior classes. Focus on the Matrix Factorization model, ignore the feature-based stuff. Reading: recommended algorithm to focus exclusively on. Part of your task is to evaluate the machine learning performance.
  • Team P2: Contribute Intelligence. Your task is to make the BrainDAO expandable. To make the BrainDAO evolve it is required that everybody can contribute freely, without permission, and without gatekeepers. You enable the system-blocks of BrainDAO for run-time expansion. You will dive deep into the Android run-time system to enable dynamic code loading. build upon the prior work done in prior years. Create a small demo which loads one AI example and can upgrade it at runtime for a smarter AI. This approach should be usable in general for BrainDAO evolution.
  • Team P3: Train AI. Your task is to engineering smartphone GPU training for BrainDAO. On-device machine learning is available in Tensorflow light. Focus on OpenCL-based GPU inference engine. What does this have to do with our "Blockchain Engineering course? Bonus: integrate with M1 or M2, get paid in BrainCoins for training BrainDAO AI; its the application layer. Reading: https://www.tensorflow.org/lite/examples/recommendation/overview
  • Team P4: Import Science. Your task is to gather scientific publications and engineer machine reading of scientific knowledge in BrainDAO. Thousands of scientific articles are available with Creative Commons copyright license in simple .PDF format. Get thousands of such files on each device and start processing. Use a light library for Natural Language Processing. Use the Bittorrent engine inside Superapp for efficient file sharing. Use IPv8 community to gossip new content. What does this have to do with our "Blockchain Engineering course? True, this is adding lots of data and processing on top of our blockchain-based BrainDAO. Reading: https://doi.org/10.3389/frma.2019.00002
  • Team P5: BrainDAO Data Engineering. Your task is to take lots of data, polish it, and integrate this data in BrainDAO. A key dataset to focus on is described here. This will give BrainDAO real music to play, text descriptions to parse, tags for music moods, signal processing input, and the basics to understand human music taste in the future. A hardware budget of 2500 Euro is available to buy Android phones with MicroSD expansions and 1TByte MicroSDs. Caveat: paperwork. Only proper paper receipts will be reimbursed by Delft University.
  • Team P6: Buy an AI bot army. Your task to engineer that BrainDAO can buy servers autonomously. With Bitcoins you can buy servers. Existing cloud services require a credit card, require a human, and can be fragile. You give BrainDAO the money and decision power to buy servers whenever it wants to, no human can stop it or cancel the order. Re-use the ideas and architecture of CloudOMate. You will be refunded for buying SporeStack hardware from an simple Android app.
  • Team p7: Connected Minds. Your task is to engineer collaborative dataset building for BrainDAO training. Everybody needs to able to donate their free time to evolve the BrainDAO. Volunteers can expand the available datasets used to train BrainDAO. Focus on the problem of "Learning-to-Rank" and the somewhat understood problem of music taste and recommendations. Create the ability to create and share music dataset for the listwise approach.
  • Team P13: semi-open project. Your task is to make any improvement to Trustchain, Bitcoin or Ethereum. Exact assignment will be discussed during weekly meetings and frozen in week 3. AI-free task.
  • Team P14: Digital Euro. Your task is to {partly} realise a new blockchain-based digital Euro. Delft university has obtained permission to experiment with real digital Euros and live connection to the IBAN bank account system. You can build on this existing open source code. Reading: European Central Bank report on digital Euro, digital Euro master thesis at Delft, the progress report by China Central Bank who is at least five years ahead of Europe. You are free to set your own target feature to focus on, for instance, high transaction rate, offline support, ease of use, etc.

Deliverables for each team: 1) demo in week 10 for final grading 2) a small readme.md; briefly describing the product, challenges, and design decisions; examples, 3) an open PR to the superapp (73 examples)

@zekierkin
Copy link

Z1: Two-sided blockchain-based platforms for city distribution (Customer: TNO)

The objective is to create a blockchain based infrastructure supporting city distribution, without any intermediate party (a so-called two-sided platforms) roaming payment by consumers and their suppliers in the delivery of goods. These goods can be anything, ranging from eCommerce shipments to meals and groceries.
A blockchain infrastructure should be created to support the following roles:
• Consumers ordering goods
• Suppliers offering and providing these goods
• Service providers offering delivery services
The main issue of such a platform is to create trust:
• A consumer pays the goods to be delivered
• A service provider gets paid for its services
• A supplier is sure that goods are delivered in their proper state (temperature, undamaged, etc.) to the proper consumer that ordered the goods
• A consumer having trust in receiving the goods after payment
Certification mechanisms combined with past behavior can also be mechanisms to implement trust. These and other mechanisms implemented by intermediates (e.g. Deliveroo and Uber(Eats)) currently implement a type of trust. However, these different providers decrease safety in cities: there are just too many not always adhering to traffic rules. Sustainability is also an important aspect that is not always properly implemented by these platforms. Another aspect is that these platforms only provide services where the market is the largest, thus large cities. Smaller cities and regions are not covered.
Many other mechanisms are specified in logistics that formulate conditions and liability of a service provider, like the CMR Convention (road transport) and Rotterdam Rules (sea transport of containers). These types of issues need to be addressed, which might require the inclusion of insurance of a service provider against loss, damage, theft, etc.
The expected solution can be used by different service providers using various modalities (bike, electric vehicles) and maybe combining person and goods transport (e.g. forensics carrying goods between cities as a service).
There are solutions that cover these aspects, namely:
• Bistroo – based on a cryptocurrency, trust is said to be created. The cryptocurrency is to replace payment infrastructures like Ideal used by private banks
• Coopcycle – a platform with a cooperative structure, where members contribute to the development of the platform.
The challenge is to develop protocols that can be implemented without any intermediate party, provide trust, utilizing blockchain technology, and don’t utilize a cryptocurrency but utilize existing payment infrastructures. Protocols are the set of agreements between the stakeholder roles identified; they can be implemented by smart contracts. As said, these protocols can include certificates issued by an external (trusted) body.

@zekierkin
Copy link

zekierkin commented Jan 31, 2022

Z2: Reference implementation for Energy Token project.

Customers:
Main supervision BlockLab
Reimbursements for deployment and transaction fees Spark!

The goal of this assignment is to deploy a reference implementation as specified below on various blockchains to gain insight into the development experience, and operational and performance differences between these blockchains. Each student team would be responsible for a deployment on one of blockchains of interest, possibly extend with deployments on other blockchains if the scope is determined too small.
The first task is to program the reference implementation for the blockchain of interest. Second, deployment of the reference implementation in a test environment, or directly in production environment. The third task is to run and test the implementation and log specified metrics. The final task is to document the development experience and used tools, and to present the logged metrics in a dashboard for the administrator. The results of each team will be used to assess the operational differences of the researched blockchains and to gain insight in the development experience and the availability of tools.

Reference implementation based on EnergyToken project
EnergyToken is an investment platform for tokenized energy assets. A solar farm developer (defined as Platform Owner) is able to tokenize each individual solar panel on their site in the form of non-fungible tokens (NFTs), and offer them to Investors. The Platform Owner has the right to mint, burn and transfer solar panel tokens, and is able to monitor site energy production, asset ownership, and other relevant information.
Based on the solar panel tokens an Investor owns in his wallet, he is able to view solar panel and site information and is able to monitor the energy production of each of his assets. The Investor has only the right to transfer solar panel tokens.
The idea is that produced energy sold to the grid is distributed proportionally amongst the solar panel token holders. A fee of that sold energy is deducted to pay for the land-owner, site and asset maintenance, site manager, and investment platform.
BlockLab has created a simple demonstrator for such a platform (https://energytoken.nl/ ) that only covers basic functionalities and user experience. The demonstrator includes two pages, one for the Investor and one for the Platform Owner.

Detailed design documents and codebases are available at BlockLab.

The high-level architecture:
• A token contract, able to mint non-fungible tokens
• A web-based frontend
• A backend that fetches energy production data from API or web location, stores it per asset in a database, and updates the database according to token mints, transfers, and burns
• A database that contains general information and energy production data
• A blockchain node to access the network
• Additional for assignment: the component that pulls and processes on-chain data
• Additional for assignment: additional dashboard page in the frontend that shows specified metrics

Learning goals
• Gain skill in prioritizing and plan development work based on deliverables
• Gain practical skill in programming, testing and deployment of blockchain based software
• Gain specific knowledge about the blockchain of interest
• Gain skill in monitoring and visualizing relevant parameters

Deliverables
• Present the deployed and functional implementation of the reference implementation on blockchain of interest
• Documented results on quantitative metrics
• Specified metrics presented via the dashboard

Note: More information on interested blockchain technologies and metrics exist. These lists will be provided to the interested groups.

@synctext
Copy link
Member Author

Class completed! closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants