Repository navigation
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-sinksandunreachable-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.