Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Error when tried to commit)panic: runtime error: invalid memory address or nil pointer dereference #130

Open
ggs134 opened this issue May 14, 2020 · 0 comments

Comments

@ggs134
Copy link
Member

ggs134 commented May 14, 2020

epoch : 2

made a 2 dummy tx via console.

ubuntu@ip-172-31-19-165:~/plasma-evm$ build/bin/geth attach --datadir ./operaror
Welcome to the Geth JavaScript console!

instance: Geth/v1.9.10-stable-aed5ae2f/linux-amd64/go1.13.4
coinbase: 0x340c44089bc45f86060922d2d89efee9e0cdf5c7
at block: 0 (Thu, 01 Jan 1970 00:00:00 UTC)
 datadir: /home/ubuntu/plasma-evm/operator
 modules: admin:1.0 debug:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0


> eth.sendTransaction({from: eth.accounts[0], to:eth.accounts[0], value: 0})   
"0x7c579204b53d3b9cccd2bb990b87baf8b048bb1777a256a848bb3bb64178c8a5"
> eth.sendTransaction({from: eth.accounts[0], to:eth.accounts[0], value: 0})   
"0xba24dd1eaf44ed3a294e8f7c07bc14c68867c35021c01eacc3054a4a15561359"

Error log

ubuntu@ip-172-31-19-165:~/plasma-evm$ nohup build/bin/geth --nousb         --datadir ./operator                      --rootchain.url wss://mainnet.infura.io/ws/v3/d738213eecc341feb0bf0021390c75e4                      --operator 0x340c44089bc45f86060922d2d89efee9e0cdf5c7                      --operator.password pwd.pass &
[1] 17033
ubuntu@ip-172-31-19-165:~/plasma-evm$ nohup: ignoring input and appending output to 'nohup.out'

ubuntu@ip-172-31-19-165:~/plasma-evm$ tail -f nohup.out 
INFO [05-14|15:49:46.048] Initialising Plasma protocol             versions="[64 63]" network=16 dbversion=<nil>
WARN [05-14|15:49:46.048] Upgrade blockchain database version      from=<nil> to=7
INFO [05-14|15:49:46.048] Loaded most recent local header          number=0 hash=154e22…69ceaa td=1 age=51y1mo6d
INFO [05-14|15:49:46.048] Loaded most recent local full block      number=0 hash=154e22…69ceaa td=1 age=51y1mo6d
INFO [05-14|15:49:46.048] Loaded most recent local fast block      number=0 hash=154e22…69ceaa td=1 age=51y1mo6d
INFO [05-14|15:49:46.049] Regenerated local transaction journal    transactions=0 accounts=0
INFO [05-14|15:49:46.061] Allocated fast sync bloom                size=654.00MiB
INFO [05-14|15:49:46.093] Initialized fast sync bloom              items=21 errorrate=0.000 elapsed=29.972ms
INFO [05-14|15:49:46.834] Rootchain provider connected             url=wss://mainnet.infura.io/ws/v3/d738213eecc341feb0bf0021390c75e4
INFO [05-14|15:49:47.053] Transaction manager loaded               numAccounts=0
INFO [05-14|15:49:50.058] New local node record                    seq=1 id=ede8d6b106a31c6a ip=127.0.0.1 udp=30305 tcp=30305
INFO [05-14|15:49:50.058] Started P2P networking                   self=enode://61997c06504f56e4b4d77b613de0c6845e3589561ed4a6044af05ae416f707cc8005ffc1cbc4c5d5e3aa619adeb5a8c6e6ce906d844a8c1cde76684d2947a00f@127.0.0.1:30305
INFO [05-14|15:49:50.491] Iterating epoch prepared event 
INFO [05-14|15:49:50.491] RootChain epoch prepared                 epochNumber=1 startBlockNumber=1 endBlockNumber=2 epochLength=2 isRequest=false userActivated=false isEmpty=false ForkNumber=0 isRebase=false
INFO [05-14|15:49:50.491] RootChain epoch prepared                 epochNumber=2 startBlockNumber=2 endBlockNumber=2 epochLength=1 isRequest=true  userActivated=false isEmpty=true  ForkNumber=0 isRebase=false
INFO [05-14|15:49:50.491] epoch is empty, jump to next epoch
INFO [05-14|15:49:50.491] RootChain epoch prepared                 epochNumber=3 startBlockNumber=3 endBlockNumber=4 epochLength=2 isRequest=false userActivated=false isEmpty=false ForkNumber=0 isRebase=false
INFO [05-14|15:49:50.492] NRB epoch is prepared, NRB epoch is started epochLength=2
INFO [05-14|15:49:50.492] NRB epoch is prepared, NRB epoch is started epochLength=2
INFO [05-14|15:49:50.704] Iterating block finalized event 
INFO [05-14|15:49:50.704] RootChain block finalized                forkNumber=0 blockNubmer=0
ERROR[05-14|15:49:50.704] Failed to get challenger account         err="unknown account"
INFO [05-14|15:49:51.012] Watching epoch prepared event            startBlockNumber=0
INFO [05-14|15:49:51.257] Watching block finalized event           startBlockNumber=0
INFO [05-14|15:49:51.449] Updated mining threads                   threads=2
INFO [05-14|15:49:51.450] current epoch is resumed
INFO [05-14|15:49:51.451] IPC endpoint opened                      url=/home/ubuntu/plasma-evm/operator/geth.ipc
INFO [05-14|15:50:11.548] New root chain block mined               number=10065211 numTxs=201 gasUsed=9949468 gasLimit=9980018
INFO [05-14|15:50:18.597] New root chain block mined               number=10065212 numTxs=102 gasUsed=9967958 gasLimit=9984847
ERROR[05-14|15:50:43.841] Failed to read root chain block          err="not found"
INFO [05-14|15:51:00.917] New root chain block mined               number=10065214 numTxs=191 gasUsed=9980526 gasLimit=9999456
ERROR[05-14|15:51:01.130] Failed to read root chain block          err="not found"
INFO [05-14|15:51:06.597] Etherbase automatically configured       address=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:51:19.061] New root chain block mined               number=10065216 numTxs=175 gasUsed=9983078 gasLimit=9990236
INFO [05-14|15:51:30.936] Setting new local account                address=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:51:30.937] Submitted transaction                    fullhash=0x094325666e9f9d31d2ed73251c8e3452fc02732657c6e6b2829c07cb8f4d41fe recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:51:33.457] Commit new mining work                   number=1    
    sealhash=12d0d8…edd6c1 uncles=0 txs=1 gas=21000 fees=2.1e-05 elapsed=729.399µs
INFO [05-14|15:51:33.458] Successfully sealed new block            number=1    
    sealhash=12d0d8…edd6c1 hash=cae735…5c7701 elapsed=436.755µs
INFO [05-14|15:51:33.458] �🔨 mined potential block                  number=1 
     hash=cae735…5c7701
INFO [05-14|15:51:33.458] New block is mined                       number=1    
INFO [05-14|15:51:33.530] New root chain block mined               number=10065217 numTxs=130 gasUsed=9985882 gasLimit=9999991
INFO [05-14|15:51:33.669] Submitted transaction                    fullhash=0x6e8087c1faa26b4fbf90a3e20efecdeaa652fc70ef4f06c4478920cba37bce88 recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
WARN [05-14|15:51:33.671] Operator account balance on rootchain is too low     
INFO [05-14|15:51:33.671] Non-request epoch is not completed yet   epochNumber=3
INFO [05-14|15:51:36.459] Commit new mining work                   number=2    
    sealhash=c6c6da…f49fa5 uncles=0 txs=1 gas=21000 fees=2.1e-05 elapsed=586.694µs
INFO [05-14|15:51:36.459] Successfully sealed new block            number=2    
    sealhash=c6c6da…f49fa5 hash=faad8a…e5464d elapsed=411.323µs
INFO [05-14|15:51:36.459] �🔨 mined potential block                  number=2 
     hash=faad8a…e5464d
INFO [05-14|15:51:36.459] New block is mined                       number=2    
WARN [05-14|15:51:36.693] Operator account balance on rootchain is too low 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd8a463]

goroutine 118 [running]:
github.com/Onther-Tech/plasma-evm/core/types.(*Block).Number(...)
        /home/ubuntu/plasma-evm/core/types/block.go:312
github.com/Onther-Tech/plasma-evm/pls.(*RootChainManager).addEpochSubmitTransaction(0xc00001d860, 0xc0005054d0, 0x2, 0x2, 0xc000541e38, 0x6)
        /home/ubuntu/plasma-evm/pls/rootchain_manager.go:351 +0x1e3
github.com/Onther-Tech/plasma-evm/pls.(*RootChainManager).runSubmitter.func1(0xc00133b5f0, 0x0, 0x0)
        /home/ubuntu/plasma-evm/pls/rootchain_manager.go:451 +0x726
github.com/Onther-Tech/plasma-evm/pls.(*RootChainManager).runSubmitter(0xc00001d860)
        /home/ubuntu/plasma-evm/pls/rootchain_manager.go:474 +0x201
created by github.com/Onther-Tech/plasma-evm/pls.(*RootChainManager).run       
        /home/ubuntu/plasma-evm/pls/rootchain_manager.go:175 +0x65

After this, can't commit anymore.

ubuntu@ip-172-31-19-165:~/plasma-evm$ nohup build/bin/geth --nousb
         --datadir ./operator                      --rootchain.url wss://mainnet.infura.io/ws/v3/d738213eecc341feb0bf0021390c75e4                      --operator 0x340c44089bc45f86060922d2d89efee9e0cdf5c7                      --operator.password pwd.pass &
[1] 17060
ubuntu@ip-172-31-19-165:~/plasma-evm$ nohup: ignoring input and appending output to 'nohup.out'
ubuntu@ip-172-31-19-165:~/plasma-evm$ tail -f nohup.out 
INFO [05-14|15:55:30.057] Iterating block finalized event 
INFO [05-14|15:55:30.058] RootChain block finalized                forkNumber=0 blockNubmer=0
ERROR[05-14|15:55:30.058] Failed to get challenger account         err="unknown account"
INFO [05-14|15:55:30.326] Watching epoch prepared event            startBlockNumber=0
INFO [05-14|15:55:30.580] Watching block finalized event           startBlockNumber=0
INFO [05-14|15:55:30.772] Updated mining threads                   threads=2   
INFO [05-14|15:55:30.772] Transaction pool price threshold updated price=1000000000
INFO [05-14|15:55:30.772] Etherbase automatically configured       address=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:55:30.772] current epoch is already completed. stop miner       
INFO [05-14|15:55:30.774] IPC endpoint opened                      url=/home/ubuntu/plasma-evm/operator/geth.ipc
INFO [05-14|15:55:36.387] New root chain block mined               number=10065240 numTxs=117 gasUsed=9969687 gasLimit=9985005
INFO [05-14|15:56:01.601] New root chain block mined               number=10065241 numTxs=113 gasUsed=9977296 gasLimit=9989860
INFO [05-14|15:56:03.768] New root chain block mined               number=10065242 numTxs=135 gasUsed=9802284 gasLimit=9994721
INFO [05-14|15:56:07.198] New root chain block mined               number=10065243 numTxs=106 gasUsed=9806484 gasLimit=9999320
INFO [05-14|15:56:07.253] Submitted transaction                    fullhash=0xe68b542da818db76195ff056fb8f753b98c06ebc77e9f58d030cfd1fe5576380 recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:56:08.152] New root chain block mined               number=10065244 numTxs=73  gasUsed=9998240 gasLimit=10000000
INFO [05-14|15:56:10.108] Submitted transaction                    fullhash=0x763d5703629fcef939a8c29a654e4e1c2fc93d58956cb30dbf6fee1d8c8f8a7e recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:56:14.693] New root chain block mined               number=10065245 numTxs=19  gasUsed=5502679 gasLimit=9990259
INFO [05-14|15:56:17.415] New root chain block mined               number=10065246 numTxs=89  gasUsed=9948352 gasLimit=9988564
INFO [05-14|15:56:30.539] Submitted transaction                    fullhash=0xba74590667480ec62604833173f340e08090228e8eb5b622528b1b2b53af6b9e recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:56:31.131] Submitted transaction                    fullhash=0x9cb5d1eda5d49196c514d04ed0e84fe81cdde41e6c4233b27cb3565de2489a26 recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:56:31.578] Submitted transaction                    fullhash=0xd4bde8d8e74c8ff104431c3965f70d8f5bb50245e3014ff395762007ba331970 recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:56:34.896] New root chain block mined               number=10065247 numTxs=125 gasUsed=9952313 gasLimit=9993383
INFO [05-14|15:56:40.697] New root chain block mined               number=10065248 numTxs=115 gasUsed=9969017 gasLimit=9983625
INFO [05-14|15:56:44.663] New root chain block mined               number=10065249 numTxs=0   gasUsed=0       gasLimit=9993373
INFO [05-14|15:56:51.062] New root chain block mined               number=10065250 numTxs=132 gasUsed=9989817 gasLimit=10000000
INFO [05-14|15:56:53.643] New root chain block mined               number=10065251 numTxs=45  gasUsed=9972531 gasLimit=9990236
INFO [05-14|15:56:56.265] New root chain block mined               number=10065252 numTxs=57  gasUsed=9984401 gasLimit=9995089
INFO [05-14|15:57:04.458] Submitted transaction                    fullhash=0x2730f18fa193fa94f42f9ac73ac88a4d14fe10250f7c4b3303a53856ac81270e recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:57:04.883] New root chain block mined               number=10065253 numTxs=91  gasUsed=9990084 gasLimit=10000000
INFO [05-14|15:57:13.893] New root chain block mined               number=10065254 numTxs=63  gasUsed=9982702 gasLimit=9990236
INFO [05-14|15:57:17.446] New root chain block mined               number=10065255 numTxs=46  gasUsed=9985706 gasLimit=9999991
INFO [05-14|15:57:18.802] Submitted transaction                    fullhash=0xa5b88b601b5f296a7096c9630e55c9f2f78d0c5f6fcee486467ad0dba829e158 recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:57:20.312] Submitted transaction                    fullhash=0x26ce99c83df33cf6373ff33beea7f8c0339367bf3034c2a891679aaad20b10ca recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:57:38.204] Submitted transaction                    fullhash=0xfdd5bf0003c582d8b26033113ed19198f0df5b395027d38b528c3d07255662bd recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:57:39.582] Submitted transaction                    fullhash=0xff84dd5bf5118216dcf0b845097b94488ca6144b265893c16dec7e4f0bc1a102 recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:58:11.885] New root chain block mined               number=10065256 numTxs=177 gasUsed=9992410 gasLimit=10000000
INFO [05-14|15:58:28.139] New root chain block mined               number=10065256 numTxs=35  gasUsed=9983717 gasLimit=9990227
INFO [05-14|15:58:28.660] New root chain block mined               number=10065257 numTxs=186 gasUsed=9993124 gasLimit=9999982
INFO [05-14|15:58:35.112] New root chain block mined               number=10065256 numTxs=177 gasUsed=9992410 gasLimit=10000000
INFO [05-14|15:58:35.613] New root chain block mined               number=10065257 numTxs=107 gasUsed=9992702 gasLimit=10000000
INFO [05-14|15:58:35.878] New root chain block mined               number=10065258 numTxs=199 gasUsed=9985369 gasLimit=10000000
INFO [05-14|15:58:36.097] New root chain block mined               number=10065256 numTxs=35  gasUsed=9983717 gasLimit=9990227
INFO [05-14|15:58:36.621] New root chain block mined               number=10065257 numTxs=186 gasUsed=9993124 gasLimit=9999982
INFO [05-14|15:58:36.897] New root chain block mined               number=10065258 numTxs=153 gasUsed=9981540 gasLimit=9990218
INFO [05-14|15:58:40.517] Submitted transaction                    fullhash=0x0bba5ac2e823c368f167539c802cf3d2acf7c0360255c4c4e0e791b590b34523 recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:58:41.069] Submitted transaction                    fullhash=0xf4a7729d76a43b58e80c87613a686dc5bbb2371e721c7bd2e1ce7253867adbe6 recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:58:42.250] Submitted transaction                    fullhash=0x83fde29cf2e4cd04254349956ad9e29547c7ad9179e4792371f5d3a08eede4f5 recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:58:42.428] New root chain block mined               number=10065259 numTxs=149 gasUsed=9976410 gasLimit=9995084
INFO [05-14|15:58:42.726] Submitted transaction                    fullhash=0xcdf35c357d5a2b313424d7a27f3b3f39044d8839c652d0babc4881b823aff45a recipient=0x340C44089bc45F86060922d2d89eFee9e0CDF5c7
INFO [05-14|15:58:45.970] New root chain block mined               number=10065260 numTxs=110 gasUsed=9992202 gasLimit=9999938
INFO [05-14|15:58:51.245] New root chain block mined               number=10065261 numTxs=150 gasUsed=9956358 gasLimit=9990174
INFO [05-14|15:58:55.522] New root chain block mined               number=10065262 numTxs=10  gasUsed=399171  gasLimit=9980454
INFO [05-14|15:59:21.953] New root chain block mined               number=10065263 numTxs=131 gasUsed=9959555 gasLimit=9970709
@ggs134 ggs134 changed the title Error when tried to commit (Error when tried to commit)panic: runtime error: invalid memory address or nil pointer dereference May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant