JopSchaap / trustchain-superapp

Kotlin implementation of Trustchain and IPv8 with rich networking: multihoming of local Bluetooth+4G, decentral social networking, UDP hole punching, etc.
GNU General Public License v3.0
0 stars 0 forks source link

Final Ticket Update #73

Open AirWinter opened 2 months ago

AirWinter commented 2 months ago

Final Demo APK: https://drive.google.com/file/d/19i36Kb7LQ6rmp9yq2L8z0Z-Izr2XxCxW/view?usp=sharing

Ticket Update

TODO

Demo APKs

Hello World APK: https://github.com/JopSchaap/temp-project/raw/hello-world-apk/app/build/outputs/apk/debug/hello-world.apk Counter APK: https://github.com/JopSchaap/temp-project/raw/counter-apk/app/build/outputs/apk/debug/counter.apk Flashlight APK: https://github.com/JopSchaap/temp-project/raw/flashlight-apk/app/build/outputs/apk/debug/flashlight.apk Date APK: https://github.com/JopSchaap/temp-project/releases/download/apk-v0/date.apk Duck duck go APK: https://github.com/JopSchaap/temp-project/releases/download/apk-v0/duck-duck-go.apk Color APK: https://github.com/JopSchaap/temp-project/releases/download/v0/colors.apk Move APK: https://github.com/JopSchaap/temp-project/releases/download/v0/move.apk

Random Number APK: https://github.com/JopSchaap/temp-project/raw/random-number-apk/app/build/outputs/apk/debug/random_number.apk Broken APK: https://github.com/JopSchaap/temp-project/releases/download/v0/br0k3n.apk

Demo Voting Demo Downloading APK Demo Torrenting APK Demo Torrenting APK with Progress Bar

AirWinter commented 2 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

pbhaskaran commented 2 months ago

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.

We've made sure to include detailed KDocs for all new and most existing methods. These documents cover parameters, return statements, and provide an overview of each method's functionality.

pbhaskaran commented 2 months ago
  1. Built a rating system for FOC app
    • Pull based gossiping
    • Push based gossiping
  2. Installation of apk to homescreen
    • Apk automatically installed to homescreen once apk passes a certain threshold
    • Install apk to homescreen with manual voting