channeldb: use raw pub keys and signatures directly in vertex/edge structs

In this commit, we make an API change that’s meant to reduce the amount
of garbage we generate when doing pathfinding or syncing nodes with our
latest graph state. Before this commit, we would always have to fully
decode the public key and signatures when reading a edge or vertex
struct. For the edges, we may need several EC operations to fully
decode all the pubkeys. This has been seen to generate a ton of
garbage, as well as slow down path finding a good bit.

To remedy this, we’ll now only ever read the *raw* bytes from disk. In
the event that we actually need to verify a signature (or w/e), only
*then* will we fully decode everything.
This commit is contained in:
Olaoluwa Osuntokun committed 2018-02-06 20:14:31 -08:00
1 parent 850abbbeb5
commit 5e9166e478
4 files changed
+461 -219

No files matched your search

+2 -2
View File
@@ -21,8 +21,8 @@ func TestWaitingProofStore(t *testing.T) {
defer cleanup()
proof1 := NewWaitingProof(true, &lnwire.AnnounceSignatures{
NodeSignature: testSig,
BitcoinSignature: testSig,
NodeSignature: wireSig,
BitcoinSignature: wireSig,
})
store, err := NewWaitingProofStore(db)