Minisketch and lightning gossip [combined summary]



Individual post summaries: Click here to read the original discussion on the lightning-dev mailing list

Published on: 2018-12-12T23:34:42+00:00


Summary:

In a message shared on Tuesday, December 11th, Rusty Russell introduces a library called minisketch, which he believes could be used for efficient summaries of data in bitcoin transaction gossip. The library's implementation sweet-spot is at 64-bits, making it well-suited for gossip messages. The required size of the minisketch that needs to be sent depends on the number of differences with a peer.One interesting feature of minisketch is that there does not need to be a consensus between peers on the size of the minisketch. Truncated minisketches can regrow into whole ones when thrown back into the ocean. This means that even if different peers have different sizes of minisketches, they can still work together effectively.To optimize the use of minisketch, the author suggests using a direct encoding method for node announcements. This allows for immediate use of an INV-style query or the automatic sending of missing information to peers. The proposed protocol includes various components such as a type (#260), chain hash, latest block hash, and minisketch length.In order to reduce redundancy, the author proposes combining block height and txindex into a "txnumber since block 500,000". This would free up bits for other purposes. The remaining bits can then be used for output number and timestamp. The originator of the message can control these bits to mitigate collisions.Overall, minisketch offers an efficient way to summarize data in bitcoin transaction gossip. Its 64-bit implementation makes it well-suited for this purpose, and its flexibility in terms of size allows for effective collaboration between peers. By utilizing a direct encoding method and optimizing the use of bits, minisketch can be further optimized for performance.


Updated on: 2023-07-31T21:09:21.771989+00:00