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

TrustChain: Build you own blockchain - group 1 #3237

Closed
boninggong opened this issue Nov 21, 2017 · 33 comments
Closed

TrustChain: Build you own blockchain - group 1 #3237

boninggong opened this issue Nov 21, 2017 · 33 comments

Comments

@boninggong
Copy link

boninggong commented Nov 21, 2017

You will create your own blockchain, almost from scratch. Your blockchain will be special! Your blockchain will be the first in the world to operate on smartphones exclusively. Your blockchain will not need servers, miners, consensus nodes, PCs, central entities, oversight bodies, governments, banks, or any other impurity. Just phones. Your blockchain should not rely on any server, require no infrastructure, and trust no entity except itself. It thus also becomes increasingly attack-resilient and with offline support it will not even depend on The Internet itself.

The two students helping you as TAs in this course have already implemented a starting point for you. You will build upon their work and create an operational Android-based implementation capable of talking to the live network. The protocol is Trustchain, the 3rd generation blockchain created by TUDelft scientists. Read the scientific paper. A more extensive master thesis from mathematics is also available.

TrustChain is capable of creating trusted transactions among strangers without central control. This enables new areas of blockchain use with a focus on building trust between individuals. Our innovative approach offers scalability, openness and Sybil-resistance while replacing proof-of-work with a mechanism to establish the validity and integrity of transactions. TrustChain is a permission-less tamper-proof data structure for storing transaction records of agents. We create an immutable chain of temporally ordered interactions for each agent. It is inherently parallel and every agent creates his own genesis block. TrustChain includes a novel Sybil-resistant algorithm named NetFlow to determine trustworthiness of agents in an online community. NetFlow ensures that agents who take resources from the community also contribute back. We demonstrate that irrefutable historical transaction records offer security and seamless scalability, without requiring global consensus. Experimentation shows that the transaction throughput of TrustChain surpasses that of traditional blockchain architectures like Bitcoin. We show by using extracted data from a live network that TrustChain has sufficient informativeness to identify freeriders, leading to refusal of service.

The live network can be seen here in a real-time overview. Your "Part I" starting point for software engineering can be found here on Github. Documentation on Android Trustchain. A key element of your "Part II" project is to implement networking. Another Delft project to take inspiration from is creating an academically pure Android-to-Android overlay, with it's own live deployment on Google Play.

Functionality to implement in your Android app: take a photo, sign this photo, publish on your blockchain, browse the Trustchain of others, validate their chain signatures, see their signed photos, and optionally support offline features.

Group Members:
@ClintonCao
@TimBuckers
@Michieldoesburg
@laurensWe
@boninggong

@ClintonCao
Copy link

ClintonCao commented Nov 21, 2017

TODO for next sprint:

Next meeting with Johan: 28 November 2017 - 11:30

@synctext synctext removed their assignment Nov 28, 2017
@ClintonCao
Copy link

ClintonCao commented Nov 28, 2017

TODO for this sprint:

  • Read about Churn models.
  • Read about Churn resilient and attack resilient in overlay.
  • Merge both apps.
  • Check what is possible with App-to-App Communicator.

Points for next sprint:

  • Find existing solutions for NFC and Bluetooth communication.

Link to repo: https://github.com/ClintonCao/CS4160-trustchain-android

Possible outcome: pull request on the original android project

Next meeting with Johan: 5 December 2017 - 11:30

@boninggong
Copy link
Author

boninggong commented Dec 4, 2017

Meeting 04-12-2017

TODO:

  • Setting username screen and sending over app to app network instead of peer ID.
  • Local information activity to show a users name, IP etc.
  • Show list of connections that are open only.
  • Show people that are requesting a connection to you.
  • Make connectection screen of two users more user friendly, see the illustration below.
  • Create option to send a user input message to the other connected user.
  • Create option to accept a message and sign the block and send it back.
  • Clear console with user friendly output that makes clear what is happening.
  • Overview of own chain more user friendly/better GUI.

Questions for next time:

  • Can we just change the hardcoded IP to bootstrap another device? Or do we need to add something else for this to work?
  • How can we enable TrustChain with public IPs? Do we need to support global communication over public IPs or is local/bluetooth enough?
  • What should happen when we close the app? Should we save the users chain or delete it?

@TimBuckers
Copy link

TimBuckers commented Dec 4, 2017

The concept from an user perspective:

planning_blockchain

@synctext synctext changed the title TrustChain: Build you own blockchain - Project Group 1 TrustChain: Build you own blockchain - group 1 Dec 5, 2017
@synctext
Copy link
Member

synctext commented Dec 5, 2017

Update:

  • integrated app-to-app communicator with Trustchain
  • will do upstream PullRequest today
  • next step: polish, overlay and IPv8 live integration

@synctext
Copy link
Member

synctext commented Dec 5, 2017

image

@laurensWe
Copy link

laurensWe commented Dec 5, 2017

Normally the GUI in the working case:

@synctext
Copy link
Member

synctext commented Dec 5, 2017

In a future sprint, link to IPv8 testnet: #3272

@boninggong
Copy link
Author

Sprint and tasks for week 2.4, see issues and assignees on the fork repository.

Next meeting with Johan: 12 December 2017 - 16:00

@synctext
Copy link
Member

synctext commented Dec 12, 2017

Status update:

  • software engineering Quality Assurance !
  • ToDo: 4G and 3G communication
  • persistent peer table (pub-key, IP:port)
    • view remote chain
    • send message to sign request
    • future sprint: inbox indicator of pending signature requests (hint in main screen, detail when clicked)
  • PR with upstream app
  • talk to wallet team
  • polish

@TimBuckers
Copy link

TimBuckers commented Dec 19, 2017

Update last week:

  • Tests (Junit and Espresso unit tests) reached 35% code coverage with exclusion of activities.
  • Public keys:
    • Sent over p2p messages (before Trustchain communication)
    • Stored along with origin net address in cache.
  • Blockchain explorer
    • View your own Trustchain
    • View others Trustchain
    • Trustchain visually more clear
      • Colors based on publicKey
    • Info page
  • Information screen about the color scheme of the connections and Trustchain
  • Change initial bootstrap address
    • Remembering last used IP address
    • Input validation

release: https://github.com/ClintonCao/CS4160-trustchain-android/releases/tag/2.0

current state trustchain android

@synctext
Copy link
Member

synctext commented Dec 19, 2017

Progress:

  • software engineering Quality Assurance ! ! (2nd time)
  • cool Travis coverage report
  • inbox of incoming sign requests
  • ToDo: 4G and 3G communication fix
  • testnet ? 50-nodes..?

@ClintonCao
Copy link

Version 3.0 of the app is available here.

@TimBuckers
Copy link

image

@synctext
Copy link
Member

synctext commented Jan 9, 2018

Sprint feedback:

  • mbox as first screen ?!? only claim lower screen row, inbox notifier on front page.
  • ToDo 3rd time: 4G and 3G communication fix
  • refactor UDP messaging: merge direct IPv4:port connect of trustchain and app-to-app stack.

@synctext
Copy link
Member

synctext commented Jan 9, 2018

Final documentation is contribution to: http:https://trustchain-android.readthedocs.io/

@synctext
Copy link
Member

synctext commented Jan 16, 2018

  • new release asap
  • merging direct connect TCP IPv4:port with the app-to-app stack nearly complete
  • modified Introduction-request message to include username in the hashmap (UserNameStorage)
  • new release not today; expected next week
  • stability; observed a app crash. magic is to catch exceptions.
  • Final grading PR to docs: should not exceed 5 pages including introduction with proper references, problem statement, high level description of the system, and reason for certain critical choices made in the design.

@synctext
Copy link
Member

synctext commented Jan 22, 2018

Talking to @wkmeijer and @klikooo about the app. Testing with few phones and latest Google Play code with inboxes. Overlay is a bit better, but still mostly broken. Please focus on overlay part. Friday I will feature this app at Stanford. Would be nice if it's in better shape. Thnx.

@synctext
Copy link
Member

synctext commented Jan 22, 2018

[update] Seems that the bootstrap server can talk to everybody. See picture below.
However, the basics which worked in earlier app-to-app work seem broken. No 4G or 3G.
(small issue; unconnectable peers should be purged after 5-ish failed attempts or a few minutes timeout by the overlay.)
img_20180122_144300

@laurensWe
Copy link

@laurensWe
Copy link

Short url: http:https://bit.ly/2n2l8rQ

@synctext
Copy link
Member

Photo donated to the Public Domain. No copyrights claimed.
overlay_android_manual_test__jan2018

@TimBuckers
Copy link

img_20180123_114422

@TimBuckers
Copy link

screenshot_20180123-115803

@TimBuckers
Copy link

img_20180123_120604_547

@synctext
Copy link
Member

synctext commented Jan 23, 2018

Status?

  • as always, primary function of overlay: 3G 4G
  • compare to app-to-app original code and connectability
  • readthedocs (walkthrough of overlay, view chain, send mesg, inbox, sign ; in 5-ish screenshots)
  • polish is low priority.
  • Final review: https://doodle.com/poll/ha9q5n8un4ftanec

@wkmeijer
Copy link

wkmeijer commented Jan 24, 2018

@synctext This latest version is now available as an update in the play store.

@devos50
Copy link
Contributor

devos50 commented Jan 24, 2018

@wkmeijer maybe could you also publish the APK on the Github repo (https://github.com/wkmeijer/CS4160-trustchain-android/releases)?

@synctext
Copy link
Member

Thnx,updated.
Mental notes on versioning.. New abilities or security features are hard to deploy. Any update of an overlay is required to know and understand the version of peers it sees. Updates MUST either create a new isolated network akin to a hard fork or be fully backwards compatible.

@boninggong
Copy link
Author

The screenshots for a walkthrough of the app can be downloaded from: https://drive.google.com/open?id=1OwmJVxRF91V9ENGMebDRsIhpUZIavFjR

We will include these later in the readthedocs file and give a more descriptive explanation of each step and all the functions that are implemented.

@synctext
Copy link
Member

convert -delay 150 -loop 0 1\-* [2-9]* 1[1-9]* all.gif
trustchain_android__signature_requests_and_mailbox

@devos50 devos50 added this to TrustChain Overlay in Blockchain Engineering 2018 Jan 29, 2018
@TimBuckers
Copy link

TimBuckers commented Feb 2, 2018

The final Pull Request is online https://github.com/wkmeijer/CS4160-trustchain-android/pull/81
The released apk: https://github.com/ClintonCao/CS4160-trustchain-android/releases/tag/4.0
This includes:

  • Documentation added: Read the docs completed and read me finished
  • Extra comments in the code
  • More Tests
  • Final small improvements

@synctext

@synctext
Copy link
Member

synctext commented Feb 5, 2018

Quick feedback on performance for input to grading:

  • good testing, with multiple types of tests and approaches https://codecov.io/gh/ClintonCao/CS4160-trustchain-android
  • taking code ownership, added test of other people code
  • quality of code and engineering excellence
    • aggressive 5 second overlay with operational 3G and 4G connectivity
    • real-time update of signatures and signed blocks
    • working block crawler and inbox
  • documentation in .html or .pdf not directly linked, two added chapters, 3-ish pages each. Did not take ownership of all docs or added themselves to author list.
  • positive work ethic

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

No branches or pull requests

8 participants