forked from harmony-one/harmony
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] fix: Use time-based ordering to avoid spam
Closes harmony-one#4113 by sorting transactions by time received instead of using a hashmap based transaction ordering. This sorting is on top of the gas price and nonce sorting already implemented. Effectively, this allows the production of almost a deterministic order of transaction ordering, as opposed to a heap-based hash map ordering which is affected by Golang's internal operations. Consequently, arbitrageurs, who spam the network with a view to exist around arbitrag-able transactions, will have to focus on latency instead of network spamming. See also bnb-chain/bsc#269 and ethereum/go-ethereum#21358 for related issues in other chains.
- Loading branch information
1 parent
e245591
commit f6caa45
Showing
3 changed files
with
114 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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