You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many RPC method implementations in Forest are missing the DESCRIPTION constant, which should provide documentation about what each method does.
Task
Add the DESCRIPTION field to all RPC method implementations throughout the codebase. This will improve API documentation and help users understand what each method does.
Example
implRpcMethod<2>forEthTraceReplayBlockTransactions{constNAME:&'staticstr = "Filecoin.EthTraceReplayBlockTransactions";constNAME_ALIAS:Option<&'staticstr> = Some("trace_replayBlockTransactions");constDESCRIPTION:Option<&'staticstr> = Some("Replays all transactions in a block returning the requested traces for each transaction.",);// ...}
Add the DESCRIPTION constant to all 110 RPC method implementations that are currently missing it across 13 files in src/rpc/methods/. This is a documentation-only change that will improve API documentation by providing human-readable descriptions of what each method does.
Observations
The Forest codebase implements 229 RPC methods across files in src/rpc/methods/. Each method is defined as an enum that implements the RpcMethod<ARITY> trait (defined in src/rpc/reflect/mod.rs). The trait includes an optional DESCRIPTION constant that defaults to None but can be overridden to provide documentation. Currently, 119 methods (52%) have descriptions while 110 methods (48%) are missing them. The DESCRIPTION value flows directly into the OpenRPC specification generation for API documentation.
Create formal style guidelines first, then add descriptions
Follow existing patterns observed in the codebase without creating formal guidelines
Chosen Option: 2
Rationale: Follow existing patterns—descriptions should be action-oriented, start with present tense verbs (Returns, Retrieves, Checks, etc.), and be concise single sentences. This aligns with 119 existing descriptions and avoids scope creep.
Assumption 2: Description Content Sources
Options Considered:
Use only method names and implementation code
Reference Lotus documentation and existing Forest descriptions
Reference FRC-0104 Common Node API specification
Chosen Option: 2
Rationale: Use Lotus documentation as primary reference for standard Filecoin methods, derive Forest-specific method descriptions from implementation code, and use existing well-documented methods as templates. FRC-0104 is referenced indirectly through Lotus docs.
💡 User Tips
Regenerate the plan with different choices with @coderabbitai <feedback>.
Implementation Steps
Phase 1: Small Modules - Foundation Documentation
Add DESCRIPTION to all methods in modules with 1-4 missing descriptions. These quick wins establish the pattern and complete several modules entirely.
Task Numbering Convention: Tasks use flat sequential numbering (Task 1, Task 2, etc.) for unambiguous reference. Phases group related tasks but each task can be referenced and implemented independently.
Task 1: Document Authentication and System Methods
Add descriptions to auth, common, beacon, market, and node modules which are currently 0% documented.
Update src/rpc/methods/auth.rs to add DESCRIPTION for 2 methods: AuthNew ("Creates a new authentication token with the specified permissions"), AuthVerify ("Verifies an authentication token and returns its permissions")
Update src/rpc/methods/common.rs to add DESCRIPTION for 4 methods: Session, Version, Shutdown, StartTime
Update src/rpc/methods/beacon.rs to add DESCRIPTION for 1 method: BeaconGetEntry
Update src/rpc/methods/market.rs to add DESCRIPTION for 1 method: MarketAddBalance
Update src/rpc/methods/node.rs to add DESCRIPTION for 1 method: NodeStatus
Task 2: Document Multisig Methods
Add descriptions to the msig module which is currently 0% documented.
Update src/rpc/methods/msig.rs to add DESCRIPTION for 4 methods: MsigGetAvailableBalance, MsigGetPending, MsigGetVested, MsigGetVestingSchedule
Reference Lotus multisig documentation for accurate descriptions of vesting and balance semantics
🤖 Prompt for AI agents
This phase adds DESCRIPTION constants to small modules (auth, common, beacon,
market, node, msig) to complete foundation documentation. The goal is to
establish consistent patterns and achieve 100% documentation coverage for these
modules.
For each RPC method enum in the following files, add a DESCRIPTION constant:
- src/rpc/methods/auth.rs: Add descriptions for AuthNew and AuthVerify methods
- src/rpc/methods/common.rs: Add descriptions for Session, Version, Shutdown,
and StartTime methods
- src/rpc/methods/beacon.rs: Add description for BeaconGetEntry method
- src/rpc/methods/market.rs: Add description for MarketAddBalance method
- src/rpc/methods/node.rs: Add description for NodeStatus method
- src/rpc/methods/msig.rs: Add descriptions for MsigGetAvailableBalance,
MsigGetPending, MsigGetVested, and MsigGetVestingSchedule methods
Format: const DESCRIPTION: Option<&'static str> = Some("description text");
Style: Use present tense action verbs (Returns, Retrieves, Creates, Verifies,
etc.), keep concise and single-sentence
Reference existing documented methods in the codebase for style consistency
Phase 2: Medium Modules - Core API Documentation
Add DESCRIPTION to modules with 5-12 missing descriptions covering sync, network, wallet, state, and chain operations.
Task 1: Document Sync and Network Methods
Complete documentation for sync and net modules.
Update src/rpc/methods/sync.rs to add DESCRIPTION for 2 methods: SyncCheckBad, SyncMarkBad
Update src/rpc/methods/net.rs to add DESCRIPTION for 5 methods: NetFindPeer, NetListening, NetInfo, NetAutoNatStatus, NetVersion
Use existing NetPeers, NetConnect descriptions as style reference
Task 2: Document Wallet Methods
Add descriptions to the remaining undocumented wallet methods.
Update src/rpc/methods/wallet.rs to add DESCRIPTION for 8 methods: WalletDefaultAddress, WalletExport, WalletImport, WalletNew, WalletSetDefault, WalletValidateAddress, WalletVerify, WalletDelete
Reference existing WalletBalance and WalletSign descriptions for consistent style
Task 3: Document State Query Methods
Add descriptions to the remaining undocumented state methods.
Update src/rpc/methods/state.rs to add DESCRIPTION for 7 methods: StateNetworkName, StateGetReceipt, StateWaitMsgV0, StateFetchRoot, ForestStateCompute, StateSectorPreCommitInfoV0, StateMinerInitialPledgeForSector
This module is already 90% documented; follow existing patterns closely
Task 4: Document Chain Methods
Add descriptions to the remaining undocumented chain methods including Forest-specific exports.
Update src/rpc/methods/chain.rs to add DESCRIPTION for 12 methods including: ChainGetMessagesInTipset, ChainPruneSnapshot, ChainExport, ChainStatObj, ChainGetGenesis, ChainSetHead, ChainGetMinBaseFee, ChainGetTipsetByParentState
Add descriptions for Forest-specific methods: ForestChainExport, ForestChainExportStatus, ForestChainExportCancel, ForestChainExportDiff
Forest-specific methods should note they are Forest extensions not in standard Lotus API
🤖 Prompt for AI agents
This phase adds DESCRIPTION constants to medium-sized modules (sync, net,
wallet, state, chain) covering core API functionality. The goal is to document
essential sync, network, wallet, state query, and chain operations.
For each RPC method enum in the following files, add a DESCRIPTION constant:
- src/rpc/methods/sync.rs: Add descriptions for SyncCheckBad and SyncMarkBad
methods
- src/rpc/methods/net.rs: Add descriptions for NetFindPeer, NetListening,
NetInfo, NetAutoNatStatus, and NetVersion methods
- src/rpc/methods/wallet.rs: Add descriptions for WalletDefaultAddress,
WalletExport, WalletImport, WalletNew, WalletSetDefault, WalletValidateAddress,
WalletVerify, and WalletDelete methods
- src/rpc/methods/state.rs: Add descriptions for StateNetworkName,
StateGetReceipt, StateWaitMsgV0, StateFetchRoot, ForestStateCompute,
StateSectorPreCommitInfoV0, and StateMinerInitialPledgeForSector methods
- src/rpc/methods/chain.rs: Add descriptions for ChainGetMessagesInTipset,
ChainPruneSnapshot, ChainExport, ChainStatObj, ChainGetGenesis, ChainSetHead,
ChainGetMinBaseFee, ChainGetTipsetByParentState, and Forest-specific methods
(ForestChainExport, ForestChainExportStatus, ForestChainExportCancel,
ForestChainExportDiff)
Format: const DESCRIPTION: Option<&'static str> = Some("description text");
Style: Follow existing descriptions in these modules, use present tense action
verbs
Note: Forest-specific methods should indicate they are Forest extensions
Phase 3: Large Modules - Ethereum and F3 Documentation
Add DESCRIPTION to the two largest undocumented modules covering Ethereum compatibility and F3 consensus.
Task 1: Document F3 Consensus Methods
Add descriptions to F3 methods which are critical for understanding Fast Finality consensus.
Update src/rpc/methods/f3.rs to add DESCRIPTION for 20 methods including: GetRawNetworkName, GetTipsetByEpoch, GetTipset, GetHead, GetParent, GetPowerTable, ProtectPeer, GetParticipatingMinerIDs, Finalize, SignMessage
Add descriptions to core Ethereum compatibility methods for basic operations.
Update src/rpc/methods/eth.rs to add DESCRIPTION for basic Eth methods: Web3ClientVersion, EthAccounts, EthBlockNumber, EthChainId, EthSyncing, EthProtocolVersion
Add descriptions to Ethereum filter and subscription methods.
Update src/rpc/methods/eth.rs to add DESCRIPTION for filter methods: EthNewFilter, EthNewPendingTransactionFilter, EthNewBlockFilter, EthUninstallFilter
Add descriptions for subscription methods: EthSubscribe, EthUnsubscribe
Add descriptions for trace methods: EthTraceBlock, EthTraceReplayBlockTransactions, EthTraceFilter, EthTraceTransaction
🤖 Prompt for AI agents
This phase adds DESCRIPTION constants to the largest modules (f3.rs and eth.rs)
covering F3 consensus and Ethereum compatibility. The goal is to document all
remaining methods for Fast Finality consensus and Ethereum JSON-RPC
compatibility layer.
For each RPC method enum in the following files, add a DESCRIPTION constant:
- src/rpc/methods/f3.rs: Add descriptions for 20 methods including
GetRawNetworkName, GetTipsetByEpoch, GetTipset, GetHead, GetParent,
GetPowerTable, ProtectPeer, GetParticipatingMinerIDs, Finalize, SignMessage, and
F3-prefixed methods (F3GetCertificate, F3GetLatestCertificate,
F3GetECPowerTable, F3IsRunning, F3GetProgress, F3GetManifest,
F3ListParticipants, F3GetOrRenewParticipationTicket, F3Participate)
- src/rpc/methods/eth.rs: Add descriptions for all Ethereum compatibility
methods organized by category:
- Core methods: Web3ClientVersion, EthAccounts, EthBlockNumber, EthChainId,
EthSyncing, EthProtocolVersion
- Block methods: EthGetBlockByHash, EthGetBlockByNumber, EthGetBlockByNumberV2,
EthGetBlockReceipts, EthGetBlockReceiptsLimited, EthGetBlockTransactionCount
variants
- Transaction methods: EthGetTransactionByHash, EthGetTransactionByHashLimited,
EthGetTransactionByBlockHashAndIndex, EthGetTransactionByBlockNumberAndIndex,
EthGetTransactionCount, EthGetTransactionCountV2, EthGetTransactionReceipt,
EthGetTransactionReceiptLimited, EthSendRawTransaction,
EthGetMessageCidByTransactionHash
- State/execution methods: EthCall, EthCallV2, EthEstimateGas, EthEstimateGasV2,
EthGetCode, EthGetStorageAt, EthFeeHistory, EthFeeHistoryV2,
EthMaxPriorityFeePerGas, EthGetLogs, EthGetFilterLogs, EthGetFilterChanges
- Filter/subscription methods: EthNewFilter, EthNewPendingTransactionFilter,
EthNewBlockFilter, EthUninstallFilter, EthSubscribe, EthUnsubscribe,
EthTraceBlock, EthTraceReplayBlockTransactions, EthTraceFilter,
EthTraceTransaction
Format: const DESCRIPTION: Option<&'static str> = Some("description text");
Style: Use present tense action verbs, keep concise
Reference: Use implementation code for F3 methods, use standard Ethereum
JSON-RPC docs for Eth methods
🚀 Next Steps
🤖 All AI agent prompts combined
Task: 1
This phase adds DESCRIPTION constants to small modules (auth, common, beacon,
market, node, msig) to complete foundation documentation. The goal is to
establish consistent patterns and achieve 100% documentation coverage for these
modules.
For each RPC method enum in the following files, add a DESCRIPTION constant:
- src/rpc/methods/auth.rs: Add descriptions for AuthNew and AuthVerify methods
- src/rpc/methods/common.rs: Add descriptions for Session, Version, Shutdown,
and StartTime methods
- src/rpc/methods/beacon.rs: Add description for BeaconGetEntry method
- src/rpc/methods/market.rs: Add description for MarketAddBalance method
- src/rpc/methods/node.rs: Add description for NodeStatus method
- src/rpc/methods/msig.rs: Add descriptions for MsigGetAvailableBalance,
MsigGetPending, MsigGetVested, and MsigGetVestingSchedule methods
Format: const DESCRIPTION: Option<&'static str> = Some("description text");
Style: Use present tense action verbs (Returns, Retrieves, Creates, Verifies,
etc.), keep concise and single-sentence
Reference existing documented methods in the codebase for style consistency
===============================================================================
Task: 2
This phase adds DESCRIPTION constants to medium-sized modules (sync, net,
wallet, state, chain) covering core API functionality. The goal is to document
essential sync, network, wallet, state query, and chain operations.
For each RPC method enum in the following files, add a DESCRIPTION constant:
- src/rpc/methods/sync.rs: Add descriptions for SyncCheckBad and SyncMarkBad
methods
- src/rpc/methods/net.rs: Add descriptions for NetFindPeer, NetListening,
NetInfo, NetAutoNatStatus, and NetVersion methods
- src/rpc/methods/wallet.rs: Add descriptions for WalletDefaultAddress,
WalletExport, WalletImport, WalletNew, WalletSetDefault, WalletValidateAddress,
WalletVerify, and WalletDelete methods
- src/rpc/methods/state.rs: Add descriptions for StateNetworkName,
StateGetReceipt, StateWaitMsgV0, StateFetchRoot, ForestStateCompute,
StateSectorPreCommitInfoV0, and StateMinerInitialPledgeForSector methods
- src/rpc/methods/chain.rs: Add descriptions for ChainGetMessagesInTipset,
ChainPruneSnapshot, ChainExport, ChainStatObj, ChainGetGenesis, ChainSetHead,
ChainGetMinBaseFee, ChainGetTipsetByParentState, and Forest-specific methods
(ForestChainExport, ForestChainExportStatus, ForestChainExportCancel,
ForestChainExportDiff)
Format: const DESCRIPTION: Option<&'static str> = Some("description text");
Style: Follow existing descriptions in these modules, use present tense action
verbs
Note: Forest-specific methods should indicate they are Forest extensions
===============================================================================
Task: 3
This phase adds DESCRIPTION constants to the largest modules (f3.rs and eth.rs)
covering F3 consensus and Ethereum compatibility. The goal is to document all
remaining methods for Fast Finality consensus and Ethereum JSON-RPC
compatibility layer.
For each RPC method enum in the following files, add a DESCRIPTION constant:
- src/rpc/methods/f3.rs: Add descriptions for 20 methods including
GetRawNetworkName, GetTipsetByEpoch, GetTipset, GetHead, GetParent,
GetPowerTable, ProtectPeer, GetParticipatingMinerIDs, Finalize, SignMessage, and
F3-prefixed methods (F3GetCertificate, F3GetLatestCertificate,
F3GetECPowerTable, F3IsRunning, F3GetProgress, F3GetManifest,
F3ListParticipants, F3GetOrRenewParticipationTicket, F3Participate)
- src/rpc/methods/eth.rs: Add descriptions for all Ethereum compatibility
methods organized by category:
- Core methods: Web3ClientVersion, EthAccounts, EthBlockNumber, EthChainId,
EthSyncing, EthProtocolVersion
- Block methods: EthGetBlockByHash, EthGetBlockByNumber, EthGetBlockByNumberV2,
EthGetBlockReceipts, EthGetBlockReceiptsLimited, EthGetBlockTransactionCount
variants
- Transaction methods: EthGetTransactionByHash, EthGetTransactionByHashLimited,
EthGetTransactionByBlockHashAndIndex, EthGetTransactionByBlockNumberAndIndex,
EthGetTransactionCount, EthGetTransactionCountV2, EthGetTransactionReceipt,
EthGetTransactionReceiptLimited, EthSendRawTransaction,
EthGetMessageCidByTransactionHash
- State/execution methods: EthCall, EthCallV2, EthEstimateGas, EthEstimateGasV2,
EthGetCode, EthGetStorageAt, EthFeeHistory, EthFeeHistoryV2,
EthMaxPriorityFeePerGas, EthGetLogs, EthGetFilterLogs, EthGetFilterChanges
- Filter/subscription methods: EthNewFilter, EthNewPendingTransactionFilter,
EthNewBlockFilter, EthUninstallFilter, EthSubscribe, EthUnsubscribe,
EthTraceBlock, EthTraceReplayBlockTransactions, EthTraceFilter,
EthTraceTransaction
Format: const DESCRIPTION: Option<&'static str> = Some("description text");
Style: Use present tense action verbs, keep concise
Reference: Use implementation code for F3 methods, use standard Ethereum
JSON-RPC docs for Eth methods
💡 Iterate on the plan with:
@coderabbitai <feedback>
Example Feedback
- @coderabbitai You can skip phase 3. Add a simple unit test case for phase 2.
- @coderabbitai For assumption 1 go ahead with option 3 and replan.
💬 Have feedback or questions? Drop into our discord!
Activity
hanabi1224 commentedon Jan 22, 2026
@coderabbitai could you make a PR for this?
coderabbitai commentedon Jan 22, 2026
Coding Plan
Approach
Add the
DESCRIPTIONconstant to all 110 RPC method implementations that are currently missing it across 13 files insrc/rpc/methods/. This is a documentation-only change that will improve API documentation by providing human-readable descriptions of what each method does.Observations
The Forest codebase implements 229 RPC methods across files in
src/rpc/methods/. Each method is defined as an enum that implements theRpcMethod<ARITY>trait (defined insrc/rpc/reflect/mod.rs). The trait includes an optionalDESCRIPTIONconstant that defaults toNonebut can be overridden to provide documentation. Currently, 119 methods (52%) have descriptions while 110 methods (48%) are missing them. The DESCRIPTION value flows directly into the OpenRPC specification generation for API documentation.Assumptions
Assumption 1: Description Writing Style
Options Considered:
Chosen Option: 2
Rationale: Follow existing patterns—descriptions should be action-oriented, start with present tense verbs (Returns, Retrieves, Checks, etc.), and be concise single sentences. This aligns with 119 existing descriptions and avoids scope creep.
Assumption 2: Description Content Sources
Options Considered:
Chosen Option: 2
Rationale: Use Lotus documentation as primary reference for standard Filecoin methods, derive Forest-specific method descriptions from implementation code, and use existing well-documented methods as templates. FRC-0104 is referenced indirectly through Lotus docs.
💡 User Tips
Regenerate the plan with different choices with
@coderabbitai <feedback>.Implementation Steps
Phase 1: Small Modules - Foundation Documentation
Add DESCRIPTION to all methods in modules with 1-4 missing descriptions. These quick wins establish the pattern and complete several modules entirely.
Task Numbering Convention: Tasks use flat sequential numbering (Task 1, Task 2, etc.) for unambiguous reference. Phases group related tasks but each task can be referenced and implemented independently.
Task 1: Document Authentication and System Methods
Add descriptions to auth, common, beacon, market, and node modules which are currently 0% documented.
src/rpc/methods/auth.rsto add DESCRIPTION for 2 methods: AuthNew ("Creates a new authentication token with the specified permissions"), AuthVerify ("Verifies an authentication token and returns its permissions")src/rpc/methods/common.rsto add DESCRIPTION for 4 methods: Session, Version, Shutdown, StartTimesrc/rpc/methods/beacon.rsto add DESCRIPTION for 1 method: BeaconGetEntrysrc/rpc/methods/market.rsto add DESCRIPTION for 1 method: MarketAddBalancesrc/rpc/methods/node.rsto add DESCRIPTION for 1 method: NodeStatusTask 2: Document Multisig Methods
Add descriptions to the msig module which is currently 0% documented.
src/rpc/methods/msig.rsto add DESCRIPTION for 4 methods: MsigGetAvailableBalance, MsigGetPending, MsigGetVested, MsigGetVestingSchedule🤖 Prompt for AI agents
Phase 2: Medium Modules - Core API Documentation
Add DESCRIPTION to modules with 5-12 missing descriptions covering sync, network, wallet, state, and chain operations.
Task 1: Document Sync and Network Methods
Complete documentation for sync and net modules.
src/rpc/methods/sync.rsto add DESCRIPTION for 2 methods: SyncCheckBad, SyncMarkBadsrc/rpc/methods/net.rsto add DESCRIPTION for 5 methods: NetFindPeer, NetListening, NetInfo, NetAutoNatStatus, NetVersionTask 2: Document Wallet Methods
Add descriptions to the remaining undocumented wallet methods.
src/rpc/methods/wallet.rsto add DESCRIPTION for 8 methods: WalletDefaultAddress, WalletExport, WalletImport, WalletNew, WalletSetDefault, WalletValidateAddress, WalletVerify, WalletDeleteTask 3: Document State Query Methods
Add descriptions to the remaining undocumented state methods.
src/rpc/methods/state.rsto add DESCRIPTION for 7 methods: StateNetworkName, StateGetReceipt, StateWaitMsgV0, StateFetchRoot, ForestStateCompute, StateSectorPreCommitInfoV0, StateMinerInitialPledgeForSectorTask 4: Document Chain Methods
Add descriptions to the remaining undocumented chain methods including Forest-specific exports.
src/rpc/methods/chain.rsto add DESCRIPTION for 12 methods including: ChainGetMessagesInTipset, ChainPruneSnapshot, ChainExport, ChainStatObj, ChainGetGenesis, ChainSetHead, ChainGetMinBaseFee, ChainGetTipsetByParentState🤖 Prompt for AI agents
Phase 3: Large Modules - Ethereum and F3 Documentation
Add DESCRIPTION to the two largest undocumented modules covering Ethereum compatibility and F3 consensus.
Task 1: Document F3 Consensus Methods
Add descriptions to F3 methods which are critical for understanding Fast Finality consensus.
src/rpc/methods/f3.rsto add DESCRIPTION for 20 methods including: GetRawNetworkName, GetTipsetByEpoch, GetTipset, GetHead, GetParent, GetPowerTable, ProtectPeer, GetParticipatingMinerIDs, Finalize, SignMessageTask 2: Document Ethereum RPC Compatibility Methods - Core
Add descriptions to core Ethereum compatibility methods for basic operations.
src/rpc/methods/eth.rsto add DESCRIPTION for basic Eth methods: Web3ClientVersion, EthAccounts, EthBlockNumber, EthChainId, EthSyncing, EthProtocolVersionTask 3: Document Ethereum RPC Compatibility Methods - Transactions
Add descriptions to Ethereum transaction-related methods.
src/rpc/methods/eth.rsto add DESCRIPTION for transaction methods: EthGetTransactionByHash, EthGetTransactionByHashLimited, EthGetTransactionByBlockHashAndIndex, EthGetTransactionByBlockNumberAndIndexTask 4: Document Ethereum RPC Compatibility Methods - State and Execution
Add descriptions to Ethereum state query and execution methods.
src/rpc/methods/eth.rsto add DESCRIPTION for: EthCall, EthCallV2, EthEstimateGas, EthEstimateGasV2, EthGetCode, EthGetStorageAtTask 5: Document Ethereum RPC Compatibility Methods - Filters and Subscriptions
Add descriptions to Ethereum filter and subscription methods.
src/rpc/methods/eth.rsto add DESCRIPTION for filter methods: EthNewFilter, EthNewPendingTransactionFilter, EthNewBlockFilter, EthUninstallFilter🤖 Prompt for AI agents
🚀 Next Steps
🤖 All AI agent prompts combined
💡 Iterate on the plan with:
@coderabbitai <feedback>💬 Have feedback or questions? Drop into our discord!
hanabi1224 commentedon Jan 23, 2026
@coderabbitai please create a PR with task 1
coderabbitai commentedon Jan 23, 2026
I've updated the plan above based on your feedback. Ready to proceed when you are!
feat: add DESCRIPTION to all missing RPC methods (closes ChainSafe#6460)