ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.63k stars 3.26k forks source link

(code: -32000, message: nonce too low, data: None) #8026

Closed HE1M closed 9 months ago

HE1M commented 1 year ago

Describe the bug When running make devnet-up to run a local development environment based on the link, it leads to the following error:

mypc@DESKTOP11:~/optimism/optimism$ make devnet-up
make[1]: Entering directory '/home/mypc/optimism/optimism'
./ops/scripts/geth-version-checker.sh && \
        (echo "Geth versions match, not installing geth..."; true) || \
                (echo "Versions do not match, installing geth!"; \
                        go install -v github.com/ethereum/go-ethereum/cmd/geth@v1.13.4; \
                        echo "Installed geth!"; true)
Geth version v1.13.4-stable is correct!
Geth versions match, not installing geth...
make[1]: Leaving directory '/home/mypc/optimism/optimism'
./ops/scripts/newer-file.sh .devnet/allocs-l1.json ./packages/contracts-bedrock \
        || make devnet-allocs
make[1]: Entering directory '/home/mypc/optimism/optimism'
make[2]: Entering directory '/home/mypc/optimism/optimism'
./ops/scripts/geth-version-checker.sh && \
        (echo "Geth versions match, not installing geth..."; true) || \
                (echo "Versions do not match, installing geth!"; \
                        go install -v github.com/ethereum/go-ethereum/cmd/geth@v1.13.4; \
                        echo "Installed geth!"; true)
Geth version v1.13.4-stable is correct!
Geth versions match, not installing geth...
make[2]: Leaving directory '/home/mypc/optimism/optimism'
PYTHONPATH=./bedrock-devnet python3 ./bedrock-devnet/main.py --monorepo-dir=. --allocs
[INFO|11-03-2023 11:14:05] Generating L1 genesis state
[INFO|11-03-2023 11:14:05] Trying 127.0.0.1:8545
[INFO|11-03-2023 11:14:05] Connected 127.0.0.1:8545
[INFO|11-03-2023 11:14:05] Waiting for RPC server at 127.0.0.1:8545
[INFO|11-03-2023 11:14:05] RPC server at 127.0.0.1:8545 ready
[INFO|11-03-2023 11:14:05] Fetch eth_accounts 127.0.0.1:8545
[INFO|11-03-2023 11:14:05] Deploying with 0x41fdba6b9154497f78248b087ce8e613f8b10201
INFO [11-03|11:14:05.547] Starting Geth in ephemeral dev mode... 
WARN [11-03|11:14:05.547] You are running Geth in --dev mode. Please note the following:

  1. This mode is only intended for fast, iterative development without assumptions on
     security or persistence.
  2. The database is created in memory unless specified otherwise. Therefore, shutting down
     your computer or losing power will wipe your entire block data and chain state for
     your dev environment.
  3. A random, pre-allocated developer account will be available and unlocked as
     eth.coinbase, which can be used for testing. The random dev account is temporary,
     stored on a ramdisk, and will be lost if your machine is restarted.
  4. Mining is enabled by default. However, the client will only seal blocks if transactions
     are pending in the mempool. The miner's minimum accepted gas price is 1.
  5. Networking is disabled; there is no listen-address, the maximum number of peers is set
     to 0, and discovery is disabled.

