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

Ensure we always have a collateral input. #2302

Merged
merged 1 commit into from
May 26, 2021
Merged

Conversation

nc6
Copy link
Contributor

@nc6 nc6 commented May 25, 2021

In the case where we require collateral, we need to ensure that at least
one input gets spent, for replay protection purposes. Normally this will
be ensured by a collateral percentage > 0, but just in case, and to make
sure that we can't shoot ourselves in the foot, we check that if the Tx
can fail in 2-phase validation, then we must have at least one
collateral input.

In the case where we require collateral, we need to ensure that at least
one input gets spent, for replay protection purposes. Normally this will
be ensured by a collateral percentage > 0, but just in case, and to make
sure that we can't shoot ourselves in the foot, we check that if the Tx
_can_ fail in 2-phase validation, then we must have at least one
collateral input.
@nc6 nc6 requested a review from JaredCorduan May 25, 2021 14:16
Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

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

Great catch!

@nc6 nc6 merged commit c559e8e into master May 26, 2021
@iohk-bors iohk-bors bot deleted the nc/no-null-collateral branch May 26, 2021 12:18
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