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

TransactionQueue improvements #5917

Merged
merged 8 commits into from
Jun 30, 2017
Merged

TransactionQueue improvements #5917

merged 8 commits into from
Jun 30, 2017

Conversation

tomusdrw
Copy link
Collaborator

3 important transaction queue and propagation improvements:

  • Instead of prioritizing transactions with low hashes prioritize the ones that were first seen.
  • Require a minimal gas price increase to prevent network stress.
  • Prevent constructing oversized packets with transactions

@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. B0-patch M4-core ⛓ Core client code / Rust. labels Jun 23, 2017
let mut packet;
loop {
// Construct RLP
packet = RlpStream::new_list(to_send.len());
Copy link
Contributor

Choose a reason for hiding this comment

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

rather than halving the amount of propagated every time, I think we have a RlpStream::new_list_unbounded or similar that's used in snapshot creation. Then we can always fit as many as possible into the packet.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! Addressed. The only issue I have is that it incurs (small) additional overhead when constructing all packages, whereas the previous approach was only more expensive when the limit is actually reached.

@rphmeier rphmeier added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jun 23, 2017
@rphmeier
Copy link
Contributor

Other than packet construction grumble, LGTM

@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 Jun 26, 2017
@arkpar arkpar added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jun 29, 2017
@arkpar
Copy link
Collaborator

arkpar commented Jun 29, 2017

needs a merge

@arkpar arkpar merged commit f22745e into master Jun 30, 2017
@arkpar arkpar deleted the txqueue branch June 30, 2017 09:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants