Skip to content

routing: maintain in-memory graph for path finding  #5389

@Roasbeef

Description

@Roasbeef

As is, we'll end up going to disk each time we need to do path finding. This is slower due to the memory remappings, and explicit kernel <-> user context switches this causes. In addition, due to the nature of boltdb, if a read transaction is active, all write transactions are blocked, which may slow down other operations.

Rather than seek each time, we should instead retain a simple, minimal (shed all information from the edge not needed for path finding), in-memory graph based off the existing graph interface.

The new data-structure will need to be concurrent safe and also write through any updates of the graph to the on-disk persistent storage. A new flag should be added to gate this behavior.

Metadata

Metadata

Assignees

Labels

P2should be fixed if one has timebeginnerIssues suitable for new developersdatabaseRelated to the database/storage of LNDoptimizationrouting

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions