nervosnetwork / nervosnetwork/fiber
After the node is restarted, restablish cannot handle the status well
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 59
- Forks
- 31
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 18
Description
Bug Report
Current Behavior
After the node is restarted, reestablish cannot handle the status of the channel other than the established situation, cannot reconnect, and cannot continue to update its intermediate status.
node1:
2024-10-23T08:16:38.611115Z INFO fnn::fiber::network: channel c3887d17c51a8306e1ca034f3117d4e830de29922c49c8f29718b1e67252a1e8 reestablished successfully
node2:
2024-10-23T08:16:38.629980Z INFO fnn::fiber::network: channel 0bf33a8529b95345e759e47f7978522aa863a5ee99518aac6c6adef0bd055e97 reestablished successfully
However, the Chanel status of node1 node was in an intermediate state before and could not be reconnected.
2024-10-23T08:16:38.734225Z WARN fnn::fiber::channel: Unhandled reestablish channel message in state CollaboratingFundingTx(CollaboratingFundingTxFlags(PREPARING_LOCAL_TX_COLLABORATION_MSG))
Expected Behavior
For channels in an intermediate state, they can be reconnected and their status can continue to be updated.
Environment
- fiber version: fnn 0.1.0
- Ckb Chain: testnet
- Operating system: Ubuntu 20.04
- Arch: Linux ip-172-31-100-41 6.8.0-1016-aws #17-Ubuntu SMP Mon Sep 2 13:48:07 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
- Installation: Built from source
Additional context/Screenshots
at src/fiber/network.rs:1000
in ractor::actor::Actor with id: "0.2", name: "Network QmRErF9SRUUb4XdABffAM3yA1pgGdTKnKZrRa5a7bjfB2d"
2024-10-23T08:16:38.629155Z INFO fnn::fiber::network: proto id [ProtocolId(42)] open on session [SessionId(5)], address: [/ip4/16.162.99.28/tcp/40444/p2p/QmbkDSCvXe1f6ofaBcC9TiuNQBGAThzMUpJWduqqfETgkr], type: [Inbound], version: 0.0.1
at src/fiber/network.rs:3544
2024-10-23T08:16:38.629980Z INFO fnn::fiber::network: channel 0bf33a8529b95345e759e47f7978522aa863a5ee99518aac6c6adef0bd055e97 reestablished successfully
at src/fiber/network.rs:2803
in ractor::actor::Actor with id: "0.2", name: "Network QmRErF9SRUUb4XdABffAM3yA1pgGdTKnKZrRa5a7bjfB2d"
2024-10-23T08:16:38.734225Z WARN fnn::fiber::channel: Unhandled reestablish channel message in state CollaboratingFundingTx(CollaboratingFundingTxFlags(PREPARING_LOCAL_TX_COLLABORATION_MSG))
at src/fiber/channel.rs:4634
in ractor::actor::Actor with id: "0.8"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/fiber/channel.rs around line 4634, where the unhandled reestablish message is logged for CollaboratingFundingTx, and trace the related reestablish flow in src/fiber/network.rs around lines 1000, 2803, and 3544. Reproduce the restart scenario if possible and inspect how intermediate channel states are handled. Done means a channel in an intermediate state reconnects after restart and continues updating its status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100