Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Avoid importing transactions with gas above 1.1*block_gas_limit to transaction queue #760

Merged
merged 3 commits into from Mar 18, 2016

Conversation

tomusdrw
Copy link
Collaborator

No description provided.

@tomusdrw tomusdrw added the A0-pleasereview 🤓 Pull request needs code review. label Mar 17, 2016
@gavofyork
Copy link
Contributor

chain::tests::should_add_transactions_to_queue failing. is this random?

@tomusdrw
Copy link
Collaborator Author

It's not random. This is sort of integration test that uses test_client. When I run tests locally I only run tests from crate that I'm modyfing (ethminer in that case) so it fails here.

This time the problem was that blocks generated by test_client have gas_limit set to 0. So no transactions could be imported.

Conflicts:
	miner/src/transaction_queue.rs
minimal: self.minimal_gas_price,
got: tx.gas_price,
}));
}

if tx.gas > self.gas_limit {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this check should probably be moved be checked OpenBlock::push_transaction.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But there already is similar check (or executive will just fail with BlockGasLimitReached).
In this PR we want to avoid even storing such transactions in TransactionQueue (`self.gas_limit here is 1.1*best_block_gas_limit).

@gavofyork gavofyork added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 18, 2016
@tomusdrw tomusdrw changed the title Ignoring transactions slightly above gas_limit Avoid importing transactions with gas above gas_limit to transaction queue Mar 18, 2016
@tomusdrw tomusdrw changed the title Avoid importing transactions with gas above gas_limit to transaction queue Avoid importing transactions with gas above 1.1*block_gas_limit to transaction queue Mar 18, 2016
@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels Mar 18, 2016
gavofyork added a commit that referenced this pull request Mar 18, 2016
Avoid importing transactions with gas above 1.1*block_gas_limit to transaction queue
@gavofyork gavofyork merged commit 2309e19 into master Mar 18, 2016
@gavofyork gavofyork deleted the tx_queue_gas_limit branch March 18, 2016 17:05
@arkpar arkpar added this to the 1.0 Parity milestone Mar 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-pleasereview 🤓 Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants