-
Notifications
You must be signed in to change notification settings - Fork 115
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
Optionally require a deposit for registering a runtime #2642
Conversation
6ed5b09
to
0c2b008
Compare
Codecov Report
@@ Coverage Diff @@
## master #2642 +/- ##
==========================================
- Coverage 62.99% 62.81% -0.19%
==========================================
Files 365 365
Lines 34424 34548 +124
==========================================
+ Hits 21686 21701 +15
- Misses 10035 10123 +88
- Partials 2703 2724 +21
Continue to review full report at Codecov.
|
22683ca
to
645e736
Compare
ac97a62
to
ae52c3f
Compare
ae52c3f
to
ce2ed43
Compare
Now also with dynamic runtime E2E tests. |
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.
So there's nothing "wrong" with this from a cursory look, but there is a question about how we want to handle entities that both register a runtime, and operate nodes, since the stake checks are distinct.
Hypothetically say the stake required to operate a node is 3, and the stake required to register a runtime is 2. An entity with a stake of 3 should be able to do one or the other, and not both.
Yeah, I think adding a stateful stake accumulator would be best to solve this in the general case.
|
38a705b
to
81bf702
Compare
Added stateful stake accumulator, PTAL. |
81bf702
to
7b88617
Compare
Previously the EntityID was inferred from the signed runtime descriptor's envelope which was inconvenient. This changes the descriptor to be more in line with what we do for node descriptors. This also prevents entity deregistrations when an entity owns any runtimes.
Previously there was no central place to account for all the parts that need to claim some part of an entity's stake which required approximations all around. This is now changed and a stateful stake accumulator is added to each escrow account. The stake accumulator is used to track stake claims from different apps (currently only the registry). This change also means that node registration will now always require the correct amount of stake.
7b88617
to
ce00a2c
Compare
ce00a2c
to
810c887
Compare
Fixes #2638
Also changes the runtime descriptor to include an explicit
EntityID
and adds a stateful stake accumulator.