I am deploying a private ethereum blockchain (geth) on a virtual machine on Azure. Upon deploying my Solidity contracts on the blockchain and launching my NodeJS application to it, I am able to add data normally through web apis of the nodejs Loopback App and everything is working fine and I can see the added data using the GET apis.
However, after 1-2-3 days (random) I am not able to retrieve the data I added through my GET apis, while am still able to add new data which confirms that Geth is running fine and wasn't interrupted.
I am running geth using:
geth --datadir ./myDataDir --rpc --networkid 1441 console 2>> myEth.log
myEth.log isn't showing anything wrong, nodejs logs are clean as well.
eth.syncing
shows false
which means the network is synced.
size of myDataDir
folder is still increasing so logically data should be somewhere there but it's not showing.
Its advised not to store images on the blockchain due to high gas cost involved for each transaction. Blockchain technology is designed to provide authenticity, transparency and security. if your images need them, then you should get a NFT for them.
A 2021 calculation estimated that storing 500kb on the Ethereum blockchain would cost $20,000, meaning storing small images on the Ethereum blockchain is more impractical. A discussion regarding the possibility of storing images on the Ethereum blockchain can be found in a thread on StackOverFlow.
This is not a private blockchain!
--networkid 1441
This only says that you communicate with clients that also run a network with ID 1441. It might be unlikely, but if someone else runs a network with ID 1441, this node will connect to your node just fine. And in case, the other network with the same ID has a longer (more "heavier") chain, this overwrites your local chain.
To avoid this, try a more random network ID, maybe 7-9 digits, and disable discovery with
--nodiscovery
Or just use the --dev
preset.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With