Go to file
Manav Darji 07fa94278f
txpool: honour nonce while sorting txs (#737)
In context of https://github.com/ledgerwatch/erigon/issues/5694, this PR
fixes the tx ordering logic in the txpool. Also, a relevant change in
erigon is made here: https://github.com/ledgerwatch/erigon/pull/6051.

When the mining module used to query the best transactions, the response
of transactions weren't sorted according to nonce (for same sender
address). This caused the execution to fail (except 1). The txpool
orders the transactions using this underlying `better()` and `worse()`
functions. The `better()` function didn't have a nonce check for the
pending pool, while the `worse()` function had. This PR adds a check
which would compare and put a transaction with lower nonce ahead.

Moreover, on further investigation, these checks were applied for all
types of transactions. It only makes sense compare the nonce for
transactions which has same sender account. Hence, this PR also adds an
additional check along with.
2022-11-16 10:57:17 +03:00
.github/workflows e3: parallel build missed indices (#693) 2022-10-21 13:31:03 +07:00
aggregator Fieldalign (#695) 2022-10-21 15:31:23 +07:00
bptree Fieldalign (#695) 2022-10-21 15:31:23 +07:00
chain Fieldalign (#695) 2022-10-21 15:31:23 +07:00
commitment eliasfano: To fix checkptr fatal error (#697) 2022-10-22 10:55:19 +07:00
common Fieldalign (#695) 2022-10-21 15:31:23 +07:00
compress Add modification times to index and decompressor objects (#721) 2022-11-01 15:39:49 +00:00
crypto Remove TxParseContext.withBor (#622) 2022-09-04 13:15:02 +02:00
direct Fieldalign (#695) 2022-10-21 15:31:23 +07:00
etl e3: build files sequentially (#723) 2022-11-02 09:44:40 +07:00
gointerfaces Update interfaces (#733) 2022-11-11 16:36:22 +01:00
kv Added light client database tables (#736) 2022-11-15 19:59:55 +01:00
mmap Madv helpers (#667) 2022-10-04 10:51:51 +01:00
patricia fix linter warnings (#698) 2022-10-22 13:19:27 +07:00
pedersen_hash Enable unconvert linter (#609) 2022-08-30 09:50:23 +07:00
recsplit Add modification times to index and decompressor objects (#721) 2022-11-01 15:39:49 +00:00
rlp Fieldalign (#695) 2022-10-21 15:31:23 +07:00
sais Avoid redefinitions in gsacak.h (#602) 2022-08-24 15:29:17 +02:00
state e3: wal ram configure (#732) 2022-11-11 11:28:18 +07:00
txpool txpool: honour nonce while sorting txs (#737) 2022-11-16 10:57:17 +03:00
types fix linter warnings (#698) 2022-10-22 13:19:27 +07:00
.gitignore Reverted 3 last commits (#348) 2022-02-24 14:39:42 +00:00
.golangci.yml Remove deprectated linter structcheck (#715) 2022-10-31 11:40:04 +07:00
go.mod Update interfaces (#733) 2022-11-11 16:36:22 +01:00
go.sum Update interfaces (#733) 2022-11-11 16:36:22 +01:00
LICENSE Initial commit 2021-06-19 10:43:10 +01:00
Makefile Makefile: fix for mac m1/2 (#725) 2022-11-03 14:53:06 +00:00
README.md Initial commit 2021-06-19 10:43:10 +01:00
rules.go linter: add rules.go from erigon #418 Open 2022-04-17 09:12:09 +07:00
tools.go E3: par logs (#699) 2022-10-23 15:30:27 +07:00

erigon-lib

Dependencies of Erigon project, rewritten from scratch and licensed under Apache 2.0