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

Merge unlocked stake outputs #3231

Merged
merged 12 commits into from
Jul 26, 2024
Merged

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

  • After dynamic fees, this will reduce the cost to issue the same transaction.
  • This can reduce low value UTXOs in the P-chain state.

How this works

  • Previously it was possible that we would include multiple staked outputs with the exact same assetID + locktime + owner pairs. This combines those outputs into a single output.

How this was tested

  • Added check that fails on master

@StephenButtolph StephenButtolph self-assigned this Jul 24, 2024
@@ -1103,24 +1104,15 @@ func (b *builder) spend(
)
amountsToBurn[assetID] -= amountToBurn

amountAvalibleToStake := out.Amt - amountToBurn
amountAvailableToStake := out.Amt - amountToBurn
Copy link
Contributor Author

@StephenButtolph StephenButtolph Jul 24, 2024

Choose a reason for hiding this comment

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

typo fix (got in before the sybils!)

Base automatically changed from cleanup-wallet-tests to master July 24, 2024 20:31
@StephenButtolph StephenButtolph added this to the v1.11.11 milestone Jul 25, 2024
@StephenButtolph StephenButtolph added this pull request to the merge queue Jul 26, 2024
Merged via the queue into master with commit 553179e Jul 26, 2024
20 checks passed
@StephenButtolph StephenButtolph deleted the merge-outputs-when-possible branch July 26, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants