Skip to content

feat(core): SignerCkbAlwaysSuccess#449

Merged
Hanssen0 merged 1 commit into
ckb-devrel:devfrom
Hanssen0:feat/signer-always-success
Jul 20, 2026
Merged

feat(core): SignerCkbAlwaysSuccess#449
Hanssen0 merged 1 commit into
ckb-devrel:devfrom
Hanssen0:feat/signer-always-success

Conversation

@Hanssen0

Copy link
Copy Markdown
Member

Copilot AI review requested due to automatic review settings July 20, 2026 18:16
@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for liveccc ready!

Name Link
🔨 Latest commit bfe4d20
🔍 Latest deploy log https://app.netlify.com/projects/liveccc/deploys/6a5e6c0c0dff390008c4b385
😎 Deploy Preview https://deploy-preview-449--liveccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 39 (🟢 up 4 from production)
Accessibility: 88 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for apiccc ready!

Name Link
🔨 Latest commit bfe4d20
🔍 Latest deploy log https://app.netlify.com/projects/apiccc/deploys/6a5e6c0c9288df0008e7673b
😎 Deploy Preview https://deploy-preview-449--apiccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 85 (🔴 down 4 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 95 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for appccc ready!

Name Link
🔨 Latest commit bfe4d20
🔍 Latest deploy log https://app.netlify.com/projects/appccc/deploys/6a5e6c0c0afda3000887ebf8
😎 Deploy Preview https://deploy-preview-449--appccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 67 (🔴 down 16 from production)
Accessibility: 89 (🟢 up 1 from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bfe4d20

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@ckb-ccc/core Minor
@ckb-ccc/did-ckb Patch
@ckb-ccc/eip6963 Patch
@ckb-ccc/joy-id Patch
@ckb-ccc/lumos-patches Patch
@ckb-ccc/nip07 Patch
@ckb-ccc/okx Patch
@ckb-ccc/rei Patch
@ckb-ccc/shell Patch
@ckb-ccc/spore Patch
@ckb-ccc/ssri Patch
@ckb-ccc/type-id Patch
@ckb-ccc/udt Patch
@ckb-ccc/uni-sat Patch
@ckb-ccc/utxo-global Patch
@ckb-ccc/xverse Patch
@ckb-ccc/ccc Patch
ckb-ccc Patch
@ckb-ccc/connector Patch
@ckb-ccc/connector-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ae523bff-3bc8-4b57-a1dd-339bcbe77042

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:

  • ✅ Review completed - (🔄 Check again to review again)
📝 Walkthrough

Walkthrough

Adds and exports SignerCkbAlwaysSuccess, which resolves the AlwaysSuccess address, injects its cell dependency during transaction preparation, performs no signature changes, and includes tests plus a minor release entry.

Changes

Always-success CKB signer

Layer / File(s) Summary
Signer implementation
packages/core/src/signer/ckb/signerCkbAlwaysSuccess.ts
Defines signer metadata, always-connected behavior, internal address resolution, and the AlwaysSuccess lock script address.
Transaction integration and exposure
packages/core/src/signer/ckb/signerCkbAlwaysSuccess.ts, packages/core/src/signer/ckb/index.ts, packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts, .changeset/legal-laws-attend.md
Adds the AlwaysSuccess cell dependency during preparation, preserves transactions during signing, exports the signer, tests behavior, and records a minor release.
Estimated code review effort: 2 (Simple) ~10 minutes

Possibly related PRs

  • ckb-devrel/ccc#446: Aligns with the Signer.prepareTransaction return contract used during fee completion.

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding the new SignerCkbAlwaysSuccess core feature.
Description check ✅ Passed The description matches the required template and includes the contributing guidelines checkbox.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for docsccc ready!

Name Link
🔨 Latest commit bfe4d20
🔍 Latest deploy log https://app.netlify.com/projects/docsccc/deploys/6a5e6c0c4c39a8000834e5e3
😎 Deploy Preview https://deploy-preview-449--docsccc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 71 (🔴 down 16 from production)
Accessibility: 95 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 75 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (2)
packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts (2)

38-39: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert the transaction returned by the second signing call.

The current assertion checks the input object after discarding signTransaction’s return value, so it does not directly verify the public API result.

Proposed test adjustment
-    await signer.signTransaction(signed);
-    expect(signed.cellDeps).toHaveLength(1);
+    const signedAgain = await signer.signTransaction(signed);
+    expect(signedAgain.cellDeps).toHaveLength(1);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts` around lines 38
- 39, Update the test around the second signer.signTransaction call to capture
its returned transaction and assert that result’s cellDeps length, rather than
asserting the original signed input object. Keep the expected length of 1
unchanged.

5-11: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Avoid making unit tests depend on the public testnet.

ClientPublicTestnet and getKnownScript make these tests dependent on remote availability and deployment metadata. Use a mocked/fake client for unit coverage, or classify and isolate this as an integration test.

Also applies to: 28-30

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts` around lines 5 -
11, Update the tests around ClientPublicTestnet, SignerCkbAlwaysSuccess, and
getKnownScript to remove public-testnet and remote deployment dependencies. Use
a mocked or fake client that supplies the expected AlwaysSuccess script data for
unit coverage, or explicitly isolate and classify the test as an integration
test if remote behavior must be retained.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts`:
- Around line 38-39: Update the test around the second signer.signTransaction
call to capture its returned transaction and assert that result’s cellDeps
length, rather than asserting the original signed input object. Keep the
expected length of 1 unchanged.
- Around line 5-11: Update the tests around ClientPublicTestnet,
SignerCkbAlwaysSuccess, and getKnownScript to remove public-testnet and remote
deployment dependencies. Use a mocked or fake client that supplies the expected
AlwaysSuccess script data for unit coverage, or explicitly isolate and classify
the test as an integration test if remote behavior must be retained.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 371b4e2b-d141-4509-8f1e-9e0348607265

📥 Commits

Reviewing files that changed from the base of the PR and between 2bf3eeb and 860b191.

📒 Files selected for processing (4)
  • .changeset/legal-laws-attend.md
  • packages/core/src/signer/ckb/index.ts
  • packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts
  • packages/core/src/signer/ckb/signerCkbAlwaysSuccess.ts

Copilot AI 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.

Pull request overview

This PR introduces a new CKB signer implementation for the well-known always-success lock script, enabling transaction “signing” by ensuring the appropriate cell dependency is present (since the script requires no actual signature).

Changes:

  • Added SignerCkbAlwaysSuccess, a Signer subclass that resolves the always-success lock address and injects its cell dep during transaction preparation.
  • Added Vitest coverage for address/script construction and for ensuring the cell dep is added (and not duplicated) when signing.
  • Exported the new signer from the CKB signer barrel and added a changeset for a minor @ckb-ccc/core release.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/core/src/signer/ckb/signerCkbAlwaysSuccess.ts Implements the always-success signer (address resolution + cell-dep injection).
packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts Adds tests for script args/address and cell-dep behavior during signing.
packages/core/src/signer/ckb/index.ts Re-exports SignerCkbAlwaysSuccess from the CKB signer module.
.changeset/legal-laws-attend.md Declares a minor release for the new signer feature.

Comment thread packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts
Comment thread packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts
Comment thread packages/core/src/signer/ckb/signerCkbAlwaysSuccess.test.ts
@Hanssen0
Hanssen0 merged commit 09042bb into ckb-devrel:dev Jul 20, 2026
18 checks passed
@Hanssen0
Hanssen0 deleted the feat/signer-always-success branch July 20, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants