Skip to content

channel_state_changed has unknown old_state #8130

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

Open
daywalker90 opened this issue Mar 1, 2025 · 0 comments
Open

channel_state_changed has unknown old_state #8130

daywalker90 opened this issue Mar 1, 2025 · 0 comments
Milestone

Comments

@daywalker90
Copy link
Contributor

When a channel gets opened this notification has old_state: unknown which is not in the json schema and causes an error when plugins like cln-grpc try to decode it.

I've patched cln-grpc locally to show the whole object coming from lightningd:

plugin-cln-grpc: Failed to parse notification Object {\"channel_state_changed\": Object {\"cause\": String(\"user\"), \"channel_id\": String(\"69de94e7b8fff475622a947cfc4bc77cb3a46b053e247eace4bcc4a9cfb23859\"), \"message\": String(\"new channel opened\"), \"new_state\": String(\"CHANNELD_AWAITING_LOCKIN\"), \"old_state\": String(\"unknown\"), \"peer_id\": String(\"022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59\"), \"short_channel_id\": Null, \"timestamp\": String(\"2025-02-28T18:48:34.439Z\")}} from lightningd Error(\"unknown variant `unknown`, expected one of `OPENINGD`, `CHANNELD_AWAITING_LOCKIN`, `CHANNELD_NORMAL`, `CHANNELD_SHUTTING_DOWN`, `CLOSINGD_SIGEXCHANGE`, `CLOSINGD_COMPLETE`, `AWAITING_UNILATERAL`, `FUNDING_SPEND_SEEN`, `ONCHAIN`, `DUALOPEND_OPEN_INIT`, `DUALOPEND_AWAITING_LOCKIN`, `CHANNELD_AWAITING_SPLICE`, `DUALOPEND_OPEN_COMMITTED`, `DUALOPEND_OPEN_COMMIT_READY`\", line: 0, column: 0)

I would have expected old_state to not be present when a channel is opened or even no channel_state_changed notification at all.

@rustyrussell rustyrussell added this to the v25.05 milestone Mar 5, 2025
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

No branches or pull requests

2 participants