Branch data Line data Source code
1 : : // Copyright (c) 2019-present The Bitcoin Core developers
2 : : // Distributed under the MIT software license, see the accompanying
3 : : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 : :
5 : : #include <chainparams.h>
6 : : #include <hash.h>
7 : : #include <net.h>
8 : : #include <netmessagemaker.h>
9 : : #include <protocol.h>
10 : : #include <test/fuzz/FuzzedDataProvider.h>
11 : : #include <test/fuzz/fuzz.h>
12 : : #include <test/fuzz/util.h>
13 : : #include <test/fuzz/util/reachability.h>
14 : : #include <util/chaintype.h>
15 : : #include <util/check.h>
16 : :
17 : : #include <algorithm>
18 : : #include <cstdint>
19 : : #include <limits>
20 : : #include <optional>
21 : : #include <vector>
22 : :
23 : : namespace {
24 : :
25 : : auto g_all_messages = ALL_NET_MESSAGE_TYPES;
26 : : constexpr ReachabilityGoal V1_TRANSPORT_RECEIVES_COMPLETE_MESSAGE{"v1 transport receives a complete message"};
27 : :
28 : 4 : void initialize_p2p_transport()
29 : : {
30 [ + - + - : 4 : static ECC_Context ecc_context{};
+ - ]
31 : 4 : SelectParams(ChainType::REGTEST);
32 : 4 : std::sort(g_all_messages.begin(), g_all_messages.end());
33 : 4 : }
34 : :
35 : 1 : void initialize_p2p_transport_serialization()
36 : : {
37 : 1 : RegisterReachabilityGoal(V1_TRANSPORT_RECEIVES_COMPLETE_MESSAGE);
38 : 1 : initialize_p2p_transport();
39 : 1 : }
40 : :
41 : : } // namespace
42 : :
43 [ + - ]: 771 : FUZZ_TARGET(p2p_transport_serialization, .init = initialize_p2p_transport_serialization)
44 : : {
45 : : // Construct transports for both sides, with dummy NodeIds.
46 : 295 : V1Transport recv_transport{NodeId{0}};
47 : 295 : V1Transport send_transport{NodeId{1}};
48 : :
49 : 295 : FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
50 : :
51 : 295 : auto checksum_assist = fuzzed_data_provider.ConsumeBool();
52 : 295 : auto magic_bytes_assist = fuzzed_data_provider.ConsumeBool();
53 : 295 : std::vector<uint8_t> mutable_msg_bytes;
54 : :
55 : 295 : auto header_bytes_remaining = CMessageHeader::HEADER_SIZE;
56 [ + + ]: 295 : if (magic_bytes_assist) {
57 [ + - ]: 235 : auto msg_start = Params().MessageStart();
58 [ + + ]: 1175 : for (size_t i = 0; i < CMessageHeader::MESSAGE_SIZE_SIZE; ++i) {
59 [ + - ]: 940 : mutable_msg_bytes.push_back(msg_start[i]);
60 : : }
61 : : header_bytes_remaining -= CMessageHeader::MESSAGE_SIZE_SIZE;
62 : : }
63 : :
64 [ + + ]: 295 : if (checksum_assist) {
65 : 124 : header_bytes_remaining -= CMessageHeader::CHECKSUM_SIZE;
66 : : }
67 : :
68 [ + - ]: 295 : auto header_random_bytes = fuzzed_data_provider.ConsumeBytes<uint8_t>(header_bytes_remaining);
69 [ + - ]: 295 : mutable_msg_bytes.insert(mutable_msg_bytes.end(), header_random_bytes.begin(), header_random_bytes.end());
70 [ + - ]: 295 : auto payload_bytes = fuzzed_data_provider.ConsumeRemainingBytes<uint8_t>();
71 : :
72 [ + + + + ]: 419 : if (checksum_assist && mutable_msg_bytes.size() == CMessageHeader::CHECKSUM_OFFSET) {
73 [ + - ]: 122 : CHash256 hasher;
74 : 122 : unsigned char hsh[32];
75 [ - + + - ]: 122 : hasher.Write(payload_bytes);
76 [ + - ]: 122 : hasher.Finalize(hsh);
77 [ + + ]: 610 : for (size_t i = 0; i < CMessageHeader::CHECKSUM_SIZE; ++i) {
78 [ + - ]: 488 : mutable_msg_bytes.push_back(hsh[i]);
79 : : }
80 : : }
81 : :
82 [ + - ]: 295 : mutable_msg_bytes.insert(mutable_msg_bytes.end(), payload_bytes.begin(), payload_bytes.end());
83 [ - + ]: 295 : std::span<const uint8_t> msg_bytes{mutable_msg_bytes};
84 : 295 : bool received_complete_message{false};
85 [ + + ]: 86874 : while (msg_bytes.size() > 0) {
86 [ + - + + ]: 86379 : if (!recv_transport.ReceivedBytes(msg_bytes)) {
87 : : break;
88 : : }
89 [ + - + + ]: 86284 : if (recv_transport.ReceivedMessageComplete()) {
90 : 73663 : received_complete_message = true;
91 : 73663 : const auto time{NodeClock::time_point::max()};
92 : 73663 : bool reject_message{false};
93 [ + - ]: 73663 : CNetMessage msg = recv_transport.GetReceivedMessage(time, reject_message);
94 [ - + - + ]: 73663 : assert(msg.m_type.size() <= CMessageHeader::MESSAGE_TYPE_SIZE);
95 [ - + - + ]: 73663 : assert(msg.m_raw_message_size <= mutable_msg_bytes.size());
96 [ - + ]: 73663 : assert(msg.m_raw_message_size == CMessageHeader::HEADER_SIZE + msg.m_message_size);
97 [ - + ]: 73663 : assert(msg.m_time == time);
98 : :
99 [ - + + - : 147326 : auto msg2 = NetMsg::Make(msg.m_type, std::span{msg.m_recv});
+ - ]
100 : 73663 : bool queued = send_transport.SetMessageToSend(msg2);
101 [ - + ]: 73663 : assert(queued);
102 : 73663 : std::optional<bool> known_more;
103 : 245931 : while (true) {
104 [ + + ]: 159797 : const auto& [to_send, more, _msg_type] = send_transport.GetBytesToSend(false);
105 [ + + - + ]: 159797 : if (known_more) assert(!to_send.empty() == *known_more);
106 [ + + ]: 159797 : if (to_send.empty()) break;
107 : 86134 : send_transport.MarkBytesSent(to_send.size());
108 : 86134 : known_more = more;
109 : 86134 : }
110 : 147326 : }
111 : : }
112 [ + - ]: 295 : ObserveReachabilityGoal(received_complete_message, V1_TRANSPORT_RECEIVES_COMPLETE_MESSAGE);
113 : 295 : }
114 : :
115 : : namespace {
116 : :
117 : : template<RandomNumberGenerator R>
118 : 2602 : void SimulationTest(Transport& initiator, Transport& responder, R& rng, FuzzedDataProvider& provider)
119 : : {
120 : : // Simulation test with two Transport objects, which send messages to each other, with
121 : : // sending and receiving fragmented into multiple pieces that may be interleaved. It primarily
122 : : // verifies that the sending and receiving side are compatible with each other, plus a few
123 : : // sanity checks. It does not attempt to introduce errors in the communicated data.
124 : :
125 : : // Put the transports in an array for by-index access.
126 : 2602 : const std::array<Transport*, 2> transports = {&initiator, &responder};
127 : :
128 : : // Two vectors representing in-flight bytes. inflight[i] is from transport[i] to transport[!i].
129 : 2602 : std::array<std::vector<uint8_t>, 2> in_flight;
130 : :
131 : : // Two queues with expected messages. expected[i] is expected to arrive in transport[!i].
132 [ + - ]: 2602 : std::array<std::deque<CSerializedNetMsg>, 2> expected;
133 : :
134 : : // Vectors with bytes last returned by GetBytesToSend() on transport[i].
135 : 2602 : std::array<std::vector<uint8_t>, 2> to_send;
136 : :
137 : : // Last returned 'more' values (if still relevant) by transport[i]->GetBytesToSend(), for
138 : : // both have_next_message false and true.
139 : 2602 : std::array<std::optional<bool>, 2> last_more, last_more_next;
140 : :
141 : : // Whether more bytes to be sent are expected on transport[i], before and after
142 : : // SetMessageToSend().
143 : 2602 : std::array<std::optional<bool>, 2> expect_more, expect_more_next;
144 : :
145 : : // Function to consume a message type.
146 : 83250 : auto msg_type_fn = [&]() {
147 : 80648 : uint8_t v = provider.ConsumeIntegral<uint8_t>();
148 [ + + ]: 80648 : if (v == 0xFF) {
149 : : // If v is 0xFF, construct a valid (but possibly unknown) message type from the fuzz
150 : : // data.
151 : 12202 : std::string ret;
152 [ + + ]: 49241 : while (ret.size() < CMessageHeader::MESSAGE_TYPE_SIZE) {
153 : 48150 : char c = provider.ConsumeIntegral<char>();
154 : : // Match the allowed characters in CMessageHeader::IsMessageTypeValid(). Any other
155 : : // character is interpreted as end.
156 [ + + ]: 48150 : if (c < ' ' || c > 0x7E) break;
157 [ + - - + ]: 86280 : ret += c;
158 : : }
159 : : return ret;
160 : 0 : } else {
161 : : // Otherwise, use it as index into the list of known messages.
162 [ - + ]: 68446 : return g_all_messages[v % g_all_messages.size()];
163 : : }
164 : : };
165 : :
166 : : // Function to construct a CSerializedNetMsg to send.
167 [ + + ]: 85852 : auto make_msg_fn = [&](bool first) {
168 : 85852 : CSerializedNetMsg msg;
169 [ + + ]: 85852 : if (first) {
170 : : // Always send a "version" message as first one.
171 [ + - ]: 5204 : msg.m_type = "version";
172 : : } else {
173 [ + - ]: 80648 : msg.m_type = msg_type_fn();
174 : : }
175 : : // Determine size of message to send (limited to 75 kB for performance reasons).
176 : 85852 : size_t size = provider.ConsumeIntegralInRange<uint32_t>(0, 75000);
177 : : // Get payload of message from RNG.
178 : 85852 : msg.data = rng.randbytes(size);
179 : : // Return.
180 : 85852 : return msg;
181 : 0 : };
182 : :
183 : : // The next message to be sent (initially version messages, but will be replaced once sent).
184 [ + - + - : 2602 : std::array<CSerializedNetMsg, 2> next_msg = {
- - ]
185 : : make_msg_fn(/*first=*/true),
186 : : make_msg_fn(/*first=*/true)
187 : : };
188 : :
189 : : // Wrapper around transport[i]->GetBytesToSend() that performs sanity checks.
190 : 1193030 : auto bytes_to_send_fn = [&](int side) -> Transport::BytesToSend {
191 : : // Invoke GetBytesToSend twice (for have_next_message = {false, true}). This function does
192 : : // not modify state (it's const), and only the "more" return value should differ between
193 : : // the calls.
194 : 1190428 : const auto& [bytes, more_nonext, msg_type] = transports[side]->GetBytesToSend(false);
195 [ + + ]: 1190428 : const auto& [bytes_next, more_next, msg_type_next] = transports[side]->GetBytesToSend(true);
196 : : // Compare with expected more.
197 [ + + - + ]: 1190428 : if (expect_more[side].has_value()) assert(!bytes.empty() == *expect_more[side]);
198 : : // Verify consistency between the two results.
199 [ - + ]: 1190428 : assert(std::ranges::equal(bytes, bytes_next));
200 [ - + ]: 1190428 : assert(msg_type == msg_type_next);
201 [ + + - + ]: 1190428 : if (more_nonext) assert(more_next);
202 : : // Compare with previously reported output.
203 [ - + - + ]: 1190428 : assert(to_send[side].size() <= bytes.size());
204 [ - + ]: 1190428 : assert(std::ranges::equal(to_send[side], std::span{bytes}.first(to_send[side].size())));
205 : 1190428 : to_send[side].resize(bytes.size());
206 : 1190428 : std::copy(bytes.begin(), bytes.end(), to_send[side].begin());
207 : : // Remember 'more' results.
208 : 1190428 : last_more[side] = {more_nonext};
209 : 1190428 : last_more_next[side] = {more_next};
210 : : // Return.
211 : 1190428 : return {bytes, more_nonext, msg_type};
212 : : };
213 : :
214 : : // Function to make side send a new message.
215 : 332297 : auto new_msg_fn = [&](int side) {
216 : : // Don't do anything if there are too many unreceived messages already.
217 [ - + + + ]: 329695 : if (expected[side].size() >= 16) return;
218 : : // Try to send (a copy of) the message in next_msg[side].
219 : 325727 : CSerializedNetMsg msg = next_msg[side].Copy();
220 : 325727 : bool queued = transports[side]->SetMessageToSend(msg);
221 : : // Update expected more data.
222 [ + + ]: 325727 : expect_more[side] = expect_more_next[side];
223 [ + + ]: 325727 : expect_more_next[side] = std::nullopt;
224 : : // Verify consistency of GetBytesToSend after SetMessageToSend
225 [ + - ]: 325727 : bytes_to_send_fn(/*side=*/side);
226 [ + + ]: 325727 : if (queued) {
227 : : // Remember that this message is now expected by the receiver.
228 [ + - ]: 80648 : expected[side].emplace_back(std::move(next_msg[side]));
229 : : // Construct a new next message to send.
230 [ + - ]: 161296 : next_msg[side] = make_msg_fn(/*first=*/false);
231 : : }
232 : 325727 : };
233 : :
234 : : // Function to make side send out bytes (if any).
235 : 423691 : auto send_fn = [&](int side, bool everything = false) {
236 [ + + ]: 421089 : const auto& [bytes, more, msg_type] = bytes_to_send_fn(/*side=*/side);
237 : : // Don't do anything if no bytes to send.
238 [ + + ]: 421089 : if (bytes.empty()) return false;
239 [ + + ]: 313578 : size_t send_now = everything ? bytes.size() : provider.ConsumeIntegralInRange<size_t>(0, bytes.size());
240 [ + + ]: 313578 : if (send_now == 0) return false;
241 : : // Add bytes to the in-flight queue, and mark those bytes as consumed.
242 : 271648 : in_flight[side].insert(in_flight[side].end(), bytes.begin(), bytes.begin() + send_now);
243 [ + + ]: 271648 : transports[side]->MarkBytesSent(send_now);
244 : : // If all to-be-sent bytes were sent, move last_more data to expect_more data.
245 [ + + ]: 271648 : if (send_now == bytes.size()) {
246 : 97970 : expect_more[side] = last_more[side];
247 : 97970 : expect_more_next[side] = last_more_next[side];
248 : : }
249 : : // Remove the bytes from the last reported to-be-sent vector.
250 [ - + - + ]: 271648 : assert(to_send[side].size() >= send_now);
251 : 271648 : to_send[side].erase(to_send[side].begin(), to_send[side].begin() + send_now);
252 : : // Verify that GetBytesToSend gives a result consistent with earlier.
253 : 271648 : bytes_to_send_fn(/*side=*/side);
254 : : // Return whether anything was sent.
255 : 271648 : return send_now > 0;
256 : : };
257 : :
258 : : // Function to make !side receive bytes (if any).
259 : 131576 : auto recv_fn = [&](int side, bool everything = false) {
260 : : // Don't do anything if no bytes in flight.
261 [ + + ]: 128974 : if (in_flight[side].empty()) return false;
262 : : // Decide span to receive
263 [ - + ]: 95654 : size_t to_recv_len = in_flight[side].size();
264 [ + + ]: 95654 : if (!everything) to_recv_len = provider.ConsumeIntegralInRange<size_t>(0, to_recv_len);
265 [ - + ]: 95654 : std::span<const uint8_t> to_recv = std::span{in_flight[side]}.first(to_recv_len);
266 : : // Process those bytes
267 [ + + ]: 267618 : while (!to_recv.empty()) {
268 : : size_t old_len = to_recv.size();
269 : 171964 : bool ret = transports[!side]->ReceivedBytes(to_recv);
270 : : // Bytes must always be accepted, as this test does not introduce any errors in
271 : : // communication.
272 [ - + ]: 171964 : assert(ret);
273 : : // Clear cached expected 'more' information: if certainly no more data was to be sent
274 : : // before, receiving bytes makes this uncertain.
275 [ + + ]: 179914 : if (expect_more[!side] == false) expect_more[!side] = std::nullopt;
276 [ + + ]: 172529 : if (expect_more_next[!side] == false) expect_more_next[!side] = std::nullopt;
277 : : // Verify consistency of GetBytesToSend after ReceivedBytes
278 : 171964 : bytes_to_send_fn(/*side=*/!side);
279 : 171964 : bool progress = to_recv.size() < old_len;
280 [ + + ]: 171964 : if (transports[!side]->ReceivedMessageComplete()) {
281 : 80648 : bool reject{false};
282 : 80648 : auto received = transports[!side]->GetReceivedMessage({}, reject);
283 : : // Receiving must succeed.
284 [ - + ]: 80648 : assert(!reject);
285 : : // There must be a corresponding expected message.
286 [ - + ]: 80648 : assert(!expected[side].empty());
287 : : // The m_message_size field must be correct.
288 [ - + - + ]: 80648 : assert(received.m_message_size == received.m_recv.size());
289 : : // The m_type must match what is expected.
290 [ - + ]: 80648 : assert(received.m_type == expected[side].front().m_type);
291 : : // The data must match what is expected.
292 [ - + ]: 80648 : assert(std::ranges::equal(received.m_recv, MakeByteSpan(expected[side].front().data)));
293 : 80648 : expected[side].pop_front();
294 : 80648 : progress = true;
295 : 80648 : }
296 : : // Progress must be made (by processing incoming bytes and/or returning complete
297 : : // messages) until all received bytes are processed.
298 [ - + ]: 171964 : assert(progress);
299 : : }
300 : : // Remove the processed bytes from the in_flight buffer.
301 : 95654 : in_flight[side].erase(in_flight[side].begin(), in_flight[side].begin() + to_recv_len);
302 : : // Return whether anything was received.
303 : 95654 : return to_recv_len > 0;
304 : : };
305 : :
306 : : // Main loop, interleaving new messages, sends, and receives.
307 [ + + + + ]: 856268 : LIMITED_WHILE (provider.remaining_bytes(), 1000) {
308 [ + - ]: 853666 : CallOneOf(provider,
309 : : // (Try to) give the next message to the transport.
310 : 226590 : [&] { new_msg_fn(/*side=*/0); },
311 : 103105 : [&] { new_msg_fn(/*side=*/1); },
312 : : // (Try to) send some bytes from the transport to the network.
313 : 134877 : [&] { send_fn(/*side=*/0); },
314 : 273166 : [&] { send_fn(/*side=*/1); },
315 : : // (Try to) receive bytes from the network, converting to messages.
316 : 61736 : [&] { recv_fn(/*side=*/0); },
317 : 54192 : [&] { recv_fn(/*side=*/1); }
318 : : );
319 : : }
320 : :
321 : : // When we're done, perform sends and receives of existing messages to flush anything already
322 : : // in flight.
323 : : while (true) {
324 : 6523 : bool any = false;
325 [ + - + + ]: 6523 : if (send_fn(/*side=*/0, /*everything=*/true)) any = true;
326 [ + - + + ]: 6523 : if (send_fn(/*side=*/1, /*everything=*/true)) any = true;
327 [ + - + + ]: 6523 : if (recv_fn(/*side=*/0, /*everything=*/true)) any = true;
328 [ + - + + ]: 6523 : if (recv_fn(/*side=*/1, /*everything=*/true)) any = true;
329 [ + + ]: 6523 : if (!any) break;
330 : : }
331 : :
332 : : // Make sure nothing is left in flight.
333 [ - + ]: 2602 : assert(in_flight[0].empty());
334 [ - + ]: 2602 : assert(in_flight[1].empty());
335 : :
336 : : // Make sure all expected messages were received.
337 [ - + ]: 2602 : assert(expected[0].empty());
338 [ - + ]: 2602 : assert(expected[1].empty());
339 : :
340 : : // Compare session IDs.
341 [ - + ]: 2602 : assert(transports[0]->GetInfo().session_id == transports[1]->GetInfo().session_id);
342 : 10408 : }
343 : :
344 : 1781 : std::unique_ptr<Transport> MakeV1Transport(NodeId nodeid) noexcept
345 : : {
346 [ - + ]: 1781 : return std::make_unique<V1Transport>(nodeid);
347 : : }
348 : :
349 : : template<RandomNumberGenerator RNG>
350 : 3929 : std::unique_ptr<Transport> MakeV2Transport(NodeId nodeid, bool initiator, RNG& rng, FuzzedDataProvider& provider)
351 : : {
352 : : // Retrieve key
353 [ + + ]: 3929 : auto key = ConsumePrivateKey(provider);
354 [ + + ]: 3929 : if (!key.IsValid()) return {};
355 : : // Construct garbage
356 : 3661 : size_t garb_len = provider.ConsumeIntegralInRange<size_t>(0, V2Transport::MAX_GARBAGE_LEN);
357 : 3661 : std::vector<uint8_t> garb;
358 [ + + ]: 3661 : if (garb_len <= 64) {
359 : : // When the garbage length is up to 64 bytes, read it directly from the fuzzer input.
360 [ + - ]: 2460 : garb = provider.ConsumeBytes<uint8_t>(garb_len);
361 [ + - ]: 1230 : garb.resize(garb_len);
362 : : } else {
363 : : // If it's longer, generate it from the RNG. This avoids having large amounts of
364 : : // (hopefully) irrelevant data needing to be stored in the fuzzer data.
365 : 2431 : garb = rng.randbytes(garb_len);
366 : : }
367 : : // Retrieve entropy
368 [ + - ]: 3661 : auto ent = provider.ConsumeBytes<std::byte>(32);
369 [ + - ]: 3661 : ent.resize(32);
370 : : // Use as entropy SHA256(ent || garbage). This prevents a situation where the fuzzer manages to
371 : : // include the garbage terminator (which is a function of both ellswift keys) in the garbage.
372 : : // This is extremely unlikely (~2^-116) with random keys/garbage, but the fuzzer can choose
373 : : // both non-randomly and dependently. Since the entropy is hashed anyway inside the ellswift
374 : : // computation, no coverage should be lost by using a hash as entropy, and it removes the
375 : : // possibility of garbage that happens to contain what is effectively a hash of the keys.
376 [ + - + - : 7322 : CSHA256().Write(UCharCast(ent.data()), ent.size())
- + ]
377 [ + - + - ]: 3661 : .Write(garb.data(), garb.size())
378 [ + - ]: 3661 : .Finalize(UCharCast(ent.data()));
379 : :
380 [ + - - + ]: 3661 : return std::make_unique<V2Transport>(nodeid, initiator, key, ent, std::move(garb));
381 : 7590 : }
382 : :
383 : : } // namespace
384 : :
385 [ + - ]: 941 : FUZZ_TARGET(p2p_transport_bidirectional, .init = initialize_p2p_transport)
386 : : {
387 : : // Test with two V1 transports talking to each other.
388 : 465 : FuzzedDataProvider provider{buffer.data(), buffer.size()};
389 : 465 : InsecureRandomContext rng(provider.ConsumeIntegral<uint64_t>());
390 : 465 : auto t1 = MakeV1Transport(NodeId{0});
391 : 465 : auto t2 = MakeV1Transport(NodeId{1});
392 [ + - - + ]: 465 : if (!t1 || !t2) return;
393 [ + - ]: 465 : SimulationTest(*t1, *t2, rng, provider);
394 : 465 : }
395 : :
396 [ + - ]: 2015 : FUZZ_TARGET(p2p_transport_bidirectional_v2, .init = initialize_p2p_transport)
397 : : {
398 : : // Test with two V2 transports talking to each other.
399 : 1539 : FuzzedDataProvider provider{buffer.data(), buffer.size()};
400 : 1539 : InsecureRandomContext rng(provider.ConsumeIntegral<uint64_t>());
401 : 1539 : auto t1 = MakeV2Transport(NodeId{0}, true, rng, provider);
402 [ + - ]: 1539 : auto t2 = MakeV2Transport(NodeId{1}, false, rng, provider);
403 [ + + + + ]: 1539 : if (!t1 || !t2) return;
404 [ + - ]: 1299 : SimulationTest(*t1, *t2, rng, provider);
405 : 1539 : }
406 : :
407 [ + - ]: 1327 : FUZZ_TARGET(p2p_transport_bidirectional_v1v2, .init = initialize_p2p_transport)
408 : : {
409 : : // Test with a V1 initiator talking to a V2 responder.
410 : 851 : FuzzedDataProvider provider{buffer.data(), buffer.size()};
411 : 851 : InsecureRandomContext rng(provider.ConsumeIntegral<uint64_t>());
412 : 851 : auto t1 = MakeV1Transport(NodeId{0});
413 [ + - ]: 851 : auto t2 = MakeV2Transport(NodeId{1}, false, rng, provider);
414 [ + - + + ]: 851 : if (!t1 || !t2) return;
415 [ + - ]: 838 : SimulationTest(*t1, *t2, rng, provider);
416 : 851 : }
|