-
Notifications
You must be signed in to change notification settings - Fork 124
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
[morpheus/token] vm limit cpu & disk usage #314
Conversation
I agree that we should make the number of nodes configurable (use args when running the program from the run script rather than hardcoding the change). You should avoid modifying the rate limit configs (those don't actually use/preallocate any CPU/disk). They just prevent the rate limiter from being active (not needed on a local network and can cause instability during stress tests -> still need to figure out recommended numbers for production). |
Configuring with less node generates error woth not enough amount staked. The only stuff related to the consensus I have seen for changing required staked amount is k and alpha parameters. |
I'm just referring to making the hardcoded values I have in the e2e tests (
The consensus parameters are agnostic to the number of nodes actually in the subnet. You shouldn't have to modify any such params. |
This configures the subnets, but I would like to configure also the |
I wouldn't worry about that for now. They aren't really doing anything in the background here and should have very minimal CPU/RAM usage. If you still want to change that to "1" or something, you still wouldn't need to modify any consensus params. |
2d45368
to
5b2b251
Compare
@patrick-ogrady used vars as you suggested. |
&numValidators, | ||
"num-validators", | ||
5, | ||
"number of validators by blockchain", |
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.
nit: per
&numValidators, | ||
"num-validators", | ||
5, | ||
"number of validators by blockchain", |
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.
nit: per
@@ -226,7 +235,7 @@ var _ = ginkgo.BeforeSuite(func() { | |||
|
|||
// Name 5 new validators (which should have BLS key registered) | |||
subnet := []string{} | |||
for i := 1; i <= 5; i++ { | |||
for i := 1; i <= int(numValidators); i++ { |
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.
nit: error if 0
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.
going to check input is > 0
@@ -221,9 +230,9 @@ var _ = ginkgo.BeforeSuite(func() { | |||
// Name 10 new validators (which should have BLS key registered) | |||
subnetA := []string{} | |||
subnetB := []string{} | |||
for i := 1; i <= 10; i++ { | |||
for i := 1; i <= int(numValidators)*2; i++ { |
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.
nit: error if 0
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.
going to check input is > 0
Few nits but otherwise looks great |
@@ -165,6 +165,7 @@ var _ = ginkgo.BeforeSuite(func() { | |||
gomega.Equal(modeFullTest), | |||
gomega.Equal(modeRun), | |||
)) | |||
gomega.Expect(numValidators).Should(gomega.BeNumerically(">", 0)) |
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.
Even better. Nice!
Fixes #312
It looks weird to use
100000
CPUs. I also deleted disk value to use the default one.