Open
Conversation
0a7be53 to
a78adad
Compare
6260f35 to
0cc1451
Compare
0cc1451 to
77251dd
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds fee/payment statistics and history reporting to the Fiber node by persisting forwarding/payment events and exposing new Info-module JSON-RPC methods (plus WASM + CLI surface updates).
Changes:
- Introduces
ForwardingEvent/PaymentEventdata models, new store prefixes, and aChannelEventStorepersistence/query trait with RocksDB implementation and tests. - Adds Info RPC methods:
fee_report,forwarding_history,sent_payment_report,received_payment_report,payment_history, along with JSON types and generated RPC docs. - Wires new RPCs into authorization (biscuit rules) and the WASM wrapper.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/fiber-wasm/src/lib.rs | Passes store into InfoRpcServerImpl constructor for new event-backed RPCs. |
| crates/fiber-wasm/src/api.rs | Extends WASM wrapper generics to include ChannelEventStore for Info RPC. |
| crates/fiber-types/src/schema.rs | Adds store key prefixes for forwarding/payment event namespaces. |
| crates/fiber-types/src/channel.rs | Defines ForwardingEvent, PaymentEventType, and PaymentEvent persisted models. |
| crates/fiber-lib/src/store/tests/store.rs | Adds RocksDB round-trip tests for forwarding/payment event insert/query behavior. |
| crates/fiber-lib/src/store/store_impl/mod.rs | Implements event key/value storage and ChannelEventStore for Store. |
| crates/fiber-lib/src/store/.schema.json | Registers schema hashes for new persisted types. |
| crates/fiber-lib/src/rpc/mod.rs | Extends server store bounds and wires Info RPC constructor with store. |
| crates/fiber-lib/src/rpc/info.rs | Implements new fee/payment report + history RPC methods and core logic helpers. |
| crates/fiber-lib/src/rpc/biscuit.rs | Adds auth rules for the new Info RPC methods. |
| crates/fiber-lib/src/rpc/README.md | Documents new RPC methods and adds new RPC types to generated docs. |
| crates/fiber-lib/src/lib.rs | Minor formatting change (blank line) near timestamp helper. |
| crates/fiber-lib/src/fiber/tests/payment.rs | Asserts PaymentEvent/ForwardingEvent persistence for payment flows. |
| crates/fiber-lib/src/fiber/tests/mod.rs | Registers new fee RPC logic tests module (non-wasm). |
| crates/fiber-lib/src/fiber/tests/fee.rs | Adds unit tests for report/history logic using an in-memory ChannelEventStore mock. |
| crates/fiber-lib/src/fiber/network.rs | Extends network store bounds to include ChannelEventStore. |
| crates/fiber-lib/src/fiber/channel.rs | Records forwarding/payment events on TLC fulfillment paths. |
| crates/fiber-json-types/src/lib.rs | Exports new fee-related JSON-RPC types module. |
| crates/fiber-json-types/src/fee.rs | Defines JSON-RPC request/response/types for fee/payment reports and histories. |
| crates/fiber-cli/src/tests.rs | Adds CLI arg parsing tests for forwarding_history params. |
| Makefile | Bumps migration-check version used by tooling target. |
d9af5c9 to
2720387
Compare
doitian
reviewed
Mar 17, 2026
Member
|
Is this a stacked PR? It contains a lot of code for cli. |
Collaborator
Author
it's show old commits because of |
2720387 to
949b6e7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fee_report: Returns a summary of forwarding fees earned over day/week/month windows,grouped by asset type (CKB and each UDT).
forwarding_history: Returns individual forwarding events with optional time range, asset filter, and pagination.