Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing TEST (active_transactions, fifo) #4394

Merged
merged 4 commits into from
Jan 26, 2024

Conversation

gr0vity-dev
Copy link
Contributor

This testcase manually pushes two blocks to the election scheduler.
However the backlog population sometimes also pushes the block to the election scheduler resulting in it being dropped twice.
--> The solution is to disable the backlog population for this testcase

Screenshot 2024-01-25 at 15 46 22

After this change I ran the testcase 100k times and saw it failing only once. (Compared to ~1 in 1000 before)

The stats indicate that an election can still get activated by priority scheduler:
type: election_scheduler detail: insert_priority dir: in value: 1

The only other place I found that runs a priority scheduler is here in nano::active_transactions::activate_successors

gr0vity-dev and others added 4 commits December 15, 2023 22:08
This is what was previously set as env variables
```env:
    artifact: 1
    NETWORK: BETA \
    CI_TAG: V26.0DB34 \
```

Fix:
```env:
    artifact: 1
    NETWORK: BETA
    CI_TAG: V26.0DB34
```
disable backlog population
@dsiganos
Copy link
Contributor

Nice one! This test case been bugging me! Detailed tracing looks extremely useful!

@dsiganos
Copy link
Contributor

nano::active_transactions::activate_successors is called from
nano::active_transactions::handle_final_votes_confirmation which is called from
nano::active_transactions::block_cemented_callback which is called for every cemented block.

So it appears that every newly cemented block triggers an election for its successor, if we are past the bootstrap_weight_max_blocks point.

@dsiganos
Copy link
Contributor

Try setting node.ledger.bootstrap_weight_max_blocks to a large number so that that activate_successors is not triggered (e.g. 100).

@gr0vity-dev
Copy link
Contributor Author

Nice one! This test case been bugging me! Detailed tracing looks extremely useful!

This is simply printing the statsto cout. Here is a .patch file to apply those for debugging purposes.
stats_to_cout.patch

@dsiganos dsiganos merged commit 7ce38c8 into nanocurrency:develop Jan 26, 2024
17 of 19 checks passed
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.

2 participants