i'm running my private node with Geth, v1.9.13, deployed my Smart Contract via truffle migrate and everything works fine. when i shutdown the machine and startup my node again, everything seems not working no more, for example making a simple call to to the Contract returns me the error "new BigNumber() not a base 16 number", sending tx has no effects, it doesn't emit events no more, my contract looks almost like "freezed"; so when i deploy again the contract everything start to work again, on the new contract's address obviously...

i'm starting my node in this way:

geth --mine --datadir /myDir --networkid 777 --rpcapi "db,eth,net,web3" --rpc --rpccorsdomain "*" --unlock "0xf60eb8f920980e7b7706efca7af153e02db975f4" --password ~/blockchain/password.txt --rpcport "8545" --rpcaddr "" --allow-insecure-unlock --syncmode full

and after any restart the block number still going correctly on

i need my Contract to still working and mantains data also after several node restarts.

Any suggestion will be great!

  • Are you waiting for geth to finish when you close it? The problem usually is that geth didn't have enough time to complete a clean exit and storage might get corrupted. – Ismael Apr 22 at 12:54
  • 1
    @Ismael that was the problem, yesterday i did a manual close of geth and today at node restart everything still working correctly. now i just have to understand how to close geth in the right way but automatically...thanks a lot you have been very helpful – spawn85 Apr 23 at 7:36
  • I do not work in infrastructure so I may be wrong, but you should be able to use a process manager to handle start up and shutdown, like systemd, supervisor, etc. – Ismael Apr 23 at 14:21

Your Answer

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

Browse other questions tagged or ask your own question.