Class StakingNodeInfo

java.lang.Object
com.google.protobuf.AbstractMessageLite<StakingNodeInfo,StakingNodeInfo.Builder>
com.google.protobuf.GeneratedMessageLite<StakingNodeInfo,StakingNodeInfo.Builder>
com.hedera.hashgraph.sdk.proto.StakingNodeInfo
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, StakingNodeInfoOrBuilder

@Generated public final class StakingNodeInfo extends com.google.protobuf.GeneratedMessageLite<StakingNodeInfo,StakingNodeInfo.Builder> implements StakingNodeInfoOrBuilder
 *
 An Hedera Token Service staking info entity.

 Staking info is per node. Shard and Realm are implied based on the network
 address book entry for this node.
 
Protobuf type proto.StakingNodeInfo
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * An Hedera Token Service staking info entity.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

    com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageLite

    unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
     
    boolean
    * A flag indicating that this node has been removed from this network.
    long
    * The maximum stake to this node that is considered to calculate its weight in the network consensus.
    long
    * The minimum stake, in tinybar, that is required for this node to have a non-zero weight in the network consensus.
    long
    * The entity number of this node.<br/> The shard and realm numbers are implied, based on the network address book entry for this node.
    long
    * The total staking rewards in tinybars that MAY be collected by all accounts staking to the current node after the end of this staking period.
    long
    * A running list of reward amounts for the last 365+1 staking periods (typically a year and a day).
    int
    * A running list of reward amounts for the last 365+1 staking periods (typically a year and a day).
    * A running list of reward amounts for the last 365+1 staking periods (typically a year and a day).
    long
    * The total amount of HBAR staked to this node.
    long
    * The snapshot of stake_to_reward value at the beginning of the current staking period.
    long
    * The sum of balances of all accounts staked to this node, considering only accounts that decline to receive rewards.
    long
    * The sum of balances of all accounts staked to this node, considering only accounts that choose to receive rewards.
    long
    * The amount of staked HBAR from `stake_reward_start` that will have unclaimed rewards due to accounts changing their staking metadata in a way that disqualifies them for the current staking period.
    int
    Deprecated.
    proto.StakingNodeInfo.weight is deprecated.
     
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<StakingNodeInfo>
     

    Methods inherited from class com.google.protobuf.GeneratedMessageLite

    createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Field Details

    • NODE_NUMBER_FIELD_NUMBER

      public static final int NODE_NUMBER_FIELD_NUMBER
      See Also:
    • MIN_STAKE_FIELD_NUMBER

      public static final int MIN_STAKE_FIELD_NUMBER
      See Also:
    • MAX_STAKE_FIELD_NUMBER

      public static final int MAX_STAKE_FIELD_NUMBER
      See Also:
    • STAKE_TO_REWARD_FIELD_NUMBER

      public static final int STAKE_TO_REWARD_FIELD_NUMBER
      See Also:
    • STAKE_TO_NOT_REWARD_FIELD_NUMBER

      public static final int STAKE_TO_NOT_REWARD_FIELD_NUMBER
      See Also:
    • STAKE_REWARD_START_FIELD_NUMBER

      public static final int STAKE_REWARD_START_FIELD_NUMBER
      See Also:
    • UNCLAIMED_STAKE_REWARD_START_FIELD_NUMBER

      public static final int UNCLAIMED_STAKE_REWARD_START_FIELD_NUMBER
      See Also:
    • STAKE_FIELD_NUMBER

      public static final int STAKE_FIELD_NUMBER
      See Also:
    • REWARD_SUM_HISTORY_FIELD_NUMBER

      public static final int REWARD_SUM_HISTORY_FIELD_NUMBER
      See Also:
    • WEIGHT_FIELD_NUMBER

      public static final int WEIGHT_FIELD_NUMBER
      See Also:
    • PENDING_REWARDS_FIELD_NUMBER

      public static final int PENDING_REWARDS_FIELD_NUMBER
      See Also:
    • DELETED_FIELD_NUMBER

      public static final int DELETED_FIELD_NUMBER
      See Also:
  • Method Details

    • getNodeNumber

      public long getNodeNumber()
       *
       The entity number of this node.<br/>
       The shard and realm numbers are implied, based on the network address
       book entry for this node.
       <p>
       This value SHALL be unique within a given shard and realm.<br/>
       This value MAY be repeated across shards and/or realms.
       
      int64 node_number = 1;
      Specified by:
      getNodeNumber in interface StakingNodeInfoOrBuilder
      Returns:
      The nodeNumber.
    • getMinStake

      public long getMinStake()
       *
       The minimum stake, in tinybar, that is required for this node to have a
       non-zero weight in the network consensus.
       <p>
       If the current value of `stake` is below this value, this node SHALL have
       a zero weight in network consensus.
       
      int64 min_stake = 2;
      Specified by:
      getMinStake in interface StakingNodeInfoOrBuilder
      Returns:
      The minStake.
    • getMaxStake

      public long getMaxStake()
       *
       The maximum stake to this node that is considered to calculate its weight
       in the network consensus.
       <p>
       If the current `stake` value is above this limit, the excess staked HBAR
       SHALL NOT be considered when determining consensus weight.
       
      int64 max_stake = 3;
      Specified by:
      getMaxStake in interface StakingNodeInfoOrBuilder
      Returns:
      The maxStake.
    • getStakeToReward

      public long getStakeToReward()
       *
       The sum of balances of all accounts staked to this node, considering only
       accounts that choose to receive rewards.
       
      int64 stake_to_reward = 4;
      Specified by:
      getStakeToReward in interface StakingNodeInfoOrBuilder
      Returns:
      The stakeToReward.
    • getStakeToNotReward

      public long getStakeToNotReward()
       *
       The sum of balances of all accounts staked to this node, considering only
       accounts that decline to receive rewards.
       
      int64 stake_to_not_reward = 5;
      Specified by:
      getStakeToNotReward in interface StakingNodeInfoOrBuilder
      Returns:
      The stakeToNotReward.
    • getStakeRewardStart

      public long getStakeRewardStart()
       *
       The snapshot of stake_to_reward value at the beginning of the current
       staking period.
       <p>
       This is necessary when calculating rewards for the current staking period
       without considering changes to `stake_to_reward` _within_ the current
       staking period.<br/>
       This value SHALL be reset at the beginning of every staking period.
       
      int64 stake_reward_start = 6;
      Specified by:
      getStakeRewardStart in interface StakingNodeInfoOrBuilder
      Returns:
      The stakeRewardStart.
    • getUnclaimedStakeRewardStart

      public long getUnclaimedStakeRewardStart()
       *
       The amount of staked HBAR from `stake_reward_start` that will have
       unclaimed rewards due to accounts changing their staking metadata in a
       way that disqualifies them for the current staking period.
       <p>
       This value SHALL be reset at the beginning of every staking period.
       
      int64 unclaimed_stake_reward_start = 7;
      Specified by:
      getUnclaimedStakeRewardStart in interface StakingNodeInfoOrBuilder
      Returns:
      The unclaimedStakeRewardStart.
    • getStake

      public long getStake()
       *
       The total amount of HBAR staked to this node.
       <p>
       This is sum of stake_to_reward and stake_to_not_reward.<br/>
       If the sum is greater than `max_stake`, then the _effective_ stake
       SHALL be `max_stake`.<br/>
       If the sum is less than `min_stake`, then the _effective_ stake
       SHALL be `0`.
       
      int64 stake = 8;
      Specified by:
      getStake in interface StakingNodeInfoOrBuilder
      Returns:
      The stake.
    • getRewardSumHistoryList

      public List<Long> getRewardSumHistoryList()
       *
       A running list of reward amounts for the last 365+1 staking periods
       (typically a year and a day).
       <p>
       The first element SHALL be the reward up to and including the last full
       period prior to the present reward period.<br/>
       The second element SHALL be the reward up to and including the period
       before the last full period prior to the present period.<br/>
       The list SHALL continue in reverse chronological order until the reward
       history limit is reached.
       
      repeated int64 reward_sum_history = 9;
      Specified by:
      getRewardSumHistoryList in interface StakingNodeInfoOrBuilder
      Returns:
      A list containing the rewardSumHistory.
    • getRewardSumHistoryCount

      public int getRewardSumHistoryCount()
       *
       A running list of reward amounts for the last 365+1 staking periods
       (typically a year and a day).
       <p>
       The first element SHALL be the reward up to and including the last full
       period prior to the present reward period.<br/>
       The second element SHALL be the reward up to and including the period
       before the last full period prior to the present period.<br/>
       The list SHALL continue in reverse chronological order until the reward
       history limit is reached.
       
      repeated int64 reward_sum_history = 9;
      Specified by:
      getRewardSumHistoryCount in interface StakingNodeInfoOrBuilder
      Returns:
      The count of rewardSumHistory.
    • getRewardSumHistory

      public long getRewardSumHistory(int index)
       *
       A running list of reward amounts for the last 365+1 staking periods
       (typically a year and a day).
       <p>
       The first element SHALL be the reward up to and including the last full
       period prior to the present reward period.<br/>
       The second element SHALL be the reward up to and including the period
       before the last full period prior to the present period.<br/>
       The list SHALL continue in reverse chronological order until the reward
       history limit is reached.
       
      repeated int64 reward_sum_history = 9;
      Specified by:
      getRewardSumHistory in interface StakingNodeInfoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The rewardSumHistory at the given index.
    • getWeight

      @Deprecated public int getWeight()
      Deprecated.
      proto.StakingNodeInfo.weight is deprecated. See staking_node_info.proto;l=133
       *
       The consensus weight of this node in the network.
       <p>
       This is recomputed based on the `stake` of this node at midnight UTC of
       each day. If the `stake` of this node at that time is less than
       `min_stake`, then the weight SHALL be 0.<br/>
       <p>
       Given the following:
       <ul>
       <li>The `effective stake` of a single node SHALL be `0` if the node
       `stake` is less than `min_stake`.</li>
       <li>The `effective stake` SHALL be `max_stake` if the node `stake` is
       greater than `max_stake`.</li>
       <li>The `effective stake` SHALL be the actual value of `stake` if
       `min_stake` < `stake` < `max_stake`.</li>
       <li>The `effective network stake` SHALL be calculated as ∑(`effective
       stake` of each node) for all nodes in the network address book.</li>
       </ul>
       <p>
       This field is deprecated and SHALL NOT be used when RosterLifecycle
       is enabled. The weight SHALL be same as the `effective_stake` described above.
       
      int32 weight = 10 [deprecated = true];
      Specified by:
      getWeight in interface StakingNodeInfoOrBuilder
      Returns:
      The weight.
    • getPendingRewards

      public long getPendingRewards()
       *
       The total staking rewards in tinybars that MAY be collected by all
       accounts staking to the current node after the end of this staking
       period.
       <p>
       This SHALL be calculated assuming that no account "renounces" its
       rewards by setting `decline_reward` to true, or is ineligible for
       some other reason.<br/>
       When the current node is deleted, this amount SHALL be subtracted from
       the total pending rewards of all accounts staking to all nodes in the
       network in NetworkStakingRewards.
       
      int64 pending_rewards = 11;
      Specified by:
      getPendingRewards in interface StakingNodeInfoOrBuilder
      Returns:
      The pendingRewards.
    • getDeleted

      public boolean getDeleted()
       *
       A flag indicating that this node has been removed from this network.
       
      bool deleted = 12;
      Specified by:
      getDeleted in interface StakingNodeInfoOrBuilder
      Returns:
      The deleted.
    • parseFrom

      public static StakingNodeInfo parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static StakingNodeInfo parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static StakingNodeInfo parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static StakingNodeInfo parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static StakingNodeInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static StakingNodeInfo parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static StakingNodeInfo parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static StakingNodeInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static StakingNodeInfo parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static StakingNodeInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static StakingNodeInfo parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static StakingNodeInfo parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static StakingNodeInfo.Builder newBuilder()
    • newBuilder

      public static StakingNodeInfo.Builder newBuilder(StakingNodeInfo prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<StakingNodeInfo,StakingNodeInfo.Builder>
    • getDefaultInstance

      public static StakingNodeInfo getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<StakingNodeInfo> parser()