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 2024 - Team Democracy-2: Cypto Core #7909

Open
synctext opened this issue Feb 20, 2024 · 23 comments
Open

Blockchain Engineering - class of 2024 - Team Democracy-2: Cypto Core #7909

synctext opened this issue Feb 20, 2024 · 23 comments

Comments

@synctext
Copy link
Member

synctext commented Feb 20, 2024

Project assignment for Delft University of Technology master course called "Blockchain Engineering".

Democracy-2: Cypto Core

  • Analyse existing running code with multi-sig, taproot, Schnorr signatures, and threshold voting

  • Get existing code running with 4 laptops with Android emulators or real phones. Add new debug dashboard of connected peers with external IPv4, last-response-time, time-outs, new peers discovered, and alerts for incoming packets.

  • Identify the exact location of security vulnerabilities such as lack of message signing, lack of pre-commitment, lack of leader election (or leaderless mode), and lack of FROST-type of security guarantees.

  • FIX and craft hardened code

  • Superapp checkout, Emulator working, get BTC operational,

@Mozafar7 @M-Butenaerts @QuintenVanOpstal

Sprint goal:

  • get a Regtest/testnet BTC node operational and get working with "Free Bitcoin" button inside superapp.
  • fetch major code update for superapp modules and IPv8 sub-module
  • understand existing code
@InvictusRMC
Copy link
Member

Here you can find the Bitcoin node source: https://github.com/Tribler/Bitcoin-Regtest-Server

@synctext
Copy link
Member Author

  • not really fast start of the project
  • Todo BitcoinJ upgrade
  • run own node and connect to this one from various emulators
  • debug dashboard inside app of connected nodes (simple ping)

@InvictusRMC
Copy link
Member

  • Upgrade bitcoin dependency to latest version
  • Understand differences between mainnet, testnet, and regtest

@QuintenVanOpstal
Copy link

  • Upgraded my local git library, and compiled a new app
  • Looked at differences between mainnet, testnet and regtest.
  • Started my own bitcoin node
  • connect multiple devices to this node
  • Looked at the dashboard when multiple devices were connected

@Mozafar7
Copy link

Mozafar7 commented Mar 5, 2024

Worked on getting the regtest node working on my device and getting the getBTC button working (with the major code update). I tried to connect to it from various emulators, but I did not manage to get that working.

@M-Butenaerts
Copy link

  • Worked out how to run the server

  • connected my emulator to the server

  • got the "get bitcoin" button working

  • Exploring the structure and code of the application

@synctext
Copy link
Member Author

synctext commented Mar 5, 2024

  • No coordination to collaborate and share workload
  • Little coordination meetings to help all team members make progress
  • Not on track to pass this course
  • Please accelerate
  • No FROST deep-dive yet
  • No reading of FROST yet
    • for next sprint identify vunerabilities
    • what can be fixed
    • FIX and craft hardened code
  • please post issue update

@InvictusRMC
Copy link
Member

InvictusRMC commented Mar 5, 2024

Next sprint:

  • Please divide work
  • Proposal:
    • 2/4 members work on operational bitcoin node:
      • Upgrade to latest bitcoinj
      • Get working with superapp
      • Output: small demo showcasing it works on testnet
    • 2/4 members work on crypto analysis:
      • Read frost & musig papers
      • Analyse current implementation --> make workflow graphs
      • Compile shortcomings of current implementation: what is not safe? how can we improve this? what are bottlenecks crpyto-wise?
      • Output: summary of papers, workflows graphs of current implementation, and plan of improvements to current implementation.
      • Analyse current design

@InvictusRMC
Copy link
Member

Please read the folllowing papers:

@JoepMulder
Copy link

JoepMulder commented Mar 11, 2024

  • Edited server code & android app code to connect to local BTC node via HTTPS on Regtest
  • Reading, understanding & summarizing of FROST
  • Read & summarized SPRINT
  • Read & summarized "The many faces of Schnorr"
  • Identified the flaw of current multi signature scheme implementation (MuSig is n-n so all participants must sign, not ideal for DAO purpose)
  • Plan of improvement concerning signature schemes: Implement FROST protocol as it supports t-n (t <= n) signing, it suitable for ROAST and FROSTS's main techniques can be combined with SPRINT to improve robustness & efficiency at a later stage.
  • Started with analyzing the current MuSig implementation and how we can replace this with FROST.
  • Fixed error occuring when trying to run unit tests

@InvictusRMC
Copy link
Member

InvictusRMC commented Mar 12, 2024

Demo goals:

  • Showcase code running on testnet!
  • Please upgrade core to version 26: https://github.com/bitcoin/bitcoin
  • Make debug screen:
    "Get existing code running with 4 laptops with Android emulators or real phones. Add new debug dashboard of connected peers with external IPv4, last-response-time, time-outs, new peers discovered, and alerts for incoming packets."

Demo Pointers:

@QuintenVanOpstal
Copy link

QuintenVanOpstal commented Mar 18, 2024

We updated the bitcoin core to run on version 25

We updated the bitcoin configuration file to run the bitcoin daemon on the testnet. We had to debug quite a lot during this process in order to get the testnet working on the server.

We tested the communication between the android application and the server running on testnet. The communication is working, but since we don't have funds on the testnet wallet, we get an error when retrieving BTC.

Updated the readme file for the server to make it more convenient when setting up

Created a new page in app that shows list of connected peers with their external ipv4,last response- & request time
https://github.com/JoepMulder/trustchain-superapp
Untitled

trying to fix personal problem with communication between core, python server and superapp application

@InvictusRMC
Copy link
Member

InvictusRMC commented Mar 18, 2024

@M-Butenaerts
Copy link

M-Butenaerts commented Mar 25, 2024

  • Connected to the same DAO with multiple emulators on different devices over internet.

  • Voted in the DAO.

  • Researched and decided on a leader election algorithm.

  • Updated debug dashboard to show own IP & PK, other Peers PK & activity
    WhatsApp Image 2024-03-25 at 14 48 45_7c7469b7

  • Created flowchart for current DAO joining process

WhatsApp Image 2024-03-24 at 17 53 21_5bc78533

  • tesnet faucet (testing and applying changes)

@InvictusRMC
Copy link
Member

Great progress 🎉

  • Continue working on election algorithm:
    • Make a flowchart for the election algorithm and start working on some text reporting on your design
  • Push server code and make a PR to our repository

@M-Butenaerts
Copy link

M-Butenaerts commented Apr 2, 2024

  • Added first functionalities for leader election to currencyii.

  • Updated server read.me file with other.

  • Looked into communication through Blockchain and IPv8.

  • Added code to send joinDao payload data via ipv8 to Peer in DAO so peer can retrieve signatures and do the joinDaoTransaction instead of the joiner (Question: How should we handle the case where no single member of the DAO is online).

  • difficulties:

    • uncertainty about right commmunication channel.
    • push problems with GitHub repository.
  • fork: https://github.com/Mozafar7/bitcoin-regtest-node

@InvictusRMC
Copy link
Member

Next Sprint:

  • Finish flowchart
  • Finish connection with app (and TestNet)
  • Implement leader election working on purely IPv8
  • Make a pull request to the node repository

@M-Butenaerts
Copy link

  • created diagram
    • image
    • Each peer starts a personal election and requests alive packets to find candidates.
    • If current peer has the highest hashed public key, it is selected as leader and it broadcast an ElectedPayload.
    • Every peer sets its leader as the peer in the ElectedPayload. In case of multiple ElectedPayload, (faulty behaviour/ attacker) the peer takes the peer with the the highest hashed public key among the payloads.
  • constructed communication through IPv8.
  • created following funtionalities:
    • AlivePayload, ElectionPayload, ElectedPayload, SignPayload.
    • leaderSignProposal, checkLeaderExists, electLeader.
    • onAlivePacket, onElectedPacket.
  • bitcoin core updated to 26.
  • Server Readme has been expanded and pull request is ready.
  • TODO:
    • OnSignProposal
    • testing

@InvictusRMC
Copy link
Member

InvictusRMC commented Apr 12, 2024

Grading session

  • Running code required for passing grade

    • APK file
  • Finalize implementation
    • Create test
    • Make performance graphs
  • Write README-style report
  • Please provide us a with links to all of your code
  • Make pull request of all code
  • Demo of your functionalities

@M-Butenaerts
Copy link

  • exported first .apks

  • testing:

    • tested electionPayloadRequest
    • tested onAliveResponsePacket
    • tested electionPayload
    • tested alivePayload
  • initial version of readme file and graph creation setup

  • difficulties:

    • creating tests for private functionalities, should we make them public just for testing?
    • questioning how to handle Ipv8 tests and test related to coinCommunity.
  • Continuing with:

    • testing:
      • testing onElectionRequest
      • testing leaderSignProposal
    • report
      - continuing expanding and creating with graphs

@InvictusRMC
Copy link
Member

InvictusRMC commented Apr 19, 2024

Final session

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

7 participants