Commit c6bda0a
authored
fix(tests): flakiness across a few different tests (#2982)
> [!NOTE]
> discovered the issue, bob doesn't have the delegate keys, and
therefore when he receives preconfirmations he can't verify the
signature, and then rejects the messages. the rejections reduce the peer
score of the authority node and then the two are disconnected. maybe the
preconfirmation service should just `GossipsubMessageAcceptance::Ignore`
if it has no delegate keys instead of
`GossipsubMessageAcceptance::Reject`.
focusing on improving the configuration of nodes, enhancing consistency
checks, and cleaning up unused imports.
### Configuration Enhancements:
* Added a new configuration option
`pre_confirmation_signature_service.echo_delegation_interval` to set an
interval of 100 milliseconds for echo delegation in `make_nodes`. This
improves configurability for testing scenarios.
* Introduced conditional database initialization in `make_config`, using
`CombinedDatabase` when the `default` feature is enabled, and falling
back to an in-memory database otherwise. This provides flexibility for
different environments.
### Consistency Check Improvements:
* Refactored the `consistency` method to use a `tokio::time::interval`
for periodic checks, replacing the previous loop and event-based logic.
This simplifies the code and ensures consistent behavior.
* Consolidated consistency methods by introducing
`consistency_with_duration`, which allows specifying a custom timeout
duration. The existing `consistency_10s` and `consistency_20s` methods
now delegate to this new method for better code reuse.
### Cleanup:
* Removed an unused import `schema::tx::types::TransactionStatus` to
tidy up the codebase.1 parent 47b84ca commit c6bda0a
3 files changed
Lines changed: 49 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
401 | 400 | | |
402 | 401 | | |
403 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
404 | 409 | | |
405 | 410 | | |
406 | 411 | | |
| |||
507 | 512 | | |
508 | 513 | | |
509 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
510 | 521 | | |
| 522 | + | |
511 | 523 | | |
512 | 524 | | |
513 | 525 | | |
| |||
573 | 585 | | |
574 | 586 | | |
575 | 587 | | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
| 588 | + | |
586 | 589 | | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
| 590 | + | |
| 591 | + | |
591 | 592 | | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
596 | 597 | | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
| 598 | + | |
| 599 | + | |
603 | 600 | | |
604 | 601 | | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | | - | |
610 | | - | |
611 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
612 | 615 | | |
613 | 616 | | |
614 | 617 | | |
615 | 618 | | |
616 | 619 | | |
617 | 620 | | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
618 | 627 | | |
619 | 628 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
625 | 637 | | |
626 | 638 | | |
627 | 639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| |||
0 commit comments