Tribler / tribler

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

Blockchain Engineering - class of 2024 - Team Democracy-3: self-evolving blockchain #7910

Closed synctext closed 1 month ago

synctext commented 7 months ago

Project assignment for Delft University of Technology master course called "blockchain engineering". Democracy-3 self-evolving blockchain

All three team members got it compiling.

Background reading:

Upcoming sprint assignment

synctext commented 7 months ago
JopSchaap commented 7 months ago

What we did this weak:

Problems we encountered:

synctext commented 7 months ago

Sprint ToDo:

Concrete Week 10 goal:

grimadas commented 7 months ago

Linter for kotlin: https://github.com/pinterest/ktlint

JopSchaap commented 6 months ago

What we did this weak:

Problems we encountered:

Questions:

pbhaskaran commented 6 months ago

Screenshot 2024-03-12 125029

Screenshot 2024-03-12 125242

grimadas commented 6 months ago

For the next week:

JopSchaap commented 6 months ago

What we did this week

Things we ran into this week

Things we want to work on next week

AirWinter commented 6 months ago

Demo of push gossip: https://jam.dev/c/3b808243-706e-4d41-b082-668026a82a53

grimadas commented 6 months ago

Next week:

InvictusRMC commented 6 months ago
  • Now the votes are collected with a queue that is polled every second. What is the easiest way to implement it asynchronously? Implement a singleton? Any ideas @InvictusRMC?

Right now the implementation is indeed very inefficient. What I suggest is making use of a listener. That way we can check whether conditions are met whenever receiving a new block, as opposed to checking periodically.

AirWinter commented 6 months ago
JopSchaap commented 6 months ago
grimadas commented 6 months ago

Solid progress

For the next week:

pbhaskaran commented 6 months ago

g1 g2 g3 g4

JopSchaap commented 6 months ago

What we did this week

Things we ran into this week

AirWinter commented 6 months ago

PushBasedNoOrigin Improved graph for push-based gossip

APK link APK Master Old APK my-special

synctext commented 6 months ago
JopSchaap commented 5 months ago

What we did this week:

Screenshot_20240409_104744
grimadas commented 5 months ago

For next week:

AirWinter commented 5 months ago

Final Ticket Update

This is just a brief overview of our project, check out the README for more insights.

Project Features

  1. Fixed issue that prevented APKs from being opened on new versions of Android (14+)
  2. Built a voting system for FOC app
    • Pull-based gossiping
      • Triggered when opening the FreedomOfComputing app
      • Sends request to all your direct neighbours
      • Only respond with votes that you don't already have
      • Benchmarked the performance in terms of latency & message size
    • Push-based gossiping
      • Triggered when placing a vote, tries to inform others about that specific vote
      • Inform log(n) of your neighbours about this vote, where n is number of direct neighbours
      • Hot potato gossip with TTL set to 2, so neighbours relay it unless TTL is 0
      • Benchmarked the performance in terms of latency & message size
    • Persisting state by writing to .dat file
    • Signatures to verify votes
  3. Installation of APK to homescreen
    • APK automatically installed to homescreen once it passes a certain threshold (set to 100)
    • Manual installing APK to homescreen when they haven't passed the threshold

Documentation

The README contains most of our documentation, as it provides a developer onboarding guide explaining the main methods of the FreedomOfComputing App. It also contains a section which goes more in depth into the features that we implemented in this project, the key decisions we made and highlights some of the current limitations as well as potential future improvements. We also made sure to include detailed KDocs for all new and most existing methods. These comments cover parameters, return statements, and provide an overview of each method's functionality.

Testing and Coverage

The new classes with heavy logic that required testing were FOCVoteTracker and FOCSignedVote class. For the FOCVoteTracker class, we reached 100% method coverage with 90% of lines covered (The missing lines are just mainly console log statements used for debugging) and on the FOCSignedVote class, we reached 100% method coverage and 100% line coverage.

Live Demo

For the live demo download this APK and follow these steps:

Steps:

  1. Install the APK
  2. Check that you're connected via the debug screen
  3. Open FreedomOfComputing
  4. This should do a pull request and should fetch all the votes you're behind
  5. Place votes on APK which should push to others, also have others place votes which should push to you
  6. Have one APK go over the net threshold of 100, this should automatically install it to the superapp home screen
  7. Long click on an APK that doesn't have enough votes for the threshold and install it to the home screen manually
  8. Have a working APK gossiped automatically
  9. Have a broken APK gossiped automatically

Recordings in case live demo doesn't work: Demo Voting Demo Downloading APK Demo Torrenting APK

synctext commented 5 months ago