Skip to content
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

fix(initchain): Enforce stricter handling on InitChain Requests #2413

Merged
merged 4 commits into from
Jan 26, 2025

Conversation

rezbera
Copy link
Contributor

@rezbera rezbera commented Jan 25, 2025

The original code for handling []ValidatorUpdate was copied from CosmosSDK. In our case, the ValidatorUpdate list is ALWAYS expected to be 0 in initChain as we derive the validator set from the deposits directly in InitChain, which is the source of truth.

Therefore, we can remove the additional handling if the len([]ValidatorUpdate) > 0 and simply enforce that it is always zero length, reducing confusion around its purpose

@rezbera rezbera requested a review from a team as a code owner January 25, 2025 18:25
@rezbera rezbera enabled auto-merge (squash) January 25, 2025 18:26
Copy link

codecov bot commented Jan 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 21.17%. Comparing base (419cd66) to head (2537927).
Report is 1 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (419cd66) and HEAD (2537927). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (419cd66) HEAD (2537927)
4 1
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2413      +/-   ##
==========================================
- Coverage   27.08%   21.17%   -5.91%     
==========================================
  Files         351        3     -348     
  Lines       15543       85   -15458     
  Branches       20       20              
==========================================
- Hits         4210       18    -4192     
+ Misses      11130       66   -11064     
+ Partials      203        1     -202     

see 348 files with indirect coverage changes

Copy link
Collaborator

@abi87 abi87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rezbera rezbera merged commit 74489a6 into main Jan 26, 2025
19 checks passed
@rezbera rezbera deleted the cleanup-initchain branch January 26, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants