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

Add test that show tx pool consistency can't be reached #1187

Closed
wants to merge 1 commit into from

Conversation

freesig
Copy link
Contributor

@freesig freesig commented May 24, 2023

Currently this test fails at Bob because nodes score becomes too low to actually gossip with each other. They seem to be penalized for "mesh message delivery". They should not be being penalized so this is a bug @leviathanbeak

If I manually set the penalty thresholds to super low then this test fails at the producer coming back online. This is the original issue the test was meant to show. This happens because "gossipsub" only tries to deliver messages for 3 heartbeats. So we can't rely on "gossipsub" to get the tx pools to consistency.

Note the solution to the tx pool consistency should be done at the app level not the network. So each tx pool should diff each others ids and then exchange messages each other don't have. This could be on a pretty slow loop.

Related issue #1049

@freesig freesig added bug Something isn't working fuel-txpool labels May 24, 2023
@Voxelot
Copy link
Member

Voxelot commented Jun 6, 2023

One part of the issue might be that the bootstrap node isn't a real node and doesn't perform any application level message validation (ie. wait for the txpool to confirm the tx is valid). This test should probably either wait until the validators are directly connected to each other, disable message validation in the bootstrap node, or make the bootstrap node a real node with a working txpool.

Confirmed that this test works with the following modifications:

  • Add a sleep before inserting any txs to allow enough time for the validators to discover each other
  • Remove consistency check for producer, since it is offline while the messages are gossipped
    // wait some time for the validators to discover each other via bootstrap node
    tokio::time::sleep(std::time::Duration::from_secs(10)).await;

    validators["Bob"].test_txs = producer.test_txs.clone();

    // Insert the transactions into Bob's tx pool.
    let expected = validators["Bob"].insert_txs();

    // Wait up to 20 seconds for Bob to validate their own tx pool.
    validators["Bob"].tx_pool_consistency_20s(&expected).await;

    // Wait up to 20 seconds for Carol to sync with the Bob.
    validators["Carol"].tx_pool_consistency_20s(&expected).await;

@xgreenx
Copy link
Collaborator

xgreenx commented Jan 8, 2024

It was fixed during #1434

@xgreenx xgreenx closed this Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuel-txpool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants