You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Genesis validation rejects nil proposer addresses but accepts a non-nil empty slice, including the empty encoded byte string from a genesis file. Treat both empty representations consistently before node startup. No address encoding or consensus rule changes are introduced.
The test covers both nil and non-nil empty slices, plus a non-empty proposer address. It changes startup validation only.
Validation
Command: go test ./pkg/genesis -run TestGenesisRejectsEmptyProposerAddress -count=1.
Summary by CodeRabbit
Bug Fixes
Genesis validation now rejects empty proposer addresses, including zero-length values, and reports that the address cannot be empty.
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 702fc024-deb6-47b5-bf4b-e3b8c5b9a3a6
Commits
Reviewing files that changed from the base of the PR and between f4e1a03 and fa4af43.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Genesis.Validate now rejects proposer addresses with zero length, including non-nil empty slices. A test checks that nil and empty addresses fail validation and a 20-byte address passes.
Genesis validation now rejects empty proposer addresses, including non-nil empty ones, before node startup. The change is narrow and has test coverage, and no merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title 'fix(genesis): reject empty proposer addresses' matches the main change. The summary says Genesis.Validate now rejects empty ProposerAddress values, including non-nil zero-length slices, and…
Description check
The description states the problem: genesis validation rejects nil proposer addresses but accepts a non-nil empty slice. It states the fix, the test coverage (nil, non-nil empty, and a non-empty addre…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title 'fix(genesis): reject empty proposer addresses' matches the main change. The summary says Genesis.Validate now rejects empty ProposerAddress values, including non-nil zero-length slices, and adds a test for this. The title follows the conventional commit format and is specific.
Full details: Description check
Explanation
The description states the problem: genesis validation rejects nil proposer addresses but accepts a non-nil empty slice. It states the fix, the test coverage (nil, non-nil empty, and a non-empty address), and the scope (startup validation only, with no encoding or consensus changes). It gives the exact command used to validate the change. The template asks for an Overview section, and the description provides one. It does not include an issue link or 'Closes #' reference, which the template suggests when an issue exists.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 7cb61991-3978-488e-9760-c3bf3184a701
Commits
Reviewing files that changed from the base of the PR and between e8626b1 and f4e1a03.
Files selected for processing: 2
pkg/genesis/empty_proposer_test.go
pkg/genesis/genesis.go
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Overview
Genesis validation rejects nil proposer addresses but accepts a non-nil empty slice, including the empty encoded byte string from a genesis file. Treat both empty representations consistently before node startup. No address encoding or consensus rule changes are introduced.
The test covers both nil and non-nil empty slices, plus a non-empty proposer address. It changes startup validation only.
Validation
Command:
go test ./pkg/genesis -run TestGenesisRejectsEmptyProposerAddress -count=1.Summary by CodeRabbit