nervosnetwork / nervosnetwork/fiber

The log at startup is confusing when meet InvalidParameter error

Open
#231 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
59
Forks
31
Avg merge
3d 5h
Merged PRs (30d)
18

Description

After running fnn as per the README instructions, I noticed that a lot of logs were generated, with the last few containing some InvalidParameter("Node announcement message signature verification failed: NodeAnnouncement...) errors. The error logs are quite confusing. Although I can see a log entry like INFO fnn: Starting rpc, but I'm not sure whether it started successfully.

This situation leads me to believe that the error logs represent the issues encountered during startup. If the InvalidParameter error occurs but doesn't affect the functionality, should we consider changing its log level to warn?

  2024-10-15T04:43:19.268249Z  INFO fnn: Starting fiber
    at src/main.rs:106
    in fnn::node with node: ""

  2024-10-15T04:43:19.270177Z  INFO fnn::fiber::network: Started listening tentacle on "/ip4/127.0.0.1/tcp/8228/p2p/QmeTaPHLAGJakm5sGGrFFCanD3QWcwDt7BXtZxuuLJR1Y3", peer id PeerId(QmeTaPHLAGJakm5sGGrFFCanD3QWcwDt7BXtZxuuLJR1Y3), announced addresses ["/ip4/127.0.0.1/tcp/8228/p2p/QmeTaPHLAGJakm5sGGrFFCanD3QWcwDt7BXtZxuuLJR1Y3"]
    at src/fiber/network.rs:3279
    in ractor::actor::Actor with id: "0.2", name: "Network QmeTaPHLAGJakm5sGGrFFCanD3QWcwDt7BXtZxuuLJR1Y3"
    in fnn::node with node: ""

  2024-10-15T04:43:19.740572Z  WARN fnn::ckb::config: Your secret file's permission is not less than 0o600, path: "./ckb/key". Please fix it as soon as possible
    at src/ckb/config.rs:75
    in ractor::actor::Actor with id: "0.3", name: "watchtower"
    in fnn::node with node: ""

  2024-10-15T04:43:19.741063Z  INFO fnn: Starting rpc
    at src/main.rs:227
    in fnn::node with node: ""

  2024-10-15T04:43:20.562574Z  INFO fnn::fiber::network: proto id [ProtocolId(42)] open on session [SessionId(1)], address: [/ip4/54.179.226.154/tcp/8228/p2p/Qmes1EBD4yNo9Ywkfe6eRw9tG1nVNGLDmMud1xJMsoYFKy], type: [Outbound], version: 0.0.1
    at src/fiber/network.rs:3489

  2024-10-15T04:43:20.564037Z  INFO fnn::fiber::network: proto id [ProtocolId(42)] open on session [SessionId(2)], address: [/ip4/54.179.226.154/tcp/18228/p2p/QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV], type: [Outbound], version: 0.0.1
    at src/fiber/network.rs:3489

  2024-10-15T04:43:20.997028Z  INFO fnn::ckb::actor: [ckb] trace transaction Byte32(0x25cb76dfaed974cd6844b2ea53c472efb04ce7ea750e70b20d5ee43ec40aadab) with 1 confs
    at src/ckb/actor.rs:172
    in ractor::actor::Actor with id: "0.1", name: "ckb"

  2024-10-15T04:43:21.699782Z  INFO fnn::ckb::actor: [ckb] trace transaction Byte32(0x25cb76dfaed974cd6844b2ea53c472efb04ce7ea750e70b20d5ee43ec40aadab) with 1 confs
    at src/ckb/actor.rs:172
    in ractor::actor::Actor with id: "0.1", name: "ckb"

  2024-10-15T04:43:22.660656Z ERROR fnn::fiber::network: Failed to process broadcasted message: InvalidParameter("Node announcement message signature verification failed: NodeAnnouncement { signature: Some(EcdsaSignature(3045022100f7c5049ba5b32e4eac0a7f33b92ccdeede4a4706c4ee31104768e6a8ae60400402206f8eae115142881b8a2a521b657369d68b5f93977614ce843ebd12ed38158b13)), features: 0, version: 1728966977389, node_id: Pubkey(PublicKey(8f10cb3b7d65a037d94dd259f5fdcb4dc42d2256ea783a471b1b7118cff9dc13cfd6da3344cefaf30a236728ecc1e21b084a235231977323f89733147a7b6f87)), alias: AnnouncedNodeName(), addresses: [\"/ip4/0.0.0.0/tcp/18228/p2p/QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV\", \"/ip4/54.179.226.154/tcp/18228/p2p/QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV/p2p/QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV\"], chain_hash: Hash256(0x0000000000000000000000000000000000000000000000000000000000000000), auto_accept_min_ckb_funding_amount: 16200000000, udt_cfg_infos: UdtCfgInfos([]) }")
    at src/fiber/network.rs:654
    in ractor::actor::Actor with id: "0.2", name: "Network QmeTaPHLAGJakm5sGGrFFCanD3QWcwDt7BXtZxuuLJR1Y3"

  2024-10-15T04:43:22.660936Z ERROR fnn::fiber::network: Failed to handle ckb network event: Invalid peer message: Failed to process broadcasted message: InvalidParameter("Node announcement message signature verification failed: NodeAnnouncement { signature: Some(EcdsaSignature(3045022100f7c5049ba5b32e4eac0a7f33b92ccdeede4a4706c4ee31104768e6a8ae60400402206f8eae115142881b8a2a521b657369d68b5f93977614ce843ebd12ed38158b13)), features: 0, version: 1728966977389, node_id: Pubkey(PublicKey(8f10cb3b7d65a037d94dd259f5fdcb4dc42d2256ea783a471b1b7118cff9dc13cfd6da3344cefaf30a236728ecc1e21b084a235231977323f89733147a7b6f87)), alias: AnnouncedNodeName(), addresses: [\"/ip4/0.0.0.0/tcp/18228/p2p/QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV\", \"/ip4/54.179.226.154/tcp/18228/p2p/QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV/p2p/QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV\"], chain_hash: Hash256(0x0000000000000000000000000000000000000000000000000000000000000000), auto_accept_min_ckb_funding_amount: 16200000000, udt_cfg_infos: UdtCfgInfos([]) }")
    at src/fiber/network.rs:3399
    in ractor::actor::Actor with id: "0.2", name: "Network QmeTaPHLAGJakm5sGGrFFCanD3QWcwDt7BXtZxuuLJR1Y3"

  2024-10-15T04:43:22.660977Z ERROR fnn::fiber::graph_syncer: Failed to get broadcast messages from peer: InvalidParameter("Node announcement message signature verification failed: NodeAnnouncement { signature: Some(EcdsaSignature(3045022100f7c5049ba5b32e4eac0a7f33b92ccdeede4a4706c4ee31104768e6a8ae60400402206f8eae115142881b8a2a521b657369d68b5f93977614ce843ebd12ed38158b13)), features: 0, version: 1728966977389, node_id: Pubkey(PublicKey(8f10cb3b7d65a037d94dd259f5fdcb4dc42d2256ea783a471b1b7118cff9dc13cfd6da3344cefaf30a236728ecc1e21b084a235231977323f89733147a7b6f87)), alias: AnnouncedNodeName(), addresses: [\"/ip4/0.0.0.0/tcp/18228/p2p/QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV\", \"/ip4/54.179.226.154/tcp/18228/p2p/QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV/p2p/QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV\"], chain_hash: Hash256(0x0000000000000000000000000000000000000000000000000000000000000000), auto_accept_min_ckb_funding_amount: 16200000000, udt_cfg_infos: UdtCfgInfos([]) }")
    at src/fiber/graph_syncer.rs:185
    in ractor::actor::Actor with id: "0.5", name: "Graph syncer to QmdyQWjPtbK4NWWsvy8s69NGJaQULwgeQDT5ZpNDrTNaeV"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the error handling at src/fiber/network.rs:654 and 3399, then review the related propagation at src/fiber/graph_syncer.rs:185. Reproduce the startup logs from the README instructions and determine whether the InvalidParameter messages reflect expected network behavior; done means startup status and the appropriate severity are clear without masking genuine failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking, observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.