Closed Netherdrake closed 6 years ago
From issue #388, I assume you're running geth
v1.7.3
?..
What does your project.json
look like, if you have one?
Do you have anything in ~/.populus/
?
Yes, I'm on geth 1.7.3.
There is no project.json
. My ~/.populus
has one file named config.json
that contains {}
.
You may try to delete/move the ~/.populus
directory, as Piper suggested on gitter, although I don't think this will help.
The diff you've posted also seems to miss some quotes - should be testnet = "testnet"
.
The error message - in particular, "line 131":
File /Users/user/GitHub/tmp/populus/populus/chain/geth.py, line 131, in __enter__
self.geth.wait_for_ipc(60)
suggests you're running a git
version of Populus, and not strictly a 2.2.0
package from pip
.
All that said, I'm able to reproduce the IPC timeout (on an Arch Linux machine, so not OSX-specific), for a Greeter project that's using populus==2.2.0
.
However, doing a ln -s ~/.ethereum/testnet ~/.ethereum/ropsten
helps get past that, and get a response from geth
on its inability to get a deploying account (as expected: I haven't created one).
It seems like the link hasn't worked out properly on mac, until I re-did it with absolute paths.
Now I'm running into another issue, which is that contracts are undeployable. For example on Greeter
, I get:
raise ValueError(response[error])
ValueError: {'code': -32000, 'message': 'insufficient funds for gas * price + value'}
Despite having more than 10 ETH on the from
(etherbase) account. I run geth
like so:
geth --testnet --etherbase aaf3ffee9d4c976aa8d0cb1bb84c3c90ee6e9118 --unlock aaf3ffee9d4c976aa8d0cb1bb84c3c90ee6e9118 --password unlock.txt
Do paste the full traceback. I've done my testing with a node in "light" mode, where etherbase
is not supported via RPC/IPC.
populus deploy -c ropsten Greeter
Beginning contract deployment. Deploying 1 total contracts (1 Specified, 0 because of library dependencies).
Greeter
Deploying Greeter
Traceback (most recent call last):
File "/Users/user/anaconda/bin/populus", line 11, in <module>
/Users/user/anaconda/lib/python3.6/site-packages/geth/mixins.py:105: DeprecationWarning: generator 'JoinableQueue.__iter__' raised StopIteration
for line in self.stdout_queue:
/Users/user/anaconda/lib/python3.6/site-packages/geth/mixins.py:112: DeprecationWarning: generator 'JoinableQueue.__iter__' raised StopIteration
for line in self.stderr_queue:
load_entry_point('populus', 'console_scripts', 'populus')()
File "/Users/user/anaconda/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/user/anaconda/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/user/anaconda/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/user/anaconda/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/user/anaconda/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/user/anaconda/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/user/GitHub/tmp/populus/populus/cli/deploy_cmd.py", line 43, in deploy_cmd
deploy(project, logger, chain_name, wait_for_sync, contracts_to_deploy)
File "/Users/user/GitHub/tmp/populus/populus/api/deploy.py", line 135, in deploy
contract_name=contract_name,
File "/Users/user/GitHub/tmp/populus/populus/utils/cli.py", line 164, in deploy_contract_and_verify
kwargs=deploy_kwargs,
File "/Users/user/anaconda/lib/python3.6/site-packages/web3/contract.py", line 311, in deploy
txn_hash = cls.web3.eth.sendTransaction(deploy_transaction)
File "/Users/user/anaconda/lib/python3.6/site-packages/web3/eth.py", line 221, in sendTransaction
[transaction],
File "/Users/user/anaconda/lib/python3.6/site-packages/web3/manager.py", line 96, in request_blocking
raise ValueError(response["error"])
Upon further digging, this seems to be an issue with geth
configuration.
So, a TL:DR to anyone running into original issue:
ln -s ~/.ethereum/testnet ~/.ethereum/ropsten
ropsten
entry with correct geth.ipc path to project.json
What was wrong?
Suppose a fresh Greeter project as initiated by
populus init
. Suppose a runninggeth --testnet
, with IPC at:~/Library/Ethereum/testnet/geth.ipc
Suppose a symlinked folder~/Library/Ethereum/testnet
to~/Library/Ethereum/ropsten
as suggested hereThis will fail:
With:
I also tried modifying
populus/chain/geth.py
:Cute Animal Picture