erigon-pulse/cmd
Mark Holt f9acbff96c
eth_sendRawTransaction: remove logging, because we have --txpool.trace.senders which enabling more verbose logging for given senders list (#7686)
When testing with `Bor` consensus turned on I discovered that
`SendRawTransaction` returns a 0x000... hash when transactions are
submitted during block transitions. This turns out to be spurious in the
sense that the transaction insertion is successful.

The cause is that `ReadCurrentBlockNumber` returns a nil block number.

This in turn is caused by the following: In `accessors_chain.go` there
are two methods: `WriteHeader` and `WriteHeadHeaderHash` when the first
is called the block number is written for the header. The second writes
the header has, but there is no guarantee when it does that the head
header will have been written yet. In fact it seems to happen sometime
later.

The problem for `SendRawTransation` is that it begins a transaction
after inserting into the txpool. And depending on timing this
transaction may see only the `WriteHeadHeaderHash` insertion, and hence
can't read the block number.

I have mitigated this by opening the db transaction before calling the
tx pool insertion, meaning that it is more likely to have a clean view
of the DB.

I have also moved the chain id check earlier in the code - as I think
that if this is invalid the method should not try to insert transactions
in the first place.

The `ReadCurrentBlockNumber` is only used to produce a log message - so
I've changed this to not fail the whole function but to just log an
unknown sender. Which means that the hash is still returned to the
sender after a successful txpool insertion
2023-06-11 13:18:04 +07:00
..
abigen e3: erigon_getBalanceChanges (#7704) 2023-06-11 11:49:53 +07:00
bootnode [devnet] separate logging p2p (#7549) 2023-05-19 23:08:45 +01:00
caplin-phase1 added a listener for beacon api and added get genesis (#7659) 2023-06-08 09:43:27 +02:00
caplin-regression Forgot to configure flags (#7701) 2023-06-10 08:53:24 +02:00
devnet refactor to allow switchable consensus and multiple communicating nodes (#7646) 2023-06-04 20:53:05 +01:00
downloader [devnet tool] separate logging (#7526) 2023-05-17 07:36:06 +01:00
erigon [devnet tool] separate logging (#7526) 2023-05-17 07:36:06 +01:00
erigon-el Indore hardfork for polygon mumbai and fixes in bor consensus (#7681) 2023-06-08 09:20:40 +07:00
erigon-el-mock remove txsV3 cli flag (#7644) 2023-06-03 15:54:27 +07:00
erigoncustom erigon backup: v0 of sub-command (#7396) 2023-04-27 10:42:12 +07:00
evm e3: use deserializeV3 for history (#7691) 2023-06-09 10:53:04 +07:00
hack remove txsV3 cli flag (#7644) 2023-06-03 15:54:27 +07:00
integration lru lib version up (#7695) 2023-06-09 13:46:58 +07:00
observer [devnet] separate logging p2p (#7549) 2023-05-19 23:08:45 +01:00
p2psim [devnet tool] Separate logging (#7553) 2023-05-20 14:48:16 +01:00
pics Break dependency of ethcfg package to core/consensus/etc... move genesis struct to 'types' package (#7206) 2023-03-29 07:27:06 +00:00
prometheus grafana remove datasource uid (#7247) 2023-04-03 11:59:41 +00:00
release [caplin] pkg refactor (#7507) 2023-05-13 23:44:07 +02:00
rlpdump
rpcdaemon eth_sendRawTransaction: remove logging, because we have --txpool.trace.senders which enabling more verbose logging for given senders list (#7686) 2023-06-11 13:18:04 +07:00
rpctest Move hexutil.Bytes to erigon-lib (#7305) 2023-04-13 11:19:02 +00:00
sentinel added a listener for beacon api and added get genesis (#7659) 2023-06-08 09:43:27 +02:00
sentry preparation for --txs.v3, step 2 (#7636) 2023-06-03 07:20:22 +07:00
state lru lib version up (#7695) 2023-06-09 13:46:58 +07:00
txpool [devnet tool] Separate logging (#7553) 2023-05-20 14:48:16 +01:00
utils 7667 cli params vhost (#7669) 2023-06-09 14:12:11 +01:00
verkle Introduce logger into etl (#7537) 2023-05-18 21:20:07 +01:00