Skip to content

Conversation

@random-zebra
Copy link

Add the number of staked/available coins during last attempt to CStakerStatus.

Remove the following attributes from getstakingstatus output

  • "tiptime"
  • "hashLastStakeAttempt"
  • "heightLastStakeAttempt"
  • "timeLastStakeAttempt"

Add the following attributes to getstakingstatus output:

  • "lastattempt_age" (numeric, seconds since last stake attempt)
  • "lastattempt_depth" (numeric, depth of the block on top of which the last stake attempt was made)
  • "lastattempt_hash" (hex string, hash of the block on top of which the last stake attempt was made)
  • "lastattempt_coins" (numeric, number of stakeable coins available during last stake attempt)
  • "lastattempt_tries" (numeric, number of stakeable coins checked during last stake attempt)
  • "stakeablecoins" (numeric, number of stakeable UTXOs)
  • "stakingbalance" (numeric, PIV value of the stakeable coins, minus reserve balance, if any)
  • "stakesplitthreshold" (numeric, value of the current threshold for stake split)
  • "coldstaking_enabled" ((boolean, whether cold-staking is enabled/disabled in pivx.conf)

@random-zebra random-zebra added this to the 4.1.0 milestone Mar 2, 2020
@random-zebra random-zebra self-assigned this Mar 2, 2020
@akshaynexus
Copy link

does stakingbalance include the coldstaking balance?

@akshaynexus
Copy link

nvm looks like it does

@random-zebra
Copy link
Author

nvm looks like it does

Yes, if -coldstaking is enabled (which is the default)

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far. couple initial comments.

also note that this will conflict slightly with #1373, so one of the PRs will need changes depending on merge order

@random-zebra random-zebra force-pushed the 2020_getstakingstatus branch from 725f37c to cb31cc0 Compare March 4, 2020 09:35
@random-zebra
Copy link
Author

Fixed mnsync check to be more in line with the miner code, and updated release notes as per @Fuzzbawls review.

I suggest to review/merge #1373 first, as it's easier. Will rebase this one afterwards.

@random-zebra random-zebra force-pushed the 2020_getstakingstatus branch from 3857538 to 1375c51 Compare March 11, 2020 09:00
@random-zebra
Copy link
Author

Rebased

remove tiptime, hashLastStakeAttempt, heightLastStakeAttempt,
timeLastStakeAttempt

replace with more manageable
- lastattempt_age
- lastattempt_depth
- lastattempt_hash
- change "stakeablecoins": from boolean value to int (number of
stakeable utxos)
- add "stakingbalance": total (double) PIV value of stakeable coins
@random-zebra random-zebra force-pushed the 2020_getstakingstatus branch from 1375c51 to bb3967f Compare March 18, 2020 00:24
@random-zebra
Copy link
Author

Rebased.

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK bb3967f

@random-zebra random-zebra merged commit d610d01 into PIVX-Project:master Mar 18, 2020
akshaynexus pushed a commit to ZENZO-Ecosystem/ZENZO-Core that referenced this pull request Mar 22, 2020
bb3967f [Trivial][Cleanup] Complete CStakerStatus::SetNull() (random-zebra)
52c36d4 [RPC] Fix mnsync check in getstakingstatus (random-zebra)
993e06e [Doc] Document changes to getstakingstatus output (random-zebra)
ce6069c [RPC] getstakingstatus: add stakesplitthreshold and coldstaking_enabled (random-zebra)
d2985dc [RPC] getstakingstatus: stakeablecoins and stakingbalance (random-zebra)
c9008da [PoS][RPC] Staker Status: Add number of stakeable utxos hashed/available (random-zebra)
fa7df1d [RPC] getstakingstatus: refactor lastAttempt attributes (random-zebra)

Pull request description:

  Add the number of staked/available coins during last attempt to `CStakerStatus`.

  Remove the following attributes from `getstakingstatus` output
   - "tiptime"
   - "hashLastStakeAttempt"
   - "heightLastStakeAttempt"
   - "timeLastStakeAttempt"

  Add the following attributes to `getstakingstatus` output:
    - "lastattempt_age" (numeric, seconds since last stake attempt)
    - "lastattempt_depth" (numeric, depth of the block on top of which the last stake attempt was made)
    - "lastattempt_hash" (hex string, hash of the block on top of which the last stake attempt was made)
    - "lastattempt_coins" (numeric, number of stakeable coins available during last stake attempt)
    - "lastattempt_tries" (numeric, number of stakeable coins checked during last stake attempt)
    - "stakeablecoins" (numeric, number of stakeable UTXOs)
    - "stakingbalance" (numeric, PIV value of the stakeable coins, minus reserve balance, if any)
    - "stakesplitthreshold" (numeric, value of the current threshold for stake split)
    - "coldstaking_enabled" ((boolean, whether cold-staking is enabled/disabled in pivx.conf)

ACKs for top commit:
  Fuzzbawls:
    ACK bb3967f

Tree-SHA512: 3d90cb08043448611498dc90486af5ab8b712851f29a74d1c1cd6372f19b08fba84f6d8e29776e0028ed83209362ea9707121804865d3db2eb96a8082eab10f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants