AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing nervosnetwork/fiber in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewFiber Network Node Fiber Network Node (FNN) is a reference node implementation of Fiber Network Protocol (FNP). Fiber network is a peer-to-peer payment/swap network (like Lightning Network). We believe payment and swap are the two foundational primitives of finance. Features • **Multiple assets support**, e.g. stable coins, RGB++ assets issued on Bitcoin ledger, and UDT assets issued on CKB ledger; • **Extremely low-cost micropayments**, e.g. 0.0001 cent payment with 0.00000001 cent fee; • **Instant swap between any asset pairs**, as long as there's available channel paths; • **Cross-network asset payment/swap**, e.g. from Lightning network to Fiber network, and vice versa; • **Watchtower support**, make it easier for node operators; • **Multi-hop payment**, anyone can facilitate payments and earn payment fees by running a fiber node and becoming a hop on payment paths; • **Low latency**, e.g. 0.0001 cent payment in your p2p connection latency, e.g. 20ms; • **High throughput**, because transactions are only processed by involved peers, no network consensus required; • **High privacy**, your transactions are only seen by involved peers; • **Based on more advanced cryptographic techniques** to ensure security and privacy, e.g. uses PTLC not HTLC; • **Composable** with other contracts/scripts on CKB; !!! The implementation is still a work-in-progress and will have iterations even after mainnet, please use it with caution and report any issues/limitations in the issue tracker. TODO • [x] Establishing connections with other fiber nodes • [x] Creating and closing fiber channel • [x] Payments over fiber channel (via [fiber-scripts]) • [x] Cross-network asset transfer • [ ] Web-browser friendly runtime • [ ] Programmable conditional payment • [ ] Advanced channel liquidity management • [ ] Atomic multi-path payment Build and run a testnet node • Build the project, if you are using the released binary, you can skip this step: • Create a data folder for the node, then copy the built binary and testnet config file to it: • FNN has the built-in wallet functionality to sign funding transactions, let's create or import a private key first. The private key is stored in the data folder and named . You may use the ckb-cli to generate a new key or export an existing key: • Start the node, by default it will output logs to the console, you may redirect it to a file. Before starting, you must set the environment variable to encrypt the wallet private key file (which was stored in plain text during the previous step). Additionally, you can configure logging verbosity with the environment variable—use predefined levels like , , or , or specify granular logging with patterns such as to enable debug logs only for the FNN module. Testnet compatibility issues FNN is still under development, the protocol and storage format may changed between versions. We strongly recommend you to close the channel before upgrading the node, otherwise, you may lose channel data and funds! • list all channels and close them via RPC. • Stop the node and remove the storage of the node: • Replace the fnn binary with the new version and start the node again. If you want to keep the channel state, you may try to migrate the storage format manually: • Stop the node. • Backup the storage folder . • Run the fnn-migrate (it can be found in the release binary package) to migrate the storage format: • Replace the fnn binary with the new version and start the node again. Documentation • Light Paper • Glossary • RPC Documentation • P2P Message Protocol • Invoice Protocol **We are in an actively developing stage, don't hesitate to report issues or ask for help in the channel of the Nervos dev community.** Testnet deployment information • Testnet Public Nodes User Manual [fiber-scripts]: https://github.com/nervosnetwork/fiber-scripts