HomePhabricator

connman is in charge of pushing messages
3e32cd09f643Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

connman is in charge of pushing messages

The changes here are dense and subtle, but hopefully all is more explicit
than before.

  • CConnman is now in charge of sending data rather than the nodes themselves. This is necessary because many decisions need to be made with all nodes in mind, and a model that requires the nodes calling up to their manager quickly turns to spaghetti.
  • The per-node-serializer (ssSend) has been replaced with a (quasi-)const send-version. Since the send version for serialization can only change once per connection, we now explicitly tag messages with INIT_PROTO_VERSION if they are sent before the handshake. With this done, there's no need to lock for access to nSendVersion.

    Also, a new stream is used for each message, so there's no need to lock during the serialization process.
  • This takes care of accounting for optimistic sends, so the nOptimisticBytesWritten hack can be removed.
  • -dropmessagestest and -fuzzmessagestest have not been preserved, as I suspect they haven't been used in years.

Details

Provenance
Cory Fields <cory-nospam-@coryfields.com>Authored on Sep 13 2016, 00:00
Pieter Wuille <pieter.wuille@gmail.com>Committed on Nov 3 2016, 20:32
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGINGb98c14c4e362: serialization: teach serializers variadics
Branches
Unknown
Tags
Unknown

Event Timeline

Pieter Wuille <pieter.wuille@gmail.com> committed rSTAGING3e32cd09f643: connman is in charge of pushing messages (authored by Cory Fields <cory-nospam-@coryfields.com>).Nov 3 2016, 20:32