New answers tagged

0

I would like to add that, when reinitializing, if you only delete the chainData folder inside the geth folder of your datadir, you will retain any previous accounts, although they lose all their ether. For me that is a convenience because I store the account numbers in a param file for my Dapps. And of course the Dapps folder is inside your datadir too, so ...


0

I have implemented the above method with python, and it feels about the same as the computing power of the whole network hashrate! eth = create_rpc("ETH") current_height = int(eth.eth_blockNumber(), 16) sampleSize = 200 current_block = eth.eth_getBlockByNumber(hex(current_height), False) pre_height = eth.eth_getBlockByNumber(hex(current_height - ...


0

In recent versions geth doesn't overwrite the directory if it was already initialized. You should be able to test if geth overwrite data repeating the steps in a new empty directory.


1

Try specifying explicitly your private network informations such as in this example from the web3js documentation : web3.eth.accounts.signTransaction({ to: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55', value: '1000000000', gas: 2000000 common: { baseChain: 'mainnet', hardfork: 'petersburg', customChain: { name: 'custom-chain', chainId: 1, ...


0

If it's a regular Proof-of-Work blockchain then the miners' rewards are minted, so they appear out of thin air. Here's some more info about mining: https://cointelegraph.com/ethereum-for-beginners/how-to-mine-ethereum-guide-for-beginners As for the gas cost, the sender of the transaction always pays for the gas. But as it's your own blockchain this is quite ...


1

Looking at the image, it seems to me you are importing the backup of a private network to a node initializated with the Mainnet. I suspect this because: geth says ChainID is 1, so Mainnet the import process seems to stop with the very first block and the error is unknown ancestor, so it don't know the genesis block your block #1 hash is not the hash of the ...


2

You can do this way : const EthereumTx = require('ethereumjs-tx').Transaction; import Common from 'ethereumjs-common'; const customCommon = Common.forCustomChain( 'mainnet', { name: 'my-private-blockchain', networkId: NETWORK_ID, chainId: CHAIN_ID, }, 'istanbul', ); ...


Top 50 recent answers are included