-
Notifications
You must be signed in to change notification settings - Fork 109
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
go/staking: add minimum balance #4461
Conversation
2611e4e
to
51af43d
Compare
5357209
to
9468d8f
Compare
moving some more out-there ideas to #4466. changes to this PR:
thus:
|
c482a60
to
43f1b5d
Compare
gonna try CI 🙌 |
02dbcd5
to
97341ed
Compare
hm ci is hanging on whatever comes after TestCrashingBackendDoNotInterfere gonna see if I can reproduce that locally 🤦 I can ah. an obvious impact to huge things: pretty much all nodes are dead due to not having any balance when trying to process a registry transaction |
97341ed
to
a4ee675
Compare
fixed a dos risk: there's now a single check for balance >= fee + min balance, shared between check tx and deliver tx. otherwise, an attacker may submit a high-gas-price transaction with fee <= balance < fee + min balance, which would get scheduled with high priority but always abort |
adding a way to mark some methods as exempt from the min balance check. the suggested use is for transactions routinely used by nodes, which (i) commonly have no balance and (ii) are known in the registry system |
7cfefc3
to
20ea0c7
Compare
we discussed more yesterday, and we'd like to extract the configurable minimum balance check, without the method exemptions |
20ea0c7
to
57d8243
Compare
Codecov Report
@@ Coverage Diff @@
## master #4461 +/- ##
==========================================
+ Coverage 68.03% 68.04% +0.01%
==========================================
Files 421 421
Lines 46914 46985 +71
==========================================
+ Hits 31918 31972 +54
- Misses 11050 11067 +17
Partials 3946 3946
Continue to review full report at Codecov.
|
in the process of adding a big e2e test right now it passes, I think because the nodes are registered in the genesis state. if the test would run longer, they'd all fail to re-register |
c8f37ed
to
975789d
Compare
tests added |
975789d
to
5a8b62d
Compare
560000f
to
be44746
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.
You should probably also add checks to the staking state's Transfer
method (used e.g. by roothash.SubmitMsg
transaction method).
a44236e
to
225fee0
Compare
oh thanks. I didn't know there was a separate code path there edit: or rather not, this seems to be a different level of abstraction |
14b7e15
to
fcd05b2
Compare
fcd05b2
to
f267a13
Compare
f267a13
to
893feb3
Compare
writing down some basic thoughts on the idea of a minimum balance (general balance only)
cross reference https://oasisprotocol.clickup.com/t/1zfn2hb
still a lot of problems with this