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

Restrict bitcoin amounts #908

Merged
merged 2 commits into from
Sep 28, 2021
Merged

Restrict bitcoin amounts #908

merged 2 commits into from
Sep 28, 2021

Conversation

t-bast
Copy link
Collaborator

@t-bast t-bast commented Sep 8, 2021

It doesn't make sense to exchange amounts that exceed the total bitcoin supply, so let's make that an explicit requirement.
Eclair has always enforced this requirement at the wire layer, where messages that use invalid bitcoin amounts are automatically rejected.

It doesn't make sense to exchange amounts that exceed the total bitcoin
supply, so let's make that an explicit requirement.
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Makes sense. Probably a good thing to do on most implementations to ensure overflows aren't possible.

Copy link

@ariard ariard left a comment

Choose a reason for hiding this comment

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

Good to me, I verified hex are correct :)

@m-schmoock
Copy link
Collaborator

m-schmoock commented Sep 27, 2021

I know its pedantic, but when we limit we should use exact amount which would be:

@TheBlueMatt
Copy link
Collaborator

I know its pedantic, but when we limit we should use exact amount which would be:

I don't see why? The point is that it avoids various internal number overflow checks, reducing it by some tiny % isn't going to change that?

@m-schmoock
Copy link
Collaborator

now that you put it that way I agree :D

@t-bast
Copy link
Collaborator Author

t-bast commented Sep 28, 2021

Merging this PR as we had acks from rust-lightning and c-lightning during yesterday's spec meeting.

@t-bast t-bast merged commit e832059 into master Sep 28, 2021
@t-bast t-bast deleted the bitcoin-amount-restrictions branch September 28, 2021 06:33
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.

4 participants