Hot answers tagged

79

May be there is a list of network ids? If not, let's create one. Good idea. 0: Olympic, Ethereum public pre-release PoW testnet 1: Frontier, Homestead, Metropolis, the Ethereum public PoW main network 1: Classic, the (un)forked public Ethereum Classic PoW main network, chain ID 61 1: Expanse, an alternative Ethereum implementation, chain ID 2 2: Morden ...


21

This is the chain configuration field, defined in config.go: // ChainConfig is the core config which determines the blockchain settings. // // ChainConfig is stored in the database on a per block basis. This means // that any network, identified by its genesis block, can have its own // set of configuration options. The available fields and their ...


18

How is it different than networkID? ChainID was introduced in EIP-155 to prevent replay attacks between the main ETH and ETC chains, which both have a networkID of 1. It's basically just an additional way to tell chains apart. Subsequent to EIP-155, ETH has a chainID of 1, while ETC has a chainID of 61 (even though they still have the same networkID of 1)....


15

I had the same problem and found that the issue was: "extraData": "0x0", If you change it to: "extraData": "0x00", The problem goes away. At this point though you'll have another issue because in the latest version of geth you need a config section. Add the following and you should be good to go. "config": { }


11

For any geth node to join a network there are 2 requirement one is to have the same genesis block and other is to have the same networkid. Once these requirements are satisfied, to join a network you have to know the enodeid of the nodes you want to connect to. In case of open Ethereum networks like mainnet or testnet, you have a set of bootnodes hardcoded ...


8

Asking for the last block mined, it will return the gasLimit of the block https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgetblock var block = web3.eth.getBlock("latest"); console.log("gasLimit: " + block.gasLimit);


8

There is a treasure trove of tokens sent to address(0) to "burn" under the assumption that no one has the private key. and no one ever will. In a manner of speaking, I would classify it as a very large open bounty. It's like a pinata for mathematicians and quantum computers. Hope it helps.


7

The same problem happened to me with geth 1.6, with a genesis file similar to yours. Last friday geth updated to 1.6 (https://github.com/ethereum/go-ethereum/releases/tag/v1.6.0). In this release: Genesis block JSON handling is stricter and safer. Notably, most JSON fields now require the "0x" prefix. (#3794) I found this documentation page: https://...


6

You cannot do a init again if you have already done a init on datadir. In order to achive what you want you need to first create simply create account .... once account is created use that for pre-funding, by putting it in the genesis file, now go for the init of datadir. so steps are 1) Creation of account in datadir geth --datadir <...


5

In order to change the Homestead block, you will need to recompile geth from source. You can see the relevant line: MainNetHomesteadBlock = big.NewInt(1150000) Just change this to to MainNetHomesteadBlock = big.NewInt(0) and recompile using the instrutions You can test that Homestead is enabled by compiling this contract: contract TestHomestead{ ...


5

You can change source file consensus to implement. As follows: clone [go-ethereum] source file open consensus/ethash/consensus.go file, then find AccumulateRewards function and annotation tow lines. The result is func AccumulateRewards(state *state.StateDB, header *types.Header, uncles []*types.Header) { reward := new(big.Int).Set(blockReward) r := ...


5

Use something like this: { "config": { "chainId": <yourChainId>, "homesteadBlock": 0, "eip150Block": 0, "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, "clique": { "period": <yourPeriodInSecs>, "epoch": <yourEpochInBlocks> } }, "...


4

How did you build yor contract ? If you want to add a contract to genesis block you need to build it with solc --bin-runtime. By default solc and ide like remix build return code that is used for creating the contract. This code returns the actual code that is stored in the blockchain


4

inside module.exports, add Gas and gasPrice. network_id: "*", // Match any network id gasPrice: 0, gas: 4500000


3

You do everything right with init. As far as I understand you updated geth to last release, where hardware wallets support was added. So it requires libusb to be installed in your system. You should install it.


3

The connection will drop if they are on different chains, you can run Parity with -lsync=trace to see what is going on. It probably has to do with hard fork transitions, Geth does not include them by default. Have a look here and try using the linked generator.


3

Shut down geth using Control-C for instance #1 and Control-D for instance #2. Then type geth account new to create a new account. Enter in a passphrase that you will need to remember if you want to unlock the account. Then restart geth and you should see your first account (or coinbase) listed.


3

What do the other config values mean? Ethereum has been live for a long time. Over time, patches and improvements are applied to the chain for better stability or more features. This goes for Homestead (which added e.g. the longest-chain rule) and many Ethereum Improvement Proposals (EIP). When the rules change, new transactions and blocks comply to those ...


3

Since you want to create a private Ethereum network, you need to create your own genesis file with customized parameters suitable for you. This ensures that you're running your version of the blockchain. Not the public ethereum blockchain. Here are some useful links: http://tech.lab.carl.pro/kb/ethereum/testnet_setup http://ethdocs.org/en/latest/network/...


3

I haven't actually looked through your hand-crafted chainspec... But what I'd suggest, to save time in the long run (and to discourage others from doing it by hand), is to use a translation tool to do it for you. In the README of the repository you link to, under the See also section, there's a link to keorn's translation tool, which will convert Geth -> ...


3

I think it's mostly a nomenclature debate. I think the Bitcoin wiki sums it up pretty well (and it's the same case with Ethereum, at least in terms of naming): A genesis block is the first block of a block chain. Modern versions of Bitcoin (or Ethereum) number it as block 0, though very early versions counted it as block 1. The genesis block is almost ...


3

Block 0 wasn't mined. It was "manually" written by geth. Mining occur only when the process does pass through consensus stage, since block 0 never goes through consensus, nobody gets mining rewards. The processing of the genesis block is special and you can see it in core/genesis.go, the function is DefaultGenesisBlock() Current versions of geth reject ...


3

Network id and Chain id are the same thing You can edit NetworkId in eth/config.go & params/config.go and get rid of this problem forever, you won't need to specify network id on the commandline anymore. Ethereum's geth has hardcoded the value 1 in the files I told you , so this is why you have these problems. The chain id is now part of transaction as ...


3

You probably aren't mining any Blocks. So the smart contract transactions don't get mined.


2

This feature involves AlethZero. There's an option in AZ to export the state which can be imported in Mix using this feature.


2

Your method does not return any value. Calling set() will return the transaction hash of the calling transaction. You also need to specify the account from which you are deploying the transaction: getAndSet.set(2, {eth.accounts[0], gas: 1000000}); (make sure you have enough balance on that account).


2

yes, you could setup your private chain and indicate which nodes are allowed to connect to your blockchain. 1-define the same genesis file and the same network id. 2-use the following options to restrict the allowed node : --nodiscover : Use this option to make sure that your node is not discoverable by people who do not manually add you. --maxpeers ...


2

it is not a problem with the balance, You need to reinitialize your blockchain with your new genesis block so run your previous command but put init before console. the idea is to rerun the init option in the second time otherwise your genesis file is ignored. run geth --datadir "d:\block\data" init "d:\block\CustomGenesis.json console"


2

error: could not execute process rustc -vV (never executed) Install rust https://www.rust-lang.org/en-US/ :) curl https://sh.rustup.rs -sSf | sh


2

No. From the Ethereum presale message: You are about to make an ether purchase. Please keep the attached wallet file safe. It will serve as a cryptographic receipt of your purchase, along with your password. The password you created and entered on the sale site is the key to your ether so please do not forget it. And please note: there are no ...


Only top voted, non community-wiki answers of a minimum length are eligible