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

Currency I: First Implementation of Machine Learning Trader App #3

Merged
merged 192 commits into from
Apr 9, 2020

Conversation

mvanmeerten
Copy link
Contributor

Issue #5143

  • Integrated AI technology (naive bayes classifier)
  • Observe the live market IPv8 community
  • Create your own test bid/ask workload (Kotlin)
  • No trustchain block creation, simple message broadcasting only to few dozen peers (will not scale, inefficient)
  • No special matchmaking agents, just match incoming ask with your own bid (or vise versa)
  • Create bid/ask in the market community manually in GUI (helpful for testing)
  • Display orderbook on the screen (build on Freedom of Computing team)
  • Integrate transfer of cybercurrency QR-code one-shot operation
  • Trading agent buy for this price, sell for this price
  • Turn on/off on screen
  • give trade advice
  • turn on to do simplistic automatic trading
  • Testnet Bitcoins versus your own currency trading pair (e.g. Dymbedollars)

dymbe and others added 30 commits March 9, 2020 14:53
Self-signed transactions print money. Probably not secure yet.
mvanmeerten and others added 5 commits April 8, 2020 13:36
# Conflicts:
#	.gitignore
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/nl/tudelft/trustchain/app/AppDefinition.kt
#	app/src/main/java/nl/tudelft/trustchain/app/TrustChainApplication.kt
#	settings.gradle
#	trustchain-trader/src/main/java/nl/tudelft/trustchain/trader/ui/TrustChainTraderActivity.kt
#	trustchain-trader/src/main/java/nl/tudelft/trustchain/trader/ui/transfer/TransferFragment.kt
#	trustchain-trader/src/main/res/layout/fragment_transfer.xml
#	trustchain-trader/src/main/res/navigation/nav_graph_trader.xml
@MattSkala
Copy link
Collaborator

MattSkala commented Apr 8, 2020

There is some issue with cloning the kotlin-ipv8 submodule, can you please check? Make sure it points to the latest commit in Tribler/kotlin-ipv8#master, is the same way as in the current dao branch.

martijnbosma and others added 9 commits April 9, 2020 10:24
Fix the following test errors:
> Task :trustchain-explorer:ktlintMainSourceSetCheck FAILED
/Users/runner/runners/2.168.0/work/trustchain-superapp/trustchain-superapp/trustchain-explorer/src/main/java/nl/tudelft/trustchain/explorer/ui/blocks/BlocksFragment.kt:22:1: Unused import
/Users/runner/runners/2.168.0/work/trustchain-superapp/trustchain-superapp/trustchain-explorer/src/main/java/nl/tudelft/trustchain/explorer/ui/blocks/BlocksFragment.kt:27:1: Needless blank line(s)
# Conflicts:
#	.gitignore
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/nl/tudelft/trustchain/app/AppDefinition.kt
#	app/src/main/java/nl/tudelft/trustchain/app/TrustChainApplication.kt
#	common/src/main/java/nl/tudelft/trustchain/common/util/TrustChainHelper.kt
#	settings.gradle
@martijnbosma
Copy link
Contributor

@MattSkala Could you check why the error -

> Task :ipv8:compileTestKotlin FAILED
e: warnings found and -Werror specified
w: /Users/runner/runners/2.168.0/work/trustchain-superapp/trustchain-superapp/kotlin-ipv8/ipv8/src/test/java/nl/tudelft/ipv8/BaseCommunityTest.kt: (21, 2): 'UseExperimental' is deprecated. Please use OptIn instead.
w: /Users/runner/runners/2.168.0/work/trustchain-superapp/trustchain-superapp/kotlin-ipv8/ipv8/src/test/java/nl/tudelft/ipv8/attestation/trustchain/TrustChainCrawlerTest.kt: (19, 2): 'UseExperimental' is deprecated. Please use OptIn instead. 
  • is appearing? I don't think we changed any of that code.

@MattSkala
Copy link
Collaborator

@martijnbosma You updated Kotlin to 1.3.71, in which UseExperimental annotation is deprecated. I'll update kotlin-ipv8 to the latest Kotlin version eventually, but for now if you downgrade to the original version (1.3.61), the warning should disappear.

@MattSkala MattSkala merged commit 0e6eb1b into Tribler:dao Apr 9, 2020
Tim-W added a commit that referenced this pull request Dec 9, 2020
mateicristea88 added a commit to mateicristea88/trustchain-superapp that referenced this pull request Feb 2, 2021
* Completely remove torrentstream-android and replace it with jlibtorrent dependency. Show track download progress per-track in the list.

* Fix seeking and close mediaplayer when end of track is reached

* Make distinction in progress bar to show when a file is fully done

* Change priority of selected track to 6 so that other tracks are still preloaded in the background

* Format upload/download rate DHT stats

* Fix seeking and close mediaplayer when end of track is reached

* Fix TrackLibrary and gradle issues

* Fix downloadProgress being either 0 or 1

* Change default torrent and change progress bars UI

* Set min sdk version to 22, add wan log, manual puncture test

* Update IPv8

* Lower min SDK to 22

* Update coroutines

* Fix lint errors

* Fix readme formatting

* Update ipv8

* Add contact list, ability to add a new contact

* Add conversation, message sending, acknowledgements

* Complete merge and remove dead code

* Add nearby contact exchange via QR code

* Fix lint

* Update IPv8

* Remove duplicate IPv8 overlay and trustchain init

* Implement contact deletion

* Update Gradle

* Select first piece of interested file as interested piece index

* Test

* Move jlibtorrent to the common module

* Retain public key on screen rotation

* Create fast forward/backward and improve UI

* Make Release a fragment and add it programatically. Fix audioplayer play button

* Rewrite Tracks UI, make it a fragment. Overall UI improvements

* Created new fragment structure, with nav graph and a NavGraphHost. MusicService is now the only Acitivity running Libtorrent, the rest of UI and interactions happen on Fragments.

* Add message attachments

* Re-implement torrentstream-android, implement ExoPlayer, implement release overview and routing, implement persistent local database of releases

* Cleanup ReleaseOverviewFragment

* Integrate TrackLibrary with MusicService to reduce complexity and to remove duplicate instance of TorrentSessionManager

* Multiple stability improvements in Release rendering

* Improve stability of torrentStream interactions with Release

* Show track info of selected track

* Select local tracks/paste magnet link combined in one DialogFragment, using a FAB

* Fix playing from local files, improve seeding and do not play immediately the first track without selecting it

* Convert all fetchMagnet results to a static Torrent file, so that they can be seeded continuously by the ContentSeeder, also after app reboots

* Layout

* Code cleanup

* Revert common module change

* Always orientate portrait mode

* Show file progress as much as possible

* Extract TorrentInfoName from magnet link, preload tracks with correct piece priorities, stability improvements

* Optimize import

* Fix message item layout

* Add post feed

* Add like and reply count

* Fix lint errors

* Bump version name

* Implement most functions of RemoteQueryCommunity and Metadata payloads

* Request Trustchain database content for the music app in the background iteratively, from all Trustchain peers

* Handle Searching for Playlists with simple keyword search

* Iteratively crawl trustchains with delays

* Return to stable version of kotlin-ipv8

* Remove dead code

* Fix lint checks

* Move all TrustChain interactions at MusicDAO to its own community: MusicCommunity

* Fix imports

* Fix indents

* Initial addresses for MusicDAO

* Rewrite how ReleaseCoverFragments are added to fix some bugs

* Cleanup

* Cleanup

* Fix port

* Show loading text in ReleaseOverview if there is no content yet

* Show up/download speeds, upgrade TorrentStreamAndroid dependency and use it as an AAR file

* Make full table row clickable in Track

* Improve layout of Track

* Improved Track and Release table layout

* Toggle button in action bar that shows the connectivity stats

* Show when a track is selected, but still buffering

* Optimize imports

* Reduce the amount of AudioPlayer.retry() calls to improve the user experience during track streaming

* Fix TorrentStream-Android dependency issues for Release APK build

* Fix loadingReleases visibility

* Allow for multi-file torrent creation and sharing

* Loading content text in Release

* Improve layout of TrackPlaying fragment

* Re-add track table dividers

* Fix lint errors

* BitcoinJ integration: Wallet fragment, blockchain syncing and public/private keypair generation

* Add tip artist dialog, and handle wallet public keys to be added to TrustChain

* Sending coins to other artists with Android Toasts as feedback messages

* Fix loading text and other issues with Playlist fragment

* Add a BTC/USDT conversion rate from Binance for the user, and fix several issues with TipArtistDialog

* Show tip button only when useful

* Code cleanup

* Fix crashes and navigation issues with searching, improve loading time of MusicService by moving work off main thread

* Remove unused import

* Initial code for fully distributed Keyword Search

* Implement WalletService with RegTest, using a static IP pointing to a DigitalOcean droplet, so we can test BTC transactions

* Fix bug with searching and introduce central config for crypto currency wallet

* Remove INITIAL_ADDRESSES from MusicCommunity because if it is offline the device will send infinite messages

* Fix stability bugs and make WalletService a Singleton

* Fix Toast messages in money transfers

* Change TTL for remote keyword search according to 'good' parameters from scientific experiments

* Add comments and improve layout

* Fix a certain issue with ContentSeeder sessionmanager clashing with TorrentStream sessionmanager

* Organize code into packages

* Move AudioPlayer to top-level

* Move AudioPlayer to own package

* Repackage musicdao

* Upgrade JLibtorrent and add some tests

* Add more tests

* Add many tests and refactor some code

* Optimize imports

* Fix ReleaseFactoryTest, code cleanup and upgrade outdated dep

* Fix issues with ContentSeederTest

* Create bitcoin faucet interactions and change USD conversion to Coins

* Hide Release creation button

* Fix input of Release block and fix Tribler#3

* Fix Tribler#4, add preload mechanics, fix Tribler#4 downloading/buffering progress bars of local tracks

* Only download in ContentSeeder after full completion of Release

* End-to-end functionality for seeding content, sending SwarmHealth messages and sorting playlist overview based on swarm health. Fix Tribler#6

* Push app-debug.apk

* Start WalletService at MusicDAO startup immediately, broadcast blocks to random peers, fixes Tribler#9, Tribler#11

* Fix PlaylistsOverviewFragment causing crashes

* Fix Tribler#15, fix Tribler#10

* Fix various issues with peer gossiping, fix Tribler#16, fix Tribler#11, fix various issues with TorrentStream SessionManager and ContentSeeder SessionManager clashing, fix startup crashes

* Fix Tribler#21

* Fix Tribler#22

* Fix Tribler#22

* Fix all tests and upgrade ipv8 package to 80% line coverage, fix Tribler#24

* Improve IPv8 tests

* Cleanup

* Improve test coverage for ContentSeeder

* Cleanup

* Add libs for CI

* Use Ubuntu build instead of MacOS

* Remove unneeded libs

* New try for CI

* Add JNI libs?

* Revert "Add JNI libs?"
Revert kotlin-ipv8 going in wrong state
This reverts commit 946e8fc

* Fix PostRepository in PeerChat

* Use gradle bash check instead of eskatos gradle command action

* Add libtorrent android libs

* Add more native android files

* Re-add linux jlibtorrent so files

* Add native jlibtorrent linux x86_64 SO file to musicdao/src/main/jniLibs

* Add native jlibtorrent linux x86_64 SO file to musicdao/src/main/jniLibs

* Remove jniLibs from Common

* Fix submodule

* Communicate 3 random blocks to peers every 3 seconds, fix Tribler#18

* Use Home button as back pressed button, fix Tribler#25

* Add cover art and improve layout

* Add cover art and improve layout

* Extract audio metadata using MP3 library

* Fix build

* Fix build

* Fix build

* Fix bug with Release Fragment metadata

* Fix bug with playing current track title

* Use file names instead of MP3 file tags for now

* Use file names instead of MP3 file tags for now

* Fix bug in ReleaseFragment metadata parsing

* Fix bug in ReleaseFragment metadata parsing

* Make stream errors silent errors

* Completely replace TorrentStream-Android by JLibtorrent, new priority system for torrent pieces, fix Tribler#35, fix Tribler#34

* Fix build

* Add DataFeeder

* Move musicdao-datafeeder to its own project

* Do not allow just 1 torrent, also use torrent.added files

* Fix old 2hr+ swarm health messages bug in DataFeeder; try to use custom bootstrap DHT node

* Fix Tribler#36, fix Tribler#33

* Update DataFeeder

* Fix isTorrentCompleted bug

* Fix Tribler#40, fix Tribler#38, fix Tribler#37

* Fix Tribler#41

* Fix test

* Fix build

* Fix build

* Fix build

* Prepare release 0.3

* Add Publish/nopublish option to datafeeder

* Add Publish/nopublish option to datafeeder

* Add Publish/nopublish option to datafeeder

* Add MusicGossipingService: gossiping data now happens continuously in the background, also when app is out of focus

* Bug fix for DataFeeder

* Fix a bug with releaseRefreshCount

* Fix torrent trackers and set high priority on last pieces of selected audio file

* Reduce swarm health battery usage

Co-authored-by: Matouš Skála <skala.matous@gmail.com>
Co-authored-by: Tim W <wissel.tim@gmail.com>
Co-authored-by: Tim Wissel <t.i.wissel@student.tudelft.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants