This repository was archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
tx-pool: accept local tx with higher gas price when pool full #10901
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
|
@tomusdrw can you take a look at this please? :) |
dvdplm
approved these changes
Aug 10, 2019
tomusdrw
reviewed
Aug 13, 2019
Collaborator
tomusdrw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but we could avoid dropping old transaction from the pool actually.
miner/src/pool/replace.rs
Outdated
| // check for an existing transaction with the same nonce | ||
| if let Some(txs) = new.pooled_by_sender { | ||
| if let Ok(index) = txs.binary_search_by(|old| self.scoring.compare(old, new)) { | ||
| return self.scoring.choose(&txs[index], new) |
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should convert ReplaceOld to InsertNew, to prevent removing the worst transaction from the pool - since we detected that this is a replacement transaction, it will, well, replace some other transaction anyway.
Co-Authored-By: Tomasz Drwięga <[email protected]>
tomusdrw
approved these changes
Aug 13, 2019
s3krit
pushed a commit
that referenced
this pull request
Aug 14, 2019
* tx-pool: accept local tx with higher gas price when pool full * Revert "tx-pool: accept local tx with higher gas price when pool full" This reverts commit 9d4adc5 * tx-pool: new tx with same nonce as existing is ready * tx-pool: explicit check for replacement tx (same sender & nonce) * Update comment Co-Authored-By: Tomasz Drwięga <[email protected]> * Replace `ReplaceOld` with `InsertNew` for replacement txs
ordian
pushed a commit
that referenced
this pull request
Aug 15, 2019
* master: [evmbin] fix compilation (#10976) Update to latest trie version. (#10972) [blooms-db] Fix benchmarks (#10974) Fix ethcore/benches build. (#10964) tx-pool: accept local tx with higher gas price when pool full (#10901) Disable unsyncable expanse chain (#10926) Extract Machine from ethcore (#10949) removed redundant state_root function from spec, improve spec error types (#10955) Add support for Energy Web Foundation's new chains (#10957) [evmbin] add more tests to main.rs (#10956) Fix compiler warnings in util/io and upgrade to edition 2018 Upgrade mio to latest (#10953) unify loading spec && further spec cleanups (#10948) refactor: Refactor evmbin CLI (#10742) journaldb changes (#10929) Allow default block parameter to be blockHash (#10932) Enable sealing when engine is ready (#10938) Fix some warnings and typos. (#10941) Updated [email protected] key (#10939) Change the return type of step_inner function. (#10940)
ordian
pushed a commit
that referenced
this pull request
Aug 15, 2019
* master: Verify transaction against its block during import (#10954) [evmbin] fix compilation (#10976) Update to latest trie version. (#10972) [blooms-db] Fix benchmarks (#10974) Fix ethcore/benches build. (#10964) tx-pool: accept local tx with higher gas price when pool full (#10901) Disable unsyncable expanse chain (#10926)
dvdplm
added a commit
that referenced
this pull request
Aug 15, 2019
* master: Extract the Engine trait (#10958) Better error message for rpc gas price errors (#10931) [.gitlab.yml] cargo check ethcore benches (#10965) Verify transaction against its block during import (#10954) [evmbin] fix compilation (#10976) Update to latest trie version. (#10972) [blooms-db] Fix benchmarks (#10974) Fix ethcore/benches build. (#10964) tx-pool: accept local tx with higher gas price when pool full (#10901) Disable unsyncable expanse chain (#10926)
s3krit
pushed a commit
that referenced
this pull request
Sep 11, 2019
* tx-pool: accept local tx with higher gas price when pool full * Revert "tx-pool: accept local tx with higher gas price when pool full" This reverts commit 9d4adc5 * tx-pool: new tx with same nonce as existing is ready * tx-pool: explicit check for replacement tx (same sender & nonce) * Update comment Co-Authored-By: Tomasz Drwięga <[email protected]> * Replace `ReplaceOld` with `InsertNew` for replacement txs
Merged
s3krit
added a commit
that referenced
this pull request
Sep 12, 2019
* add more tx tests (#11038) * Fix parallel transactions race-condition (#10995) * Add blake2_f precompile (#11017) * [trace] introduce trace failed to Ext (#11019) * Edit publish-onchain.sh to use https (#11016) * Fix deadlock in network-devp2p (#11013) * EIP 1108: Reduce alt_bn128 precompile gas costs (#11008) * xDai chain support and nodes list update (#10989) * EIP 2028: transaction gas lowered from 68 to 16 (#10987) * EIP-1344 Add CHAINID op-code (#10983) * manual publish jobs for releases, no changes for nightlies (#10977) * [blooms-db] Fix benchmarks (#10974) * Verify transaction against its block during import (#10954) * Better error message for rpc gas price errors (#10931) * tx-pool: accept local tx with higher gas price when pool full (#10901) * Fix fork choice (#10837) * Cleanup unused vm dependencies (#10787) * Fix compilation on recent nightlies (#10991)
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.
B0-patch-stable 🕷
Pull request should also be back-ported to the stable branch.
M4-core ⛓
Core client code / Rust.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempt at resolving #10671.
I believe what was happening:
This fix will accept any transaction which has the same sender/nonce and a higher gas price.