Deduplicate network messages through `transport::message_filter` (#5277) `nano::transport::message_filter` is now what the network holds as its duplicate filter. It says which messages are deduplicated, publishes and votes, hashes a payload together with what its header says the payload is, and does the locking. `nano::duplicate_filter` under it is a plain table of digests: it takes bytes and a domain the caller picks, knows nothing of blocks or messages and holds no lock. A digest covers the message type and, for a publish, the block type along with the payload, so two kinds of message with equal payloads are two entries. Header flags and versions stay out of it, which keeps a rebroadcast vote a duplicate of the vote. The check moves from `deserialize_message_payload` to `tcp_server`, which reads the header and the payload and was the only caller that filtered. The deserializer takes the digest to put on the message instead of the filter, and `deserialize_message` no longer takes one. `duplicate_filter_enable` in the network config turns deduplication off. `message_filter` has its own test suite, one case of which has several threads insert the same digest at once, and the `tcp_server` tests cover messages with equal payloads, messages that are not deduplicated, a publish the block processor refuses and the config switch. The filter benchmark measures both classes: the plain filter on one thread, as it holds no lock, and `message_filter` on 1 to 16 threads, with the inserts all threads make per second. Its clock scenarios go.
__________
Type: commit
Hash: fe4397213eb8fcf80f59c6e2f0a614b03cf449ee
Created: today
__________
gr0v1ty/nano-node:fe4397213eb8fcf80f59c6e2f0a614b03cf449ee
| Test Case | Status | Duration | Median Deviation | Log | Graph |
|---|---|---|---|---|---|
| No test results available yet. Check the GitHub test run for job status and logs. | |||||