Skip to content

Adds sink nodes to the simulator - #56

Open
sr-gi wants to merge 7 commits into
masterfrom
04-26-blackholes
Open

sr-gi wants to merge 7 commits into
masterfrom
04-26-blackholes

Conversation

@sr-gi

@sr-gi sr-gi commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Sinks are nodes that receive the simulated transaction but do not contribute to it's forwarding. Once a sink node receives a transaction, it will keep it and not announce it nor send it to any of its peers. The basically behave like black holes.

Sink nodes can be configured with the new CLI options reachable-sinks and unreachable-sinks. Both options take the percentage of nodes that will be set as sinks (0-100).

When reporting results for setups with sinks, the statistics are built over the reachable set, that is, the nodes that can be reached in the network. Some nodes will therefore be isolated.

sr-gi added 7 commits April 24, 2026 17:37
In rare cases, it could be the case that a node receives a transaction
while already in between of a reconciliation dance, making it add the transaction
to the peer's reconciliation set after the Sketch has been sent, and clearing
the reconciliation set without having actually exchanged the transaction.

Also, re-enables txreconciliations tests that were left commented out after #52
and adds a new tests case to make sure that cannot happen again
Now that reconciliation is going to be done on a connection basis, some things
can be heavily simplified:

Removes `OUTBOUND_FANOUT_THRESHOLD`` and `INBOUND_FANOUT_DESTINATIONS_FRACTION`
conf parameters, they are not used anymore since connections are now fully fanout
or reconciliation.

Similarly, `fanout_targets` is not used anymore. All fanout connections are fanout
targets and all erlay connections are reconciliation targets. This also applies to
anything related to select fanout targets, such as `choose_fanout_targets` and `should_fanout_to`.

Removes the `is_stale` flag from `TxAnnouncement::Scheduled`, since scheduled announcements
cannot go stale anymore. This could happen if a transaction was offered via reconciliation
(was part of a received Sketch) and we had it scheduled for announcement.
Since Erlay connections are full reconciliation now, announcements are not queued for this connections
(everything is shared via reconciliation). Similarly, Sketches and INV cannot get crossed anymore.

The is_erlay flag of Network and Node are both removed, they were pretty much redundant
given the flag peers already have and the one passed by the CLI.

Also removes hyperion/multi-run.sh as it is not usable anymore and graph, as it was part
of unfinished functionality.

Finally, update tests accordingly.
This applies mostly to connect_unreachable, as the candidate set is fixed
for all unreachable nodes (i.e. the reachable nodes set). For connect_reachable,
the candidate set needs to be computed for each node to exclude the other reachable
nodes that have already connected to the target node, so the rejection sampling
approach is more efficient. This is the case as the number of connections between
reachable nodes is fairly small, so the collision rate should also be small
…tion runs in an Erlay network.

The exact number of connections can be controlled with the newly added `--erlay-outbounds` CLI option (defaults to 4).

Instead of having hybrid connections, this maintains the original 8 fanout connections and adds 4 full reconciliation connections.
This connections are slower than the fanout, but add minimal bandwidth usage. Their purpose is as a fallback mechanism if the node
gets eclipsed.

The reconciliation interval (`RECON_REQUEST_INTERVAL`) can now be safely increased if desired, as slow reconciliation is not as
critical anymore.
Sinks are nodes that receive the simulated transaction but do not contribute to it's
forwarding. Once a sink node receives a transaction, it will keep it and not announce it
nor send it to any of its peers. The basically behave like black holes.

Sink nodes can be configured with the new CLI options `reachable-sinks` and `unreachable-sinks`.
Both options take the percentage of nodes that will be set as sinks (0-100).

When reporting results for setups with sinks, the statistics are built over the reachable set,
that is, the nodes that can be reached in the network. Some nodes will therefore be isolated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant