Skip to content

protect against missing t and c values at genesis#646

Merged
gilescope merged 6 commits into
mainfrom
fix/protect-against-missing-t-and-c
Feb 13, 2026
Merged

protect against missing t and c values at genesis#646
gilescope merged 6 commits into
mainfrom
fix/protect-against-missing-t-and-c

Conversation

@justinfrevert

Copy link
Copy Markdown
Contributor

Overview

🗹 TODO before merging

  • Ready

📌 Submission Checklist

  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason:
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Please describe any additional testing aside from CI:

  • Additional tests are provided (if possible)

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other:
  • N/A

Links

@justinfrevert justinfrevert requested a review from a team as a code owner February 10, 2026 22:02
@github-actions

github-actions Bot commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

kics-logo

KICS version: v2.1.16

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 96
LOW LOW 12
INFO INFO 83
TRACE TRACE 0
TOTAL TOTAL 191
Metric Values
Files scanned placeholder 31
Files parsed placeholder 31
Files failed to scan placeholder 0
Total executed queries placeholder 73
Queries failed to execute placeholder 0
Execution time placeholder 9

gilescope and others added 4 commits February 11, 2026 11:34
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
@gilescope gilescope added this pull request to the merge queue Feb 13, 2026
Merged via the queue into main with commit 78b1b29 Feb 13, 2026
38 checks passed
@gilescope gilescope deleted the fix/protect-against-missing-t-and-c branch February 13, 2026 15:38
gilescope pushed a commit that referenced this pull request Apr 8, 2026
m2ux added a commit that referenced this pull request Apr 13, 2026
Add three tests to pallet-system-parameters verifying that genesis
build panics when Terms and Conditions inputs are incomplete:
- genesis_panics_with_hash_only (URL missing)
- genesis_panics_with_url_only (hash missing)
- genesis_panics_with_no_terms_and_conditions (both missing)

These tests cover the fail-fast .expect() validation added in PR #646
and satisfy the Least Authority audit remediation requirement (PM-22033).
m2ux added a commit that referenced this pull request Apr 13, 2026
Add three tests to pallet-system-parameters verifying that genesis
build panics when Terms and Conditions inputs are incomplete:
- genesis_panics_with_hash_only (URL missing)
- genesis_panics_with_url_only (hash missing)
- genesis_panics_with_no_terms_and_conditions (both missing)

These tests cover the fail-fast .expect() validation added in PR #646
and satisfy the Least Authority audit remediation requirement (PM-22033).

Signed-off-by: Mike Clay <mike.clay@shielded.io>
m2ux added a commit that referenced this pull request Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
m2ux added a commit that referenced this pull request Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
Minhcardanian pushed a commit to Minhcardanian/midnight-node that referenced this pull request Apr 23, 2026
…s input (PM-22033) (midnightntwrk#1215)

* chore: initialize branch for PM-22033 partial terms conditions genesis validation

Made-with: Cursor
Signed-off-by: Mike Clay <mike.clay@shielded.io>

* chore: initialize branch for PM-22033 partial terms conditions genesis validation

Made-with: Cursor
Signed-off-by: Mike Clay <mike.clay@shielded.io>

* test: add #[should_panic] tests for partial T&C genesis validation

Add three tests to pallet-system-parameters verifying that genesis
build panics when Terms and Conditions inputs are incomplete:
- genesis_panics_with_hash_only (URL missing)
- genesis_panics_with_url_only (hash missing)
- genesis_panics_with_no_terms_and_conditions (both missing)

These tests cover the fail-fast .expect() validation added in PR midnightntwrk#646
and satisfy the Least Authority audit remediation requirement (PM-22033).

Signed-off-by: Mike Clay <mike.clay@shielded.io>

* Apply lech's suggestion

* fix: correct test for T&C without D-parameter per LGLO review

Signed-off-by: Mike Clay <mike.clay@shielded.io>
Made-with: Cursor

---------

Signed-off-by: Mike Clay <mike.clay@shielded.io>
Co-authored-by: Squirrel <giles.cope@shielded.io>
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