Initially, I was working locally with ganache and the smart contracts were working correctly. Then I tried to work on geth and I get the following error:
Traceback (most recent call last):
File "manager.py", line 165, in <module>
ui.start_application()
File "manager.py", line 142, in start_application
self.register_user()
File "manager.py", line 68, in register_user
manager.register_user()
File "manager.py", line 16, in register_user
self.blockchain.RegistrationContract.registerUser()
File "/mnt/c/Users/Achilleas/Dissertationnew/application/registrationContract.py", line 11, in registerUser
tx_receipt= self.contract.functions.registerUser().transact({'from': User.address})
File "/mnt/c/Users/Achilleas/Dissertationnew/application/env/lib/python3.6/site-packages/web3/contract.py", line 1151, in transact
**self.kwargs
File "/mnt/c/Users/Achilleas/Dissertationnew/application/env/lib/python3.6/site-packages/web3/contract.py", line 1454, in transact_with_contract_function
txn_hash = web3.eth.sendTransaction(transact_transaction)
File "/mnt/c/Users/Achilleas/Dissertationnew/application/env/lib/python3.6/site-packages/web3/eth.py", line 264, in sendTransaction
get_buffered_gas_estimate(self.web3, transaction),
File "/mnt/c/Users/Achilleas/Dissertationnew/application/env/lib/python3.6/site-packages/web3/utils/transactions.py", line 84, in get_buffered_gas_estimate
gas_estimate = web3.eth.estimateGas(gas_estimate_transaction)
File "/mnt/c/Users/Achilleas/Dissertationnew/application/env/lib/python3.6/site-packages/web3/eth.py", line 305, in estimateGas
[transaction],
File "/mnt/c/Users/Achilleas/Dissertationnew/application/env/lib/python3.6/site-packages/web3/manager.py", line 112, in request_blocking
raise ValueError(response["error"])
ValueError: {'code': -32000, 'message': 'invalid opcode: SHR'}
The geth script I use is the following:
geth --rpc --rpccorsdomain "*" --rpcapi "db,eth,net,web3,personal" --datadir ./chaindata/
--nodiscover --rpcport "port" --rpcaddr "address" --networkid "id" --identity "identity" --unlock
"account_address" --allow-insecure-unlock --mine --minerthreads=1
"User.address" in the error message is the same address with "account_address" in geth script.
I did not change anything in the code. Do I need to sign the transaction (the account is unlocked)?