Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

(FR) give account balance to default account #86

Closed
drandreaskrueger opened this issue Dec 3, 2018 · 7 comments
Closed

(FR) give account balance to default account #86

drandreaskrueger opened this issue Dec 3, 2018 · 7 comments

Comments

@drandreaskrueger
Copy link

The default account has no money:

geth attach http://localhost:8545

Welcome to the Geth JavaScript console!
instance: Parity//v1.11.11-stable-cb03f38-20180910/x86_64-linux-gnu/rustc1.28.0
coinbase: 0x9cfd59da9b75f06719de2c8ccead40e8e3799bfc
at block: 16 (Mon, 03 Dec 2018 18:28:15 GMT)
 modules: eth:1.0 net:1.0 parity:1.0 parity_accounts:1.0 parity_set:1.0 personal:1.0 rpc:1.0 signer:1.0 traces:1.0 web3:1.0

> eth.accounts
["0x9cfd59da9b75f06719de2c8ccead40e8e3799bfc"]

> eth.getBalance(eth.accounts[0])
0

I see that via spec.json you have given money to one account:

> eth.getBalance("0x00Ea169ce7e0992960D3BdE6F5D539C955316432")
1.606938044258990275541962092341162602522202993782792835301376e+60

it is just not available on the http://localhost:8545 default node address.

Could you make your script give some money to that account?


P.S.: I started like this

cd paritytech_parity-deploy
git checkout a76a2f1b7173ff5d138e0cb66efdb939bfe33aab 
sudo ./clean.sh
./parity-deploy.sh --nodes 4 --config aura --name myaura --geth
sed -i 's/parity:stable/parity:v1.11.11/g' docker-compose.yml
docker-compose up
@drandreaskrueger
Copy link
Author

drandreaskrueger commented Dec 3, 2018

My reason: I get a lot of

'Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 1 and got: 0.'

in my unittests when running them on parity aura (parity instantseal no problem at all).

@drandreaskrueger
Copy link
Author

drandreaskrueger commented Dec 4, 2018

it happened now because previously I had always used

--gasprice 0 

so no balance did not matter when only sending smart contract calls with 0 value.

But now, in my tests, I am sending money, just to create transactions, i.e. blocks, in an uncomplicated way. And for that I actually want non-zero balances.

And in general, I think it's a good idea, to drop some ETH on the default account of :8545.
Makes your whole tool more useful, no?

@drandreaskrueger
Copy link
Author

drandreaskrueger commented Dec 4, 2018

My workaround now is sending (virtual no virtual) money (lol) by using {'value': 0}.

See amount=0.

So, no priority for me anymore, but in general probably a good extra feature of parity-deploy.

@ddorgan
Copy link
Collaborator

ddorgan commented Jan 23, 2019

There is a built in balance on aura accounts...

Key:

{"id":"8923b5b4-74a1-7065-2860-d3b1576ca9ba","version":3,"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"91b6f9053a255c7a8d56a16af9319477"},"ciphertext":"a4e71b6d76d8ea369cdf6925ed8343c98763faf39fd60535788f23e5bfa6fcb7","kdf":"pbkdf2","kdfparams":{"c":10240,"dklen":32,"prf":"hmac-sha256","salt":"aea8ab45f8c89ed5454e4b431befda1eb208edda27f4c03f467cc97314c38956"},"mac":"a4d01eff44659abc18a48d2784b42a28b53bdf436626db98aeaceb584070719e"},"address":"00ea169ce7e0992960d3bde6f5d539c955316432","name":"","meta":"{\"description\":\"\",\"passwordHint\":\"\",\"timestamp\":1495730764711}"

@ddorgan ddorgan closed this as completed Jan 23, 2019
@drandreaskrueger
Copy link
Author

@ddorgan Thanks.

Could you please make that address 00ea169ce7e0992960d3bde6f5d539c955316432 the default account on the first node :8545 ?

eth.accounts[0]

then

eth.getBalance(eth.accounts[0]) > 0

would be useful for almost everyone who is using parity-deploy.

@drandreaskrueger
Copy link
Author

@ddorgan just look at the other ones:

TestRPC

node version string = TestRPC/1.3.5/linux/python3.5.3
first account of node is 0x82A978B3f5962A5b0957d9ee9eEf472EE55B42F1,
balance is 1025005 Ether

geth-dev

node version string = Geth/v1.8.14-stable-316fc7ec/linux-amd64/go1.10.3
first account of node is 0x8Cc5A1a0802DB41DB826C2FcB72423744338DcB0,
balance is 904625697166532776746648320380374280103671755200316906552.007112153821325312 Ether

quorum-crux

node version string = Geth/v1.7.2-stable-3f1817ea/linux-amd64/go1.10.7
first account of node is 0xed9d02e382b34818e88B88a309c7fe71E65f419d,
balance is 1000000000 Ether

and even

parity-deploy instantseal:

node version string = Parity-Ethereum//v2.2.3-beta-6b0a280-20181130/x86_64-linux-gnu/rustc1.30.1
first account of node is 0x00a329c0648769A73afAc7F9381E08FB43dBEA72,
balance is 1606938044258990275541962092341162602522202.993782792835301376 Ether

but still nothing for

parity-deploy AURA

node version string = Parity-Ethereum//v2.2.3-beta-6b0a280-20181130/x86_64-linux-gnu/rustc1.30.1
first account of node is 0x3EAFeAc807B027830f406Ab3d0D54Ff9e1D2DB60,
balance is 0 Ether

@ddorgan
Copy link
Collaborator

ddorgan commented Feb 1, 2019

@drandreaskrueger btw with the latest master you should now have a balance in the account:

(py3eth) davidd@chainhammer01:~/chainhammer$ ./tps.py
versions: web3 4.3.0, py-solc: 2.1.0, solc 0.4.23+commit.124ca40d.Linux.gpp, testrpc 1.3.4, python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
web3 connection established, blockNumber = 0, node version string =  Parity-Ethereum//v2.2.7-stable-b00a21f-20190115/x86_64-linux-gnu/rustc1.31.1
first account of node is 0x00Ea169ce7e0992960D3BdE6F5D539C955316432, balance is 1606938044258990275541962092341162602522202.993782792835301376 Ether
nodeName: Parity, nodeType: Parity, consensus: ???, network: 17, chainName: parity, chainId: -1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants