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

Improve TestPrepareProposalConsistency #2519

Open
evan-forbes opened this issue Sep 18, 2023 · 7 comments
Open

Improve TestPrepareProposalConsistency #2519

evan-forbes opened this issue Sep 18, 2023 · 7 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@evan-forbes
Copy link
Member

The TestPrepareProposalConsistency test uses randomly sized transactions to test if PrepareProposal will ever create a proposal block that ProcessProposal rejects. While other tests are responsible for ensuring that a transaction that gets through CheckTx, gets through PrepareProposal, and then ProcessProposal, this test can still be improved upon by being more exact with how many transactions are expected to be included in the block.

require.GreaterOrEqual(t, len(resp.BlockData.Txs), sendTxCount+1)

@ThanhNhann
Copy link

Hey @evan-forbes, can I handle this issue?

@ThanhNhann
Copy link

Hi @evan-forbes, I see the code from branch main now have some differs from your code reference above, do we still need to improve it now?

@rootulp
Copy link
Collaborator

rootulp commented Dec 7, 2023

Thanks for your interest @ThanhNhann ! It looks like this assertion still exists on main

require.GreaterOrEqual(t, len(resp.BlockData.Txs), sendTxCount+1)

and I think this issue wants a more exact assertion for the # of transactions (blob and non-blob) that get included in the process proposal block. Perhaps it can assert that the # of transactions in the prepare proposal response == the # of transactions in the process proposal response (?)

@exp7l
Copy link

exp7l commented Feb 2, 2024

Greetings! @evan-forbes @rootulp
Looks like this is still open. Can I work on it?

@rootulp rootulp assigned exp7l and unassigned ThanhNhann Feb 3, 2024
@exp7l
Copy link

exp7l commented Feb 3, 2024

Looking

@exp7l exp7l mentioned this issue Feb 7, 2024
6 tasks
@rootulp
Copy link
Collaborator

rootulp commented Feb 28, 2024

Closing this as won't do because it's not immediately clear what this issue is asking for. See #3087 (comment)

cc: @evan-forbes please re-open with acceptance criteria if we still want this.

@rootulp rootulp closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
@evan-forbes
Copy link
Member Author

this test can still be improved upon by being more exact with how many transactions are expected to be included in the block.

I think this is the core piece, we aren't actually checking how many transactions are being included, only that one blobTx did. This means that the rest of the blob txs could be filtered out. Ideally we would make this more restrictive. This might involve writing a different or doing some analysis for what conservative % of txs should be expected to get through.

require.Equal(t, abci.ResponseProcessProposal_ACCEPT, res.Result)
// At least all of the send transactions and one blob tx
// should make it into the block. This should be expected to
// change if PFB transactions are not separated and put into
// their own namespace
require.GreaterOrEqual(t, len(resp.BlockData.Txs), sendTxCount+1)
}

@evan-forbes evan-forbes reopened this Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants