0

my questions is... I want to run a fullnode like geth to save transactions of my different eth addresses with python into a database. But I have no idea how to do that. Are there any special libraries or does geth have a Json interface? Thank you for your ideas

PS: I know i can also use ethscan.io, but i dont want use services like this.

  • You might be looking for Web3.py, which enables you to connect to your full node via python: http://web3py.readthedocs.io/en/stable/ – carver Jul 24 '18 at 16:32
  • Have you, this site is very helpful, but i cant find a method whitch give my all transactions from a address. I find just a Method where i have to put the tx_hash –  Jul 26 '18 at 15:16

1 Answers1

0

There is no direct way to do this (in an efficient way, more about that later) by using Web3.py, or any Web3 implementation at this time.

Really the only way is to use Etherscan or something else.

Now on to the really inefficient way. You do this by using a for loop to go through all the blocks. If you narrowed it down to like 10 blocks, you wouldn't have an issue, but if you wanted to go through all 6,000,000 (I think we are there now), it would take too long. If you really want to go this route, look at https://ethereum.stackexchange.com/questions/2531/common-useful-javascript-snippets-for-geth/3478#3478

James
  • 1,928
  • 3
  • 13
  • 30
  • Thx for your opinion. By the way, do you know why geth is never 100% syncing? Am am at 99,9888...% it left almost 70-100 blocks its my internet connection the problem or is this normal ? –  Aug 03 '18 at 22:34
  • Not a problem. the reason it is never at 100% is because new blocks are mined every second, sometimes multiple a second, so it is always downloading blocks. Also, if you think my answer was helpful, please upvote it and mark it as the correct answer. – James Aug 03 '18 at 22:58
  • Ok I already knew that never can be 100%, I thought it will be 1 or 2 blocks but I am always 50-100 blocks behind. That can't be a activ Full node –  Aug 03 '18 at 23:01
  • Go to fast.com and tell me what your internet speed is. – James Aug 03 '18 at 23:02
  • Also are you using an SSD? If so, it is not supported. You need to use light mode. – James Aug 03 '18 at 23:03
  • Reference is here https://github.com/ethereum/go-ethereum/issues/16218 An HDD can not keep up. – James Aug 03 '18 at 23:04
  • It almost 25 mbits –  Aug 03 '18 at 23:05
  • Are you using an SSD? – James Aug 03 '18 at 23:09
  • Ah ok. That's the problem. No I have just use a normal hdd to try it –  Aug 03 '18 at 23:20
  • How can I start the light mode? –  Aug 03 '18 at 23:21
  • Just geth ? What I should use? –  Aug 03 '18 at 23:30
  • Try `geth --syncmode "light"` – James Aug 03 '18 at 23:30
  • Ok, but what are exactly the differences ? –  Aug 03 '18 at 23:33
  • How about you create a new question asking the difference just so if someone needs help in the future they can find it. I will answer it right away. – James Aug 03 '18 at 23:35
  • Not a problem at all. Please just create separate questions and I will be happy to answer them all to the best of my ability! – James Aug 03 '18 at 23:36
  • An other question how can I check the pending transactions in geth. I can't find any method... –  Aug 28 '18 at 23:48
  • Please create another question. – James Aug 31 '18 at 03:49