INFO [11-03|11:14:05.548] Maximum peer count                       ETH=50 LES=0 total=50
INFO [11-03|11:14:05.550] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
DEBUG[11-03|11:14:05.551] FS scan times                            list="42.646µs" set=353ns diff="1.542µs"
DEBUG[11-03|11:14:05.551] FS scan times                            list="6.383µs"  set=194ns diff=464ns
DEBUG[11-03|11:14:05.552] Sanitizing Go's GC trigger               percent=100
INFO [11-03|11:14:05.552] Enabling recording of key preimages since archive mode is used 
WARN [11-03|11:14:05.552] Disabled transaction unindexing for archive node 
INFO [11-03|11:14:05.552] Set global gas cap                       cap=50,000,000
INFO [11-03|11:14:05.699] Using developer account                  address=0x2b127Af93bE0Fbe15D7F696eB06F6c1Ac2C449a9
INFO [11-03|11:14:05.699] Initializing the KZG library             backend=gokzg
INFO [11-03|11:14:05.719] Allocated trie memory caches             clean=307.00MiB dirty=0.00B
INFO [11-03|11:14:05.719] State schema set to default              scheme=hash
INFO [11-03|11:14:05.719] Initialising Ethereum protocol           network=1337 dbversion=<nil>
INFO [11-03|11:14:05.719] Writing custom genesis block 
INFO [11-03|11:14:05.720] Persisted trie from memory database      nodes=12 size=1.83KiB time="121.969µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=0 livesize=0.00B
INFO [11-03|11:14:05.721]  
INFO [11-03|11:14:05.721] --------------------------------------------------------------------------------------------------------------------------------------------------------- 
INFO [11-03|11:14:05.721] Chain ID:  1337 (unknown) 
INFO [11-03|11:14:05.721] Consensus: unknown 
INFO [11-03|11:14:05.721]  
INFO [11-03|11:14:05.721] Pre-Merge hard forks (block based): 
INFO [11-03|11:14:05.721]  - Homestead:                   #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/homestead.md) 
INFO [11-03|11:14:05.721]  - Tangerine Whistle (EIP 150): #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/tangerine-whistle.md) 
INFO [11-03|11:14:05.721]  - Spurious Dragon/1 (EIP 155): #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/spurious-dragon.md) 
INFO [11-03|11:14:05.721]  - Spurious Dragon/2 (EIP 158): #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/spurious-dragon.md) 
INFO [11-03|11:14:05.721]  - Byzantium:                   #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/byzantium.md) 
INFO [11-03|11:14:05.721]  - Constantinople:              #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/constantinople.md) 
INFO [11-03|11:14:05.721]  - Petersburg:                  #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/petersburg.md) 
INFO [11-03|11:14:05.721]  - Istanbul:                    #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/istanbul.md) 
INFO [11-03|11:14:05.721]  - Muir Glacier:                #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/muir-glacier.md) 
INFO [11-03|11:14:05.721]  - Berlin:                      #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/berlin.md) 
INFO [11-03|11:14:05.721]  - London:                      #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/london.md) 
INFO [11-03|11:14:05.721]  - Arrow Glacier:               #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md) 
INFO [11-03|11:14:05.721]  - Gray Glacier:                #0        (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md) 
INFO [11-03|11:14:05.721]  
INFO [11-03|11:14:05.721] Merge configured: 
INFO [11-03|11:14:05.721]  - Hard-fork specification:    https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md 
INFO [11-03|11:14:05.721]  - Network known to be merged: true 
INFO [11-03|11:14:05.721]  - Total terminal difficulty:  0 
INFO [11-03|11:14:05.721]  
INFO [11-03|11:14:05.721] Post-Merge hard forks (timestamp based): 
INFO [11-03|11:14:05.721]  - Shanghai:                    @0          (https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md) 
INFO [11-03|11:14:05.721]  
INFO [11-03|11:14:05.721] --------------------------------------------------------------------------------------------------------------------------------------------------------- 
INFO [11-03|11:14:05.721]  
INFO [11-03|11:14:05.721] Loaded most recent local block           number=0 hash=069823..36d079 td=0 age=54y7mo2w
WARN [11-03|11:14:05.721] Failed to load snapshot                  err="missing or corrupted snapshot"
INFO [11-03|11:14:05.721] Rebuilding state snapshot 
DEBUG[11-03|11:14:05.721] Journalled generator progress            progress=empty
DEBUG[11-03|11:14:05.721] Start snapshot generation                root=1c90b7..4d2107
INFO [11-03|11:14:05.721] Resuming state snapshot generation       root=1c90b7..4d2107 accounts=0 slots=0 storage=0.00B dangling=0 elapsed="218.739µs"
INFO [11-03|11:14:05.721] Initialized transaction indexer          limit=0
DEBUG[11-03|11:14:05.721] Regenerated state range                  kind=account prefix=0x61 root=1c90b7..4d2107 last=0x count=10 created=10 updated=0 untouched=0 deleted=0
DEBUG[11-03|11:14:05.721] Journalled generator progress            progress=done
INFO [11-03|11:14:05.722] Generated state snapshot                 accounts=10 slots=0 storage=412.00B dangling=0 elapsed="548.759µs"
DEBUG[11-03|11:14:05.733] Blobpool tip threshold updated           tip=1
INFO [11-03|11:14:05.734] Chain post-merge, sync via beacon client 
INFO [11-03|11:14:05.734] Unprotected transactions allowed 
INFO [11-03|11:14:05.734] Gasprice oracle is ignoring threshold set threshold=2
INFO [11-03|11:14:05.735] Entered PoS stage 
INFO [11-03|11:14:05.736] Starting peer-to-peer node               instance=Geth/v1.13.4-stable-3f907d6a/linux-amd64/go1.21.3
WARN [11-03|11:14:05.736] P2P server will be useless, neither dialing nor listening 
INFO [11-03|11:14:05.739] New local node record                    seq=1,699,006,445,738 id=2877c30fdbcb9fd1 ip=127.0.0.1 udp=0 tcp=0
INFO [11-03|11:14:05.739] Started P2P networking                   self=enode://5afdbddbeec36b1dac392150ad427fd6f35fa621b97ca60d04f5e389452edd94eebe57fb5a14e56a44b0d4275545dca75f97a034ab956c028a2eba95134ec50a@127.0.0.1:0
DEBUG[11-03|11:14:05.739] IPCs registered                          namespaces=admin,debug,web3,eth,txpool,miner,net,dev
INFO [11-03|11:14:05.739] IPC endpoint opened                      url=/tmp/geth.ipc
DEBUG[11-03|11:14:05.740] RPC server shutting down 
DEBUG[11-03|11:14:05.740] RPC server shutting down 
INFO [11-03|11:14:05.740] IPC endpoint closed                      url=/tmp/geth.ipc
DEBUG[11-03|11:14:05.740] RPC server shutting down 
DEBUG[11-03|11:14:06.104] FS scan times                            list="196.448µs" set="40.395µs" diff="3.13µs"

blockHash               0x44310b8b379eeb4ec387fbe077d56a91cb7105798053b568ab9431be27ca518f
blockNumber             74474
contractAddress         
cumulativeGasUsed       21000
effectiveGasPrice       3000000007
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0x3351715531fa5c403174fc1f8a4b388271ca6a73bde68566c02a07c11938c04f
transactionIndex        0
type                    2
Error: 
(code: -32000, message: nonce too low, data: None)
Traceback (most recent call last):
  File "/home/mypc/optimism/optimism/./bedrock-devnet/main.py", line 9, in <module>
    main()
  File "/home/mypc/optimism/optimism/./bedrock-devnet/main.py", line 5, in main
    devnet.main()
  File "/home/mypc/optimism/optimism/bedrock-devnet/devnet/__init__.py", line 97, in main
    devnet_l1_genesis(paths)
  File "/home/mypc/optimism/optimism/bedrock-devnet/devnet/__init__.py", line 179, in devnet_l1_genesis
    raise Exception(f"Exception occurred in child process: {err}")
Exception: Exception occurred in child process: Command '['cast', 'publish', '--rpc-url', 'http://127.0.0.1:8545', '0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222']' returned non-zero exit status 1.
make[1]: *** [Makefile:143: devnet-allocs] Error 1
make[1]: Leaving directory '/home/mypc/optimism/optimism'
make: *** [Makefile:118: devnet-up] Error 2

To Reproduce Following exactly the same procedure of the link

System Specs:

tynes commented 1 year ago

Try running the command pkill geth - you probably have a zombie geth process running

HE1M commented 1 year ago

Thanks. But not solved. The same error.

opfocus commented 1 year ago

https://github.com/ethereum-optimism/developers/discussions/17#discussioncomment-7399981
It is recommended that you delete it and then follow this guide to re-create it