Skip to content

Per-channel mutexes #422

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

Closed
TheBlueMatt opened this issue Dec 14, 2019 · 3 comments
Closed

Per-channel mutexes #422

TheBlueMatt opened this issue Dec 14, 2019 · 3 comments
Milestone

Comments

@TheBlueMatt
Copy link
Collaborator

We should move channels into their own mutexes in ChannelManager, both for performance, and to make reasoning about things like #398 easier. I think the correct way is to have per-channel pending_msg_events queue and then have the cross-channel events (forward_htlcs and claimable_htlcs) live in their own mutexes. While we're at it, we should index channel ids by peer pubkeys, fixing #105.

@ariard
Copy link

ariard commented Jun 5, 2020

See slack discussion on high-throughput : https://lightningdevkit.slack.com/archives/CUBTAU938/p1590731602032400

@TheBlueMatt
Copy link
Collaborator Author

Note that if/when we do this we'll probably need to add per-ChannelMonitor locks in ChainMonitor as otherwise we'll just end up bottlenecked on Persister update time.

@TheBlueMatt
Copy link
Collaborator Author

We did this!

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