-
Notifications
You must be signed in to change notification settings - Fork 445
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 simple bandwidth accounting mechanism #5626
Conversation
DeepCode's analysis on #436379 found:
Top issues
👉 View analysis in DeepCode’s Dashboard | Configure the bot |
6116733
to
963ceaf
Compare
src/tribler-core/tribler_core/modules/bandwidth_accounting/database.py
Outdated
Show resolved
Hide resolved
c7c788f
to
bb9f43b
Compare
d532049
to
20e3b24
Compare
0c938cc
to
3374332
Compare
retest this please |
(win64 timed out) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, could you please add a misc
table to the database to identify the schema version? Alternatively, you can embed the schema ID in the filename, something like bandwidth_v1.db
src/tribler-core/tribler_core/modules/bandwidth_accounting/transaction.py
Show resolved
Hide resolved
src/tribler-core/tribler_core/modules/bandwidth_accounting/transaction.py
Outdated
Show resolved
Hide resolved
src/tribler-core/tribler_core/modules/tests/bandwidth_accounting/test_database.py
Show resolved
Hide resolved
src/tribler-core/tribler_core/modules/tunnel/community/triblertunnel_community.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, perfect PR 👍
1a1fe86
to
3124b32
Compare
@ichorid @grimadas @kozlovsky I processed the feedback 👍 Note that I also have started to remove TrustChain constructs. There is currently no point in loading TrustChain, except for the market which is disabled by default. As such, I removed the TrustChain community launcher and a few configuration options. There are, however, still a few things left that would require some more refactoring and changes. For example, the variable that references the (private) key that we are using in most communities is named I also updated the identifiers of the tunnel community, after communicating with @egbertbouman. I will deploy an exit node with the new code after this PR is merged. Finally, the trust graph in the GUI is broken after this PR is merged. @xoriole already confirmed that he will fix this later. |
f6b0845
to
8aef2ef
Compare
src/tribler-core/tribler_core/modules/bandwidth_accounting/database.py
Outdated
Show resolved
Hide resolved
8aef2ef
to
8e997d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine, except for @kozlovsky 's remark.
Win64 tests timeout... (we should really debug this one) |
retest this please |
Converted database to Pony Added timestamp + sequence number
8e997d4
to
436379a
Compare
Kudos, SonarCloud Quality Gate passed!
|
This PR implements a first, simple version of the bandwidth accounting mechanism introduced in #5623. Even though the mechanism is simple, the PR has grown a bit more than I anticipated since I had to also make various GUI changes, and I had to write/improve a few tests.
I also made a few modifications to the trust screen. Specifically, we now only show the evolution of token balances. This simplified the implementation and should be less confusing for the users. Since we only have one line now, I used the Tribler orange for the pen/brush colour 👍
Fixes #5623, fixes #5255
TODO:
Discuss/settle on the tunnel community upgradeWe will do a hard upgrade of the tunnel community for Tribler 7.6. This will include a few breaking changes in the tunnels.Either fix the GUI trust graph or remove it (to be decided)@xoriole will update the trust screen later. I will open a new issue when this PR has been merged.