A scalable, privacy-by-default payment & swap network
A scalable, privacy-by-default payment & swap network
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
!!! 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
# Install to default location (~/.fiber)
curl -sSfL https://raw.githubusercontent.com/nervosnetwork/fiber/main/tools/install/install.sh | bash
# Install mainnet non-interactively with a trusted CKB RPC endpoint
curl -sSfL https://raw.githubusercontent.com/nervosnetwork/fiber/main/tools/install/install.sh | INSTALL_DIR=/opt/fiber FNN_VERSION=0.9.0 NETWORK=mainnet CKB_RPC_URL=https://your-trusted-mainnet-ckb-rpc.example bashMainnet installations do not select a public CKB RPC endpoint automatically.
The guided installer prompts for one; bootstrap or non-interactive installations require
CKB_RPC_URL to be set explicitly.
cargo build --releasemkdir /folder-to/my-fnn
// if you are using the released binary, replace target/release/fnn with the path of released binary
cp target/release/fnn /folder-to/my-fnn
cp config/testnet/config.yml /folder-to/my-fnn
cd /folder-to/my-fnnckb/key. You may use the ckb-cli to generate a new key or export an existing key:mkdir ckb
ckb-cli account export --lock-arg --extended-privkey-path ./ckb/exported-key
// ckb-cli exports master private key and chain code, FNN only needs the private key part
head -n 1 ./ckb/exported-key > ./ckb/key
// the exported key file can be deleted after the private key is extracted
rm ./ckb/exported-keyFIBER_SECRET_KEY_PASSWORD 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 RUST_LOG environment variable—use predefined levels like info, debug, or trace, or specify granular logging with patterns such as info,fnn=debug to enable debug logs only for the FNN module.FIBER_SECRET_KEY_PASSWORD='YOUR_PASSWORD' RUST_LOG='info' ./fnn -c config.yml -d .Fiber release tags publish official container images to Docker Hub at nervos/fiber and mirror the same tags to GHCR at ghcr.io/nervosnetwork/fiber. Detailed Docker usage, including startup, local builds, fnn-cli, and migration, is documented in docker/README.md.
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:
rm -rf /folder-to/my-fnn/fiber/storeIf you want to keep the channel state, check whether your upgrade path supports
in-place migration before replacing binaries. Since v0.9.0, supported storage
migrations are integrated into the fnn startup process, and release bundles no
longer include a standalone fnn-migrate binary.
Stop the node.
Backup the storage folder /folder-to/my-fnn/fiber/store.
Replace the fnn binary with the new version and start the node again.
If the new fnn reports that the database is too old for the built-in migration
path, use the legacy fnn-migrate tool from the matching v0.8.x release first.
For the v0.7.x to v0.8.0 legacy migration flow, see
v0.8.0 Migration Guide.
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.
External funding: ordinary opening timeout is not scheduled after signed submission
Add a LICENSE file and license metadata for the whole repository
A dual-funded UDT channel fails to open with partial funding by the acceptor
Funding tx is rejected for insufficient fees when the acceptor's lock-group witness is still empty
Design: Multi-tenant Hosted LSP support
TxAbort hides local funding failure reason behind generic "funding aborted"
QUIC announced addresses are silently dropped by the private-address filter
Design: Fiber liquidity management milestones
Terminal 0xfe settlement can leave an upstream TLC unreconciled after #1583
Uncommitted RemoteRemoved TLC is skipped during on-chain timeout reconciliation