Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: extend
consumer_validators
query to return consumer valset before launch #2164feat: extend
consumer_validators
query to return consumer valset before launch #2164Changes from 60 commits
1edbf8e
3ba933f
489cefa
2d2c41e
f2ad00a
c7b5386
010db3a
ecb89c0
758c52f
e055f0f
e692a22
fda23de
1146509
2256ab3
caa91b7
e969fe3
cef3be7
2385aca
8a0ba7d
d6f890a
64ed6e7
1f76f20
f95b248
e40449f
3d5dbb1
8a0b825
96b5706
a9b05a3
1ac674f
739bd21
5e5480f
7c43f6d
73ce1f6
9e4fbde
da3cbb2
e5cbcd0
db8b887
4744bdc
715bbbc
96029ca
8beffdc
ec5ccec
b733bd7
96ef414
7580046
563774b
6992a00
6c551f8
05fd5f3
ad5288d
fca239b
29d790c
a400de1
84565ab
0fc6968
19be098
cc4f6b9
43baef1
06bdfc4
7b48b97
9403c26
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Consider modularizing the logic for computing the validator set.
The logic for computing the validator set is repeated in several places. Consider modularizing it into a separate function to avoid code duplication.
Consider creating a separate function to compute the validator set and reuse it in different parts of the codebase.
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.
Consider modularizing the logic for creating validator response objects.
The logic for creating validator response objects is repeated in several places. Consider modularizing it into a separate function to avoid code duplication.
Consider creating a separate function to create validator response objects and reuse it in different parts of the codebase.
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.
Does this mean that from
spawnTime
till the actual launch, querying consumer validators would return an empty set? Is this what we want? @MSalopekThere 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.
No. Here we have a special case where the spawn time of the consumer chain has elapsed but has never gone through
MakeConsumerGenesis
- which should never happen in production.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.
With permissionless we could have 10k consumer chains wanting to spawn and because we launch the chain in the
BeginBlock
we probably intend to this in batches, e.g., 200 chains launch in block 1, the next 200 chains launch in block 2, etc. So, I guess thespawnTime
might have passed but we have not executedMakeConsumerGenesis
yet. Does that sound reasonable?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.
Updated the logic to check the consumer phase instead of the spawn time to avoid this issue.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.