EconomicsFactory/Economics Removal#3241
Conversation
8b7450e to
80a84f9
Compare
Codecov Report
@@ Coverage Diff @@
## development #3241 +/- ##
===============================================
+ Coverage 80.38% 80.42% +0.03%
===============================================
Files 113 112 -1
Lines 11300 11260 -40
===============================================
- Hits 9084 9056 -28
+ Misses 2216 2204 -12
Flags with carried forward coverage won't be shown. Click here to find out more.
|
0f2590c to
27dc351
Compare
|
|
||
| __min_authorization = TToken.from_units(Economics._default_min_authorization).to_tokens() | ||
|
|
||
| __min_authorization = TToken(40_000, "T").to_tokens() # TODO right spot for this? |
There was a problem hiding this comment.
What's the use for this anyway? The min authorization is whatever is in the contract, and we don't use the nucypher CLI for deployment or staking.
There was a problem hiding this comment.
It's used in a CLI option as a default value - https://github.com/nucypher/nucypher/blob/development/nucypher/cli/options.py#L65 - which is used as an Ursula parameter for specify the seed node minimum stake.
There was a problem hiding this comment.
huh, but I'm wondering why is that a CLI parameter. The only thing that should matter is what's in the contract, so I don't see how a different value can be used
There was a problem hiding this comment.
The CLI parameter allows node to specify a higher stake requirement for its seed node teacher than the minimum (trust mitigation I guess... 🤷), but you are right that perhaps the logic can be reworked so that if a value is not specified, the min value is obtained from the contract.
| def policy_value(application_economics, policy_rate): | ||
| value = policy_rate * application_economics.min_operator_seconds | ||
| def policy_value(policy_rate): | ||
| value = policy_rate * MIN_OPERATOR_SECONDS |
There was a problem hiding this comment.
What does this constant represent?
There was a problem hiding this comment.
It's the minimum amount of time before an operator can be changed. It's representative of the used in the TACoApplication contract.
| __ACCOUNT_CACHE = list() | ||
|
|
||
| # Defaults | ||
| DEFAULT_ECONOMICS = Economics() |
Type of PR:
Required reviews:
What this does:
Removal of obsolete
EconomicsFactory/Economicsclasses.Issues fixed/closed:
Why it's needed:
Notes for reviewers: