Document and clean up marshalling code #50

issue ryanofsky opened this issue on March 17, 2021
  1. ryanofsky commented at 6:56 PM on March 17, 2021: collaborator

    From https://github.com/bitcoin/bitcoin/pull/19160#issuecomment-800365092, proxy-types marshalling code is hard to read and understand if it's doing the correct thing. I think it can be improved by adding some documentation, also by removing c++11isms (#46), and maybe by making the code less repetitive (same code is pasted repeatedly to deal with raw pointers/shared pointers/unique pointers/optionals, tuples/pairs, map/list/set/vector).

  2. ariard commented at 4:09 PM on July 8, 2021: none

    Eager to help on this issue, to get started what's the fundamental abstraction/types exposed by libmultiprocess ?

    We have :

    • Connection
    • EventLoop
    • ProxyClient
    • ProxyServer
    • Proxy Context
    • ?
  3. ryanofsky commented at 9:30 PM on July 8, 2021: collaborator

    re: https://github.com/chaincodelabs/libmultiprocess/issues/50#issuecomment-876565395

    This issue is really about cleaning up proxy-types code and adding comments internally. It would be especially great to consolidate BuildField/ReadField overloads with if constexpr and describe how to write custom overloads.

    Definitely Connection, EventLoop, etc code could also be cleaned up and documented more, but it is less obvious to me what improvements would be most useful there. I think external code using libmultiprocess can mostly ignore these objects or treat them as opaque. Like if you look at the example code you can see it's declaring an EventLoop and passing it around but only calling 2 methods on it. And there is no reference anywhere in the example code to Connection, ProxyClient, ProxyServer, or ProxyContext. Even bitcoin code is only referencing these things in some kludges. If bitcoin interfaces are cleaned up to have better ownership semantics and no global argsman hacks, bitcoin code doesn't need to use any of these things either. Altnet code should be defining brand new interfaces and also not have to be concerned with these classes.

  4. ryanofsky closed this on Jan 27, 2025

  5. ryanofsky referenced this in commit 3dea1d555a on Jan 27, 2025
  6. bitcoin-core locked this on Jan 27, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 13:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me