Skip to content

Split 'can-panic' part of midnight-ledger-helpers - #2106

Merged
LGLO merged 2 commits into
mainfrom
extract-can-panic-to-separate-crate
Sep 10, 2026
Merged

Split 'can-panic' part of midnight-ledger-helpers#2106
LGLO merged 2 commits into
mainfrom
extract-can-panic-to-separate-crate

Conversation

@LGLO

@LGLO LGLO commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Overview

This refactoring stems from a comment on #2080 .

The new crate is not intended to be used with a consensus. Whole 'can-panic' feature went to the new crate, as it is not used by consensus and we can be sure more confident that changes made there won't affect consenus unless someone makes a mistake and changes dependencies graph.

🗹 TODO before merging

  • Ready

📌 Submission Checklist

  • All commits are signed off (git commit -s) for the DCO
  • 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

@LGLO
LGLO requested a review from a team as a code owner September 7, 2026 19:01
@github-actions github-actions Bot added the bot:ai-assisted Authored or substantially edited by an AI agent label Sep 7, 2026
@datadog-official

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a3901715fb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ledger/helpers/unsafe/src/extract_tx_with_context.rs
Comment thread util/toolkit/Cargo.toml Outdated
Comment thread ledger/helpers/unsafe/src/fork/mod.rs
@LGLO
LGLO force-pushed the extract-can-panic-to-separate-crate branch from 9e7e891 to 77ad86a Compare September 8, 2026 05:35
Comment thread ledger/helpers/src/ledger_8/network_id.rs
Comment thread ledger/helpers/src/ledger_9/test_utilities_local.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad8b2e65ca

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ledger/helpers/unsafe/src/extract_tx_with_context.rs
Comment thread ledger/helpers/unsafe/src/ledger_9/wallet/dust.rs
@LGLO
LGLO force-pushed the extract-can-panic-to-separate-crate branch from ad8b2e6 to 3960379 Compare September 8, 2026 07:00
Comment thread ledger/toolkit/Cargo.toml Outdated
gilescope
gilescope previously approved these changes Sep 8, 2026
@LGLO
LGLO force-pushed the extract-can-panic-to-separate-crate branch from 3960379 to 08e7475 Compare September 8, 2026 10:21
@LGLO
LGLO requested a review from gilescope September 8, 2026 19:54
… separate crate.

The can-panic-gated apparatus in midnight-node-ledger-helpers (context/contract/
intent/offer/output/UTXO builders, wallet key management, the v8->v9 fork-replay
helpers) exists solely to hand-build transactions and wallets for the toolkit CLI
and tx generator, plus a few test suites that borrowed it as a dev-dependency.
It never runs on the node's real block-execution path.

Move it into a new midnight-ledger-unsafe-helpers crate so midnight-node-ledger-helpers
shrinks back to the shared/production ledger glue, and drop the can-panic/test-utils
features entirely now that nothing needs the opt-in.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Db7XfYwutBUzrkomMwYuEz
Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
@LGLO
LGLO force-pushed the extract-can-panic-to-separate-crate branch from 08e7475 to f6f01f4 Compare September 8, 2026 20:02
@LGLO
LGLO added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit 1a8471b Sep 10, 2026
38 of 40 checks passed
@LGLO
LGLO deleted the extract-can-panic-to-separate-crate branch September 10, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:ai-assisted Authored or substantially edited by an AI agent skip-changes-check-all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants