Trying to send all of my ETH in geth console: gas required exceeds allowance

Cryptocurrency News and Public Mining Pools

Trying to send all of my ETH in geth console: gas required exceeds allowance

So, let me first say I'm a total noob in ethereum and crypto in general. I've had some ethereum (not much, ~0.5) for a couple of years but don't do anything with it (and haven't even done anything with it).

I keep my ETH in a local wallet on my computer, not on some online crypto platform (when I was setting this up I kept reading if you keep your ETH elsewhere you don't really own it, you just trust some third party not to spend it and to give it to you when you ask).

A couple days ago I decided to see what my account looked like, but that was easier said than done. I've missed the whole PoW->PoS switchover (though I remember it was planned when I set up my account). I've done a lot of reading the last few days and a lot of work, but now I'm currently running a fully synced node (execution client: geth, consensus client: prysm) and after some sweaty palms, trying various account passwords for five minutes, everything seems to be working.

However: I still want to keep my crypto local, but I can't keep this node running 24/7 on my PC preventing it from powering down or hibernating, and eating 1Tb (and counting!) of precious disk space. Similarly, I do not want to shut the node down and have to go through this same process again when I want access in the future. (By that time syncing the node will likely require me to buy a larger ssd, right now I only had to resize partitions which was bad enough)

Long story short: I want to just get rid of it. I also have a BTC wallet and decided to just put what ETH I have into that. I'm trying to use sideshift.ai for that (but I'm open to suggestions if there is something better/easier/more trustworthy).

I'm trying to transfer as much ETH as I can to sideshift's address in geth console with the following command:

txh = eth.sendTransaction({from: eth.accounts[0], to: "0x25E8ac4C93c561672D22Ce6c0c7f90AbDC1F45eB", value: eth.getBalance(eth.accounts[0]).sub(web3.eth.gasPrice.mul(21000))}); Error: gas required exceeds allowance (10501) at web3.js:6387:9(39) at send (web3.js:5116:62(29)) at <eval>:1:26(27) 

But I always get the above error. Is there something wrong in my calculation? I don't actually know what the number in brackets is (10501) But I figured maybe a transaction does not cost 21000 in gas as I've read, so I tried the same with web3.eth.gasPrice.mul(21000 + 10501) instead, but get the same error now reading Error: gas required exceeds allowance (15752) (which is almost exactly 10501 + 10501/2, but maybe that's a coincidence).

Anyway, any help and suggestions are appreciated. Thanks!

submitted by /u/bepaald
[link] [comments]