Clarify or Utilize `round` Parameter in `PendingStake` Method

Open
#647 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
solidity
Domain
blockchain

Research direction

Start with the PendingStake method in contracts/bonding/BondingManager.sol around line 935 and review how its round parameter is exposed in the BondingManager interface and documentation. Determine whether the parameter has an intended use; done means either documenting that it is unused and explaining its purpose, or defining and implementing an agreed round-specific behavior.

Written by the indexing model from the issue text.

Description

enhancement

In the PendingStake method of the
BondingManager, the round parameter is currently unused:

https://github.com/livepeer/protocol/blob/e8b6243c48d9db33852310d2aefedd5b1c77b8b6/contracts/bonding/BondingManager.sol#L935

To improve clarity and reduce potential confusion for integrators and developers, I propose one of the following actions:

  1. Update the method description and documentation to explicitly state that the round parameter is currently unused, and clarify its intended purpose (if any future usage is planned).

  2. Upgrade the protocol to make use of the round parameter, if there is an intended use case (e.g., allowing querying of stake at a specific round).

This change will help avoid misinterpretation and make the API more intuitive and self-explanatory for future development and integrations.

Dominant language
JavaScript
Stars
155
Forks
50
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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.

More from livepeer/protocol

All issues in livepeer/protocol

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.