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

block proposals with invalid transactions lead to 0-tx-Blocks #58

Open
SurfingNerd opened this issue Dec 30, 2021 · 2 comments
Open

block proposals with invalid transactions lead to 0-tx-Blocks #58

SurfingNerd opened this issue Dec 30, 2021 · 2 comments

Comments

@SurfingNerd
Copy link
Collaborator

If there are transactions that transfer more funds than the account has - the transaction is not processed because there is not enough balance.
So far so good.

The problem is, that hbbft see's the transaction as valid, and want's to start a block with it.
But the transaction can't get included, since it is not valid.
One Block later, the transaction is still here, and the loop starts again.
This loop generates an empty block all 5 seconds.

example:
Before Block 77568 we had a 0-tx block every 5 (~ min block time) seconds.
this could be solved by funding one account that had not enough funds to execute a transaction:
http://explorer.uniq.diamonds/blocks/77568
One block later, other transactions made by this account were included as well.
http://explorer.uniq.diamonds/blocks/77569.

Then the blockchain proceeded as normal.

@SurfingNerd
Copy link
Collaborator Author

SurfingNerd commented Jan 4, 2022

verify claim: high nonce transactions (Transactions with missing nonce, are kept in the main pool queue.pool)
settings.nonce_cap EIP 168 has influence if those transactions make it into the pending pool.

@SurfingNerd
Copy link
Collaborator Author

propably we just need to take the pending transactions directly from the queue,
instead of client.queued_transactions() because those
Get a list of all transactions in the pool (some of them might not be ready for inclusion yet).

Here is a code snippet:

let queue_txs: Vec<Arc<_>> = self.transaction_queue.pending(
    client.clone(),
    pool::PendingSettings {
        block_number: chain_info.best_block_number,
        current_timestamp: chain_info.best_block_timestamp,
        nonce_cap,
        max_len: max_transactions.saturating_sub(engine_txs.len()),
        ordering: miner::PendingOrdering::Priority,
    },
);

SurfingNerd added a commit that referenced this issue Jan 9, 2022
Potential fix for 0-tx blocks.
I could confirm that this potential fix really solves the error.
#58
SurfingNerd added a commit to SurfingNerd/honey-badger-testing that referenced this issue Jan 9, 2022
SurfingNerd added a commit to SurfingNerd/honey-badger-testing that referenced this issue Jan 12, 2022
SurfingNerd added a commit to SurfingNerd/honey-badger-testing that referenced this issue Jan 12, 2022
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

No branches or pull requests

1 participant