erigon
erigon copied to clipboard
first run for txIndex 0 error: nonce too low
System information
Erigon version: v2022.09.01 (then I upgrade to 09.03 with running integration command in the comment)
OS & Version: Linux
Commit hash :
Expected behaviour
trace_xx
API should return valid results
Actual behaviour
always report
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"first run for txIndex 0 error: nonce too low: address 0xf6Dde0FA900e43748a1e83A8E61eaba46b72D71A, tx: 150 state: 161"}}
Steps to reproduce the behaviour
start the server with flag:
erigon --datadir=/data --nat=extip:$(POD_IP) --port=30303
--http=false --private.api.addr=127.0.0.1:9090
--authrpc.jwtsecret=/data/jwt.hex --authrpc.addr=0.0.0.0
--authrpc.port=8551 --authrpc.vhosts=* --metrics
--metrics.addr=0.0.0.0 --metrics.port=6060
rpcdaemon
--datadir=/data --private.api.addr=127.0.0.1:9090
--txpool.api.addr=127.0.0.1:9090 --http.addr=0.0.0.0 --http.port=8545
--http.vhosts=* --metrics --metrics.addr=0.0.0.0 --metrics.port=6061
--http.api=eth,erigon,web3,net,debug,trace,txpool,db
then query:
curl --request POST --url http://localhost:8545 --header 'content-type: application/json' --data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "trace_block",
"params": [
"0x1176F7"
]
}
'
notice for blocks that contain no transaction it could return results
here is server logs:
[INFO] [09-25|00:59:36.201] [p2p] GoodPeers eth66=33
[INFO] [09-25|00:59:44.851] Flushed buffer file name=/data/etl-temp/erigon-sortable-buf-1702890288 alloc=3.2GB sys=5.3GB
[INFO] [09-25|00:59:46.962] [txpool] stat block=15537393 pending=9197 baseFee=0 queued=30000 alloc=3.2GB sys=5.3GB
[WARN] [09-25|01:00:00.766] Served conn=10.8.6.3:59318 method=trace_block reqid=1 t=612.215µs err="first run for txIndex 0 error: nonce too low: address 0xf6Dde0FA900e43748a1e83A8E61eaba46b72D71A, tx: 150 state: 161"
[INFO] [09-25|01:00:04.398] [7/15 HashState] ETL [1/2] Extracting current key=0f067b256a0c... alloc=3.4GB sys=5.3GB
[INFO] [09-25|01:00:09.195] Flushed buffer file name=/data/etl-temp/erigon-sortable-buf-2752312198 alloc=3.5GB sys=5.3GB
[INFO] [09-25|01:00:34.398] [7/15 HashState] ETL [1/2] Extracting current key=0f111fee3f6a... alloc=3.8GB sys=5.3GB
[INFO] [09-25|01:00:46.965] [txpool] stat block=15537393 pending=9197 baseFee=0 queued=30000 alloc=3.9GB sys=5.3GB
[WARN] [09-25|01:00:54.439] Served conn=10.8.6.3:42428 method=trace_block reqid=1 t=392.416µs err="first run for txIndex 0 error: nonce too low: address 0x2a65Aca4D5fC5B5C859090a6c34d164135398226, tx: 290390 state: 4662729"
[INFO] [09-25|01:01:05.745] Flushed buffer file name=/data/etl-temp/erigon-sortable-buf-2834537428 alloc=2.8GB sys=5.3GB
[INFO] [09-25|01:01:05.745] [7/15 HashState] ETL [1/2] Extracting current key=0f8c45b89678... alloc=2.8GB sys=5.3GB
[INFO] [09-25|01:01:34.398] [7/15 HashState] ETL [1/2] Extracting current key=10064373e248... alloc=3.1GB sys=5.3GB
[INFO] [09-25|01:01:36.201] [p2p] GoodPeers eth66=33
Backtrace
[backtrace]
I tried to fix issue by:
integration stage_headers --datadir /data --chain mainnet --reset
but the problem stays. here is the result of print stage, so I reopen the issue
integration print_stages --datadir /data --chain=mainnet
Note: prune_at doesn't mean 'all data before were deleted' - it just mean stage.Prune function were run to this block. Because 1 stage may prune multiple data types to different prune distance.
stage_at prune_at
Snapshots 14999999 0
Headers 14999999 0
BlockHashes 14999999 0
Bodies 14999999 0
Senders 15537393 0
Execution 15537393 0
Translation 0 0
HashState 0 0
IntermediateHashes 0 0
AccountHistoryIndex 0 0
StorageHistoryIndex 0 0
LogIndex 0 0
CallTraces 0 0
TxLookup 0 0
Finish 0 0
--
prune distance:
sequence: EthTx=1643669427, NonCanonicalTx=0
no headers in db
no bodies in db
This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.