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

Added basic query functionality to bandwidth accounting #5689

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

devos50
Copy link
Contributor

@devos50 devos50 commented Oct 27, 2020

This PR extends the bandwidth accounting mechanism with a basic query mechanism. Specifically, this PR:

  • Adds a new query message.
  • Adds a separate settings object where we can quickly change the different parameters of the mechanism. Right now, we do not know what the preferred values of many parameters are, e.g., the speed at which we send out queries. Deployment results will help us to answer this question but for now, I picked a value that I see reasonable.
  • Adds functionality where the transactions of a random peer are periodically queried.
  • Added a setting to store all incoming transactions in the database, even when they belong to the same pair of users. This setting is used by our network crawler.
  • Added a crawler and an accompanying systemd file.

We have verified whether our crawling mechanism works by deploying it on a separate server. So far, it has successfully collected over 700 transactions 👍

Fixes #5676

@devos50 devos50 changed the title Added basic query feature to bandwidth accounting Added basic query functionality to bandwidth accounting Oct 27, 2020
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 9, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@devos50
Copy link
Contributor Author

devos50 commented Nov 9, 2020

retest this please

@devos50 devos50 marked this pull request as ready for review November 9, 2020 14:16
@ghost
Copy link

ghost commented Nov 9, 2020

DeepCode failed to analyze this pull request

Something went wrong despite trying multiple times, sorry about that.
Please comment this pull request with "Retry DeepCode" to manually retry, or contact us so that a human can look into the issue.

from tribler_core.session import Session


class PortAction(argparse.Action):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for argparse usage!

Copy link
Contributor

@ichorid ichorid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect PR! 👍

@devos50 devos50 merged commit 9b7b30c into Tribler:devel Nov 13, 2020
@devos50 devos50 deleted the bw_query branch November 13, 2020 08:38
@synctext
Copy link
Member

synctext commented Nov 19, 2020

To document now:

  • Ledger-Zero
  • more radical design then trustchain!
    • even simpler
    • nearly as simple as tit-for-tat (as light-as-possible)
    • near-zero overhead: no mining, scripting, smart contracts
  • pair-wise t4t focus
  • not useful for Euro, Dollar or Bitcoins natively
    • open question: how efficient is a credits-on-top
    • certain limit and ledger-approach
  • Adds 21st century mathematics and network science to ancient double entry bookkeeping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[devel] Implement a crawling mechanism for our new bandwidth accounting mechanism
4 participants