Closed synctext closed 3 years ago
@thystler @tpapak01 @C3lio Welcome to the course! Sprint proposal divided on team of 4 students :
DAO stuff: https://hackingdistributed.com/2016/06/18/analysis-of-the-dao-exploit/
get familiar with Trustchain concept read docs
Coding sprint 1:
sprint advice:
Addition: please focus this sprint primarily on Grab 'N Run. I think it offers exactly what we need. Separately, also test and evaluate dynamic-load-apk. Use something as simple as possible. From the Grab 'N Run research paper
This additional piece of code is loaded at runtime (thus the
term “dynamic”), and it might not necessarily be present
in the application package at installation time: In fact, the
additional code could be retrieved, once again at runtime,
from a remote network endpoint.
Try to get this to work or create an issue on their repo what is broken. Future sprint options:
@rootmonkey
Sprint update:
After some research, we found that Grab N Run internally uses DexClassLoader to securely and dynamically load classes, thus, instead of using their implementation we just tried and got DexClassLoader to load a class from a jar file. Currently our code just runs on an Android 10.0 (API 29) emulator as we tried to run the code on a Samsung device and we failed. So our guess is maybe we need a device with stock android on it.
Below we have a simple depiction of our running code: Before:
After button press:
Where the modified string is dynamically loaded from the method get_str of this class at runtime:
Update: We managed to get DexClassLoader to load a class from a jar file on an actual phone. The problem was that the application required runtime permissions through the actual device (at least, that's what solved a common problem we were experiencing). The "Injected" class has been built into a jar file and placed on the phone. Below we simply present its code. Since DexClassLoader eventually worked, and since Grab n' Run is based primarily on that class, we have high hopes that SecDexClassLoader will work as well. After all, the difficulty was the whole permission granting process on the actual device, and we achieved that without resorting to older versions and tools.
Sprint feedback:
get_name()
overwrite existing code by imported code. Or show "name space conflict" error message. Test and show screenshot of attempting to overwrite Android operating system function.Wrap-up above sprint content, then demo to other groups at end of week 6 of this course?
We managed to get libtorrent working on android, whether a magnet link is used, or a .torrent file. Although the state of each download holds between runs (which means a download at 15% will continue from 15% the next time), we still haven't managed to find the actual file on the phone once the download is complete. Next steps:
sprint progress:
Integration with superapp (as a separate module) is complete. GUI screenshots will follow soon.
I guess one main question about the integration with the other teams is: "what are we supposed to transfer from peer to peer in the form of torrents? Is it votes? Is it executable code, and if so, for what purpose? The other teams made shared wallets, methods of money transferring and a system to vote/agree on money transferring. Where does our contribution fit in this?"Sprint feedback. To answer above question Libtorrent is used to download Kotlin code and conduct live code injection. Offer complete end-to-end Kotlin Distributed App system.
From prior list:
Sprint progress:
MAIN()
public static void loadDynamicCode(Activity thisActivity){}
Main
in the imported apkThe Loader
which ensures live code injection is done of various classes and run them.Create a pull request of your branch into the dao branch of Tribler/trustchain-superapp repository
)Sprint progress:
final sprint goal
Freedom of computing "Core" progress
First Pull Request, nice.
Magnet link downloading through Libtorrent works!
Code: Download .APK
Exchange magnet links exchange within "Greet other peers" in GUI
magnet:?xt=urn:btih:6d651f45a01afc35572c734c73cbf8a8f82c396f&dn=20+Awesome+Nature+Ultra+HD+4K+Wallpapers+3840x2160+Px+%5BSet+64%5D&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969
Sprint progress:
DEXclassLoader()
This was one of the basic test where the button is made in a different apk and loaded dynamically into Test4
@InvictusRMC from the MultiSIG wallet team has volunteered to help integration your efforts. Thus real Bitcoin bounty payout for a magnet link with useful code.
Our app/module is complete. Below you can find a guide describing the main use case, from start to finish, and each step required along the process: https://github.com/tpapak01/trustchain-superapp/wiki/FOC---app Here is the apk: app-debug.zip We can test the functionality tomorrow, if you want to. A new pull request was made for the superapp. Finally, we spoke with the Democracy group, and agreed on the integration. In short, if a user wants to distribute code among the network (through our Upload button) he must first propose that code/apk and have it approved/voted for, otherwise the button blocks him from uploading his apk.
Final sprint feedback:
Top README.md documentation uploaded to Superapp dApp example code in repo and operational code injection. Testing latest release...
Delft-DAO
What is a DAO? Within the coming decade the future of jobs, employment and the nature of the firm will change profoundly. Automation, AI, and robots will replace many of today's jobs. A new type of company is a company without any employees, without any machines or physical infrastructure. A Decentralized Autonomous Organizations, DAO, only exists in software. It goes beyond smart contracts, it is a complete company inside software. DAO development is still in the experimental stage.
Within this course you can create your very own autonomous organisation, the Delft-DAO. Learn to engineer a decentralised autonomous organisation, use the existing tools, and understand the security risks. The aim is to alter the nature of the firm in the Internet age, see the Nobel prize winning theory. Production cost become essentially cost-free. An organisation which exists purely in cyberspace. The Delft-DAO is designed to be the first sustainable DAO. How can we empower leaderless organizations? How can it earn money from manipulating bits?
Several teams from the class will create running code (requirements for a passing grade..) for one of the following functionalities. Four teams together create the building blocks of the complete Delft-DAO (time consuming integration step is outside our scope).
Freedom of Computing Freely executing code forms the core of the DAO. Improvement of smart contract execution model. This team will build the enabling infrastructure of the DAO. You will create Python-based code execution using the "Dapp" approach, decentralized applications. All executed code on the Delft-DAO is compressed down to a single hash. This code can be upgraded and can never revoked in a "rage-quit" incident; it probably is even "lawyer-proof". The mandatory starting point for your code with documentation in this master thesis.