Commit 0918356
authored
test: improve the data generation for the consensus simulation (#510)
* test: adjust some log messages for the simulation
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* test: fix a possible deadlock when running the simulation with too many downstream peers
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* test: only reverse heap entries when added to the heap
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* test: parametrize the number of peers for the data generation
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* chore: rebase on main
Signed-off-by: etorreborre <etorreborre@yahoo.com>
| Conflicts:
| simulation/amaru-sim/src/simulator/run.rs
* test: use the test generation from headers tree for the simulation
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* feat: don't terminate on validation errors, just log
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* test: make the simulation env. variables a bit more lenient
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* test: adjust the simulation oracle for generated data
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* test: remove the unused data generation files
Signed-off-by: etorreborre <etorreborre@yahoo.com>
| Conflicts:
| simulation/amaru-sim/src/simulator/args.rs
| simulation/amaru-sim/src/simulator/ledger.rs
| simulation/amaru-sim/src/simulator/node_config.rs
* test: only check the messages sent to the first downstream peer
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* test: add an argument to vary the depth of generated chains
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* test: add generation arguments
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* chore: implement some coderabbit suggestions
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* chore: rebase on main
Signed-off-by: etorreborre <etorreborre@yahoo.com>
* test: pass around the best chain for a generated tree of headers to write assertions
Signed-off-by: etorreborre <etorreborre@yahoo.com>
---------
Signed-off-by: etorreborre <etorreborre@yahoo.com>1 parent baba192 commit 0918356
23 files changed
Lines changed: 438 additions & 1393 deletions
File tree
- crates
- amaru-consensus/src/consensus
- headers_tree
- data_generation
- stages
- amaru-ouroboros-traits/src/is_header
- amaru/src/stages
- simulation/amaru-sim
- src
- echo
- simulator
- data_generation
- world
- sync
- tests
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 92 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
318 | 353 | | |
319 | 354 | | |
320 | 355 | | |
| |||
342 | 377 | | |
343 | 378 | | |
344 | 379 | | |
345 | | - | |
| 380 | + | |
346 | 381 | | |
347 | | - | |
348 | | - | |
| 382 | + | |
| 383 | + | |
349 | 384 | | |
350 | | - | |
351 | | - | |
| 385 | + | |
| 386 | + | |
352 | 387 | | |
353 | 388 | | |
354 | 389 | | |
355 | 390 | | |
356 | 391 | | |
357 | 392 | | |
| 393 | + | |
358 | 394 | | |
359 | 395 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
364 | 408 | | |
365 | 409 | | |
366 | 410 | | |
| |||
476 | 520 | | |
477 | 521 | | |
478 | 522 | | |
479 | | - | |
| 523 | + | |
480 | 524 | | |
481 | 525 | | |
482 | 526 | | |
483 | 527 | | |
484 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
485 | 532 | | |
486 | 533 | | |
487 | 534 | | |
| |||
584 | 631 | | |
585 | 632 | | |
586 | 633 | | |
| 634 | + | |
| 635 | + | |
587 | 636 | | |
588 | 637 | | |
589 | 638 | | |
| |||
600 | 649 | | |
601 | 650 | | |
602 | 651 | | |
603 | | - | |
| 652 | + | |
604 | 653 | | |
605 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
606 | 685 | | |
Lines changed: 30 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
41 | | - | |
| 51 | + | |
42 | 52 | | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
46 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
47 | 63 | | |
48 | 64 | | |
49 | 65 | | |
50 | 66 | | |
51 | | - | |
52 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
53 | 76 | | |
54 | 77 | | |
55 | 78 | | |
| |||
66 | 89 | | |
67 | 90 | | |
68 | 91 | | |
69 | | - | |
| 92 | + | |
70 | 93 | | |
71 | 94 | | |
72 | 95 | | |
| |||
90 | 113 | | |
91 | 114 | | |
92 | 115 | | |
| 116 | + | |
93 | 117 | | |
94 | 118 | | |
95 | 119 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
| 1287 | + | |
1287 | 1288 | | |
1288 | 1289 | | |
1289 | 1290 | | |
1290 | 1291 | | |
1291 | | - | |
| 1292 | + | |
| 1293 | + | |
1292 | 1294 | | |
1293 | 1295 | | |
1294 | 1296 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
285 | 296 | | |
286 | 297 | | |
287 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 64 | + | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments