Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.87k stars 451 forks source link

Blockchain Engineering - class of 2022 #6741

Closed synctext closed 2 years ago

synctext commented 2 years ago

<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)

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

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Class completed! closing issue.