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

BOLT#04 : add replay-specific failure_code #1105

Open
Crypt-iQ opened this issue Sep 1, 2023 · 2 comments
Open

BOLT#04 : add replay-specific failure_code #1105

Crypt-iQ opened this issue Sep 1, 2023 · 2 comments

Comments

@Crypt-iQ
Copy link
Contributor

Crypt-iQ commented Sep 1, 2023

There's not currently a defined failure_code to send back when we receive a replayed packet. In LND, we send back an update_fail_malformed_htlc, but there's nothing malformed about the packet. We may not even need to introduce a new code if we can agree on an existing code to send back

@t-bast
Copy link
Collaborator

t-bast commented Sep 4, 2023

Can you clarify in what scenario that would happen? If I understand correctly, you would receive a replayed packet only if one of the previous nodes is malicious, right? Isn't it then completely ok to send them a garbage error (instead of leaking information about the fact that you've detected their replay)?

@Crypt-iQ
Copy link
Contributor Author

Crypt-iQ commented Sep 5, 2023

It could also be if a node isn't malicious and is accidentally replaying a packet -- this happened here lightningnetwork/lnd#5792 (comment). If we were to use a replay-specific code it would've helped to identify the issue sooner. Replays could also happen if a node is malicious though, but in the malicious case, I don't think we're leaking anything that they don't already know. I think it would be good if the spec advised on what to do here rather than each impl rolling their own thing

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

No branches or pull requests

2 participants