Do i need fully synced node to access ethereum blockchain through geth using web3js?

PS. i want to access ethereum blockchain through geth only, not metamask, infura, etc.

  • Your question is unclear. geth = node (i.e., geth IS a type of node). Do you possibly mean "in order to"? The answer is - depending on the purpose of your web3 script. For example, I believe that for ether balances, fast sync is sufficient. – goodvibration Feb 10 '20 at 13:09
  • Thanks for your reply.. i meant do i need syncing my geth and wait that sync to fully completed if i want to do any web3js actions, ex. sending transaction (call: transfer and transferForm function of my smartcontract) ? – T-Bee Feb 10 '20 at 13:21
  • To my understanding, you need to wait for full sync, or at least until the block of your contract's deployment. Without it, your contract will simply not be present in the data available to the node. – goodvibration Feb 10 '20 at 14:07
  • Ah, got it... thanks a lot @goodvibration – T-Bee Feb 10 '20 at 14:14

Check this answer . It also applies to smart contracts instead of balances. So, yes, you would have to sync geth (at least) until wherever you need. Hope it helps.

  • "You would need to sync until wherever you need"... That's tautology; Anyone could say this, without any Ethereum knowledge whatsoever. – goodvibration Feb 10 '20 at 14:28
  • My intention was to try making him understand that if he won't sync his node at least to the block that has the data he needs, he won't be able to access it. But I guess it's hard to offer a gratifying answer around here. – João Quintanilha Feb 10 '20 at 15:09
  • I just mentioned that you stated the obvious. You could probably do better than that. For example, before you gave an answer, I commented in the question that he will probably need to sync "at least until the block of your contract's deployment". That's a lot more informative than "sync until wherever you need" (which is essentially what he has asked to begin with). Of course, I wasn't 100% about the details, so I didn't post it as an answer. But just writing an answer of the form "You would need to sync until wherever you need"... well, it doesn't really answer anything now, does it? – goodvibration Feb 10 '20 at 15:18
  • Well, to be fair it's not that you and I had much info at all. Saying "until the block of your contract's deployment", it's as helpful as my answer, since he didn't refer anything about using a smart contract or anything else. He specifically asked about "accessing ethereum blockchain". I understand your comment, appreciate it, and ofc well try better.. but I guess I interpreted your comment a litle bit on a rude way. – João Quintanilha Feb 10 '20 at 15:24
  • 1
    Anyway... thanks to all whoever answer my question... all of u both are appreciated... Thank you so much... – T-Bee Feb 10 '20 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.