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

creates spend witnesses using confirmation range #3918

Merged
merged 1 commit into from
May 12, 2023

Conversation

hughy
Copy link
Contributor

@hughy hughy commented May 12, 2023

Summary

supports creating spends with a confirmation range. if a spend is created with the chain head at some block A and the chain reorgs to block B, then the spends created at block A will be invalid because the commitment won't match the root hash of the notes tree at that note size.

using the note tree size from a confirmed block instead of the current chain head will reduce the likelihood that a reorg will render a spend invalid.

Testing Plan

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes

@hughy hughy force-pushed the feature/ifl-879/spend-confirmations branch from cd4faf5 to 84080ca Compare May 12, 2023 21:11
supports creating spends with a confirmation range. if a spend is created with
the chain head at some block A and the chain reorgs to block B, then the spends
created at block A will be invalid because the commitment won't match the root
hash of the notes tree at that note size.

using the note tree size from a confirmed block instead of the current chain
head will reduce the likelihood that a reorg will render a spend invalid.
@hughy hughy force-pushed the feature/ifl-879/spend-confirmations branch from 84080ca to 9861bd5 Compare May 12, 2023 21:14
@hughy hughy marked this pull request as ready for review May 12, 2023 21:31
@hughy hughy requested a review from a team as a code owner May 12, 2023 21:31
Copy link
Member

@dguenther dguenther left a comment

Choose a reason for hiding this comment

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

Nice! This looks great!

@hughy hughy merged commit e953240 into staging May 12, 2023
@hughy hughy deleted the feature/ifl-879/spend-confirmations branch May 12, 2023 23:39
jowparks pushed a commit that referenced this pull request Jun 21, 2023
supports creating spends with a confirmation range. if a spend is created with
the chain head at some block A and the chain reorgs to block B, then the spends
created at block A will be invalid because the commitment won't match the root
hash of the notes tree at that note size.

using the note tree size from a confirmed block instead of the current chain
head will reduce the likelihood that a reorg will render a spend invalid.
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