Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoS Add RestakeRewards flag to TxnTypeStake #586

Conversation

tholonious
Copy link
Contributor

@tholonious tholonious commented Jul 11, 2023

Changes in this PR:

  • Added a RestakeRewards flag to the Stake txn type and the StakeEntry

Expected flow for staking:

  • When a transactor first stakes, they need to provide a non-zero stake amount
  • Once a transactor has staked, they can add to their stake by submitting a Stake txn with non-zero stake amounts
  • Once a transactor has staked, they can change their RestakeRewards flag by submitting a Stake txn with the new flag value. If the stake amount in the txn is zero, then it won't change the stake amount; if it's non-zero, it will also increase their stake amount

@tholonious
Copy link
Contributor Author

tholonious commented Jul 11, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@tholonious tholonious force-pushed the PoS_Rename_SnapshotGlobalActiveStakeAmountNanos_to_SnapshotValidatorSetTotalStakeAmountNanos branch from 69ff94d to 6c21d7e Compare July 11, 2023 19:24
Base automatically changed from PoS_Rename_SnapshotGlobalActiveStakeAmountNanos_to_SnapshotValidatorSetTotalStakeAmountNanos to feature/pos-staker-snapshotting-and-rewards July 11, 2023 19:26
@tholonious tholonious force-pushed the PoS_Add_RestakeRewards_flag_to_TxnTypeStake branch from baa6765 to cbb4f06 Compare July 11, 2023 19:28
@tholonious tholonious force-pushed the PoS_Add_RestakeRewards_flag_to_TxnTypeStake branch from cbb4f06 to d10a56a Compare July 12, 2023 14:11
@tholonious tholonious requested a review from lazynina July 12, 2023 14:56
@tholonious tholonious marked this pull request as ready for review July 12, 2023 14:56
@tholonious tholonious requested a review from a team as a code owner July 12, 2023 14:56
@tholonious tholonious merged commit eb9832d into feature/pos-staker-snapshotting-and-rewards Jul 12, 2023
@tholonious tholonious deleted the PoS_Add_RestakeRewards_flag_to_TxnTypeStake branch July 12, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants