Bitcoin full node and query server

May 1, 2023

View in context in the libbitcoin Slack #general mirror.

evoskuil05:18
It looks like we can get nearly the full benefit of the no-iostream reader implementations that used above but in a fully generalized manner. The reader/writer/flippers accept an IStream/OStream/IOStream template argument. This isn't required to derive from the std iostream interface, just to implement a subset of it. By implementing the simple subset used by reader and writer, this can be passed into any of the byte or byte reader/writer/flipper implementations and based on a comparison of my ad-hoc reader/writer that cut confirmation time by around 55%, it should be very similar. This supports store serialization, network serialization, header/tx identity hashing, and consensus serialization for signature hashing. Basically everywhere we stream in/out of a fixed buffer. We could also implement a variation for dynamic buffering, but there isn't presently call for it. It looks to be about 1 days work to implement IStream/OStream and one that inherits both (IOStream), including tests. Applying these in the various scenarios is then trivial work, just swapping stream types.