-
Notifications
You must be signed in to change notification settings - Fork 452
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
IPv8 distributed apps / plugins #2943
Comments
[Copied from ticket #3670, moving activity here; oldest ticket] Master thesis idea:
Possible sprints:
|
Security is a key concern In the first sprints I would recommend focusing on the core features first. Explore security after that. There are sandboxing features like RestrictedPython and chrootbuilder, etc. Fun part: IPv8 execution engine is itself obviously an IPv8 distributed app. Can upgrade itself. |
security threat observed in the wild: plugins(docker images) which steal cpu cycles for mining: https://arstechnica.com/information-technology/2018/06/backdoored-images-downloaded-5-million-times-finally-removed-from-docker-hub/ |
Towards first running code prototype:
Goal: self-sustainable ecosystem. Dream outcome: Runs flawlessly and expands after thesis is completed :-) |
Status update: experimented with IPv8, learning about related work.
|
Let's just go on another dreaming excursion...: IPv8 dApps are the fundamental building blocks for the re-decentralisation of The Internet. It represents an evolution from monolithic code, REST-based micro-services, towards trustworthy global computing. For over 20 years we have dreamed of composable software. We expand upon the idea of smart contract, by making them scalable and smarter. We never had software repositories which are server-free and maintenance-free. Now we finally have build the first autonomous isolated software pieces which understand the foundations of trust, can made decisions and learn, manage their own money, trade on marketplaces, can self-replicate, can do self-compilation, self-organise online elections, and have long-term reputational memory. Possible sprints to brainstorm about after Libtorrent basics are operational (our relentless incremental improvement methodology :-)
Even more ambitious is the offline-first approach, like Bramble, but they lack structural funding. Bramble builds upon Tor and handles all of the core functionality of "sending blocks of data back and forth, managing contacts, keeping channels between users secure and metadata-free, synchronizing state between a user's devices, and handling dependencies between pieces of data or expiring them when they get too old". |
Got the first prototype to work. A torrent file is created from the 'execute.py' file which contains a hello world code example. |
Solid progress! Brainstorm outcome: we use Github rating of software developers as a metric for quality of a code review. Just for initial bootstrapping. In later iterations we could hide the identity of the reviewers and have randomly picked witnesses validate the reputation of a software developer. Requirements for core functionality:
|
Brainstorming about the next upcoming sprint after skeleton voting is operational... #2805 ticket holder @alexander-stannat has now been volunteered to focus on creating a dApp of trust! Goal is to provide visualization and calculation of trust. It would require an API for real-time data feed of Trustchain, GUI events, and user selection of nodes. Upon selecting a node it would display the public key of that node and current trust estimate. Please work together when ready for that. |
Related work, "Crev: dependency vetting with a web of trust" (Alpha stage), https://news.ycombinator.com/item?id=18824923 |
Progress update: At the moment, nodes vote (+1) on dapps when they receive newly spreaded dapps. The dapps are gossiped to all nodes once. The gossiping happens through voting, where popular or good dapps are gossiped more than others. I ran a successful experiment where all selected dapps where discovered by the nodes set-up. Possible plans for next sprint is:
|
Meeting minutes:
ImportError and/or path error:
|
Meeting minutes & progress:
Works!
|
Sprint Progress:Fixed issues discovered during the current and previous sprintThe issues with the CLI interface and the menu were fixed. There were some conversion errors when printing out values from the database, which caused the errors seen on the previous sprint update. The program was also receiving a lot of packet malformatted errors on network packets. This turned out to be caused by an increased block size type that wasn't fixed in the Test TrustChain Network. A PR with an update was created and merged in IPv8 and uploaded to pip. Database / Verification checksThe database was updated to store more structured data, so the program doesn't have to query the unstructured trustchain every time. This change also allowed for better checking of software guards like if the current dApp is known to the system before executing an action on it, and preventing double votes. By making this change, there could grow inconsistencies between the trustchain and the database. This could happen through manual tampering of the database or trustchain, or through glitches in the blocks received flow. To prevent this, verification checks are executed 5 seconds after start-up, that detect these inconsistencies and fix them. Automatic dApp crawlingThe previous distribution mechanism of dApp loader only distributed dApps to connected peers when:
This strategy could lead to a dead network with passive users and a slow onset time for dApps. To help solve this problem a dApp crawler was created and added, that searches connected peers for unknown dApps, to decrease this onset time. Since the crawler only crawls the first level connected peers, it doesn't impact the scalability significantly. The crawling task is executed asynchronously 10 seconds after start-up and every hour afterward. Trust - Double vote detectionTo prevent malicious nodes from infecting the network with fake votes to promote certain dApps, a double vote detection check has been added to detect these. Upon detection, a message is shown to the user of the system to indicate this. This double vote detection happens on start-up but could be adjusted to run more often. Libtorrent integrationIn the previous sprint the program consisted out of multiple parts:
These parts have now all been integrated into the dApp community. This integration led to some problems with the (dynamic) package import, but from preliminary testing, it should all work now. Main Menu
Context Menu (only after discovery)
Execution engine implementationIn the development of the execution engine, several problems were encountered:
hierarchical types
Experiment - Executable: Distributing and running of test dAppExperiment - Overlay: Distributing and running of IPv8 CrawlerExperiment - Service: Distributing and running of IPv8 Tracker |
Success! 😄 Operational Trustchain crawler as a dApp. Meeting minutes, focus on either market dApp, trust dApp or implement dynamic GUI. Best focus on the toughest problem, with roadmap consequences: GUI stuff. Sprint goal: in 2 weeks make prototype of dynamic GUI. prior notes "cross-platform with Android support, possibly Android Webview {default GUI, with IPv8 services in background; dynamic GUI update)". Prior work of QR code scanning and reading in Android. Great basic dApp dependency.. Test for Android: Trustchain crawler GUI. Create demo .apk (ipv8-service and IPv8 app) Future sprints: market dApp, Bitcoin wallet, QR-codes + IBANs. (ring-fenced local and global REST api)
|
Sprint Progress:This sprint I ran into a couple of hurdles that slowed down my progress. My main focus was on the following tasks:
These experienced hurdles were:
Completed tasks:
Task still working on:
|
Meeting minutes:
|
Todays meeting minutes:
|
Storyline input: This thesis presents a framework and implementations of a truly universal binary. |
Sprint ProgressThis sprint I focused on:
Due to computer networking lab preparation, I had less time than I would have wanted. I really wanted to get a good start on writing the thesis, but this didn't work out in the end. I also had a hard time figuring out how to get the actual problem and subject in writing. I think this is an important discussion point, because getting a clearer picture of this would help me in writing the thesis. Things I would like to work on in the next sprint:
|
Meeting notes: Next steps:
|
Progress updateWorked on thesis the last week. Added draft of the introduction and the problem description. Had a hard time trying to separate the different sections: Introduction, Problem description, and related work. Some personal notes:
Progress can be found in: |
|
Scientific thesis title (less engineering focus): |
Suggestion for problem description related work:
|
Progress update:Back from conference in the states. Remaining days I continued working on writing of the thesis. I still have to resolve points from the previous meeting notes, but I wanted to focus first on getting some more concepts on paper, so it is easier to see the bigger picture and the storyline. Afterward, I will start refactoring to correct parts that could be made more scientific and less storytelling. I have worked on creating diagrams for different parts of the application, so they can be more easily explained. Especially activity diagrams would help with explaining the process for some of the decentral operations. I have started writing the Design and Experiment/Evaluation chapter and the section about the Android app experiment. In the coming two weeks I want to focus on finishing the code and writing tests. |
Suggestion new title:
|
The Lehman law matches the topic very well. I can definitely use that. Thank you. The other resource you mentioned about the Normalized System Theory seems to describe the development of highly abstracted and engineered software application that allow for agile development, without breaking and with minimal change. I don't know if this is very suitable |
please mention: live code updates: https://github.com/julvo/reloading |
Need one more week to finish the final product and experiment. After that focus completely on adding remaining concepts and rewriting and refining the report. Had trouble finding good metrics for the experiment that won't be very subjective or that depend on the composition of the network. Technical metrics are not suited best for comparison with other platforms. Design chapter structure/notes:
|
Quote @mitchellolsthoorn : Normalized System Theory == purist, holy grain and therefore inefficiency beyond usage. Too complex. Without simplicity all agility is lost. Python does not need to be motivated. All engineering details are merely documented, not meticulously defended. "We use Trustchain as the distributed ledger in our experimental implementation." IPv8 runtime model versus Ethereum fundamental brokenness (e.g. scalability and cost). The Ethereum model is not long-term sustainable:
"Trustchain does not have a native cybercurrency such as Ethereum, it provides a transaction recording ledger". Plus distributed trackers are currently still a central dependency (e.g. 25MByte bootstrap is still ongoing work). Your thesis work requires a name for ease of referencing. Pasta-Frame: the next evolution of modularized code execution. Key property is permissionless code execution at near-zero cost. The code execution architecture defines the maximum complexity of the code that can be produced. JVM, Nodejs, CPAN perl modules and other real-world framework and the connection between modules determine the Maximum Complexity of Applications (MCA) which a single company, an global consortium or open source community can create. We devised the first architecture to take the MCA as the cardinal design optimisation. Science what defines MCA? What constrains/boosts MCA? The interconnection fabric is the key determinant for the MCA. How data flows between modules, how the future-proofing is arranges, how any piece of code can interconnect with any other code, and how can we devise the universal module interconnector? Feel free to cite this 2003 work on dynamic configuration and dynamic runtime loading of code modules with a dependency graph with running code: General remark: please always keep the science first and omit engineering details. Runs! |
"Dependency managers now exist for essentially every programming language: Maven Central (Java), NuGet (.NET), Packagist (PHP), PyPI (Python), and RubyGems (Ruby) each host more than 100,000 packages. The arrival of this kind of fine-grained, widespread software reuse is one of the most consequential shifts in software development over the past two decades. And if we're not more careful, it will lead to serious problems." https://queue.acm.org/detail.cfm?id=3344149 |
I continued working on the report. Although, the written isn't going as fast as I want. I struggled a lot during the last sprint as I am not making the progress I want to. I have rewritten the structure of the Introduction and moved parts of the structure around. I want to discuss if this new structure is a better fit for the thesis: Introduction:
|
report (25).pdf review of current thesis:
ToDo: animated .GIF of whole trustchain .APK starting, loading, module fetching, trustchain starting, crawling, and browsing ? Use as leading example in thesis experiment? Merge Chapter 5 in other chapter? |
Progress update:
|
LATEST raw .pdf of master thesis
|
Progress update
|
Comments:
|
Comments:
|
Remarks on latest version of master thesis.
|
Discussion:
|
Comments on THIS thesis version :
|
Something to consider for the future: Python sandboxing and creating a secure subset https://github.com/InQuest/python-sandboxapi For IoT: https://micropython.org/ Smart contracts and Python: |
YouTube export plugin: https://github.com/mps-youtube/pafy |
The work pioneered by FBase can be used to build adversarial compatibility for Big Tech. https://www.eff.org/deeplinks/2020/07/legislative-path-interoperable-internet
Plus: https://www.eff.org/deeplinks/2019/10/adversarial-interoperability |
From Modules, monoliths, and microservices on design of module systems, like FBase. Top-line goals of module systems are always the same:
|
Solid progress made. @grimadas found a great solution for run-time.
Adversarial compatibility with WhatsApp comes closer: https://github.com/tgalal/yowsup Python lib for that! Related work {fails to address trust issues} : POSE: Practical Off-chain Smart Contract Execution. Network and Distributed Systems Security (NDSS) Symposium 2023, [Conference or Workshop Item].
|
Goal: Distributed apps with efficient execution model and event-processing.
Possible operation scenario: you download some blockchain "genesis code" to connect to the blockchain. You now can download the basic data and complete the bootstrap. This basic data would somehow be trustworthy and executable. Trust and abuse prevention is the key challenge.
this work fits into our long line of work around this theme.
Plugins and apps have been around for decades. In 1999 I've created one within Winamp. Numerous app ecosystems emerged, in 2008 a vulnerability was published in Facebook Apps.
Dealing with vulnerabilities, spam, and malware has proven to be a hard problem. Tezos aims to have a self-describing blockchain, but they did not yet address any of the fundamental security issues.
In 2008 the Tribler research team reached a key milestone: an app store and execution platform without any server. See our research report on this full self organising system, this work has a distant relation to the Ethereum smart contracts which launched years later. Real 2008 widget code without any servers, no app store and no app platform servers. In 2015 we created self-compiling Android apps ("Autonomous smartphone apps: self-compilation, mutation, and viral spreading").
Estimated repository size of various widget platforms in 2008
The 2008 widget source code was simply gossiped around between clients. Each client collected raw .py files and displayed a local app store interface like:
Our 2008 architecture for serverless widgets:
full 2009 thesis
The text was updated successfully, but these errors were encountered: