Ethereum (ETH) Blockchain Explorer

ChainId vs NetworkId? How do they differ on Ethereum?

ChainId vs NetworkId? How do they differ on Ethereum? submitted by twigwam to ethereum [link] [comments]

Bootnode can't finde external node!

Hi everyone, i can't connect a node from another machine/ip to bootnode.... I created a private Ethereum network with puppeth, i followed this guide:
bootnode -nodekey boot.key -verbosity 9 -addr IPBootNode:30310
NODE from second machine (different internet connection):
geth --datadir node/ --syncmode 'full' --port 30314 --rpc --rpcaddr --rpcport 8504 --rpccorsdomain "*" --rpcapi 'personal,db,eth,net,web3,txpool,miner' --bootnodes '[ENODEURL]@[IpBootNode]:0?discport=30310' --networkid 1515 --gasprice '0' --mine --ipcpath "MyPath"
I have other two node in the same machine where is bootnode. If the second machine is connect to the same wifi of the firt machine, everything works fine. The node found each other.. But i want to connect node from different ip.
Thank you!
submitted by AdriGeorge97 to ethdev [link] [comments]

Geth Private Network

Hello Everyone,

I'm having a small issue with peer discovery. While I am able to successful link all the nodes on my private net together through addPeer it's not happening as I imaged it would. If I connect 3 devices to a node I'm hosting on the cloud I can view all three connections from that node. The other nodes however are only able to see that single node unless I manually run addPeer and connect all of them together. Here's the list of commands I run for the start up phase.

geth init genesis.json // The same genesis file on all nodes

geth --identity "ericsson" --rpc --rpcport "8080" --rpccorsdomain "*" --rpcapi "db,eth,net,web3" --port "30303" --networkid 1337 console 2>>eth.log

admin.addPeer("enode://ceb718ce11632d27feca519SAMPLEADDRESSb9049602e3b1b96dd383374f5[email protected]12.34.567.890:30303?discport=0")

I think it might be that I'm missing a flag in the geth command but I'm not sure.

Any help would be appreciated I've just started looking into Ethereum.
submitted by James_ericsson to ethereum [link] [comments]

contrato inteligente en Ethereum

En este Post intentaremos crear nuestro primer contrato Inteligente en Ethereum, para lo cual seguiremos los siguientes pasos :
1.- ingresa al editor de código para solidity desde la siguiente dirección
2.- crear un nuevo documento denominado holamundo.sol
3.- este primer contrato, será algo sencillo, y consiste básicamente en hacer el registro de un dato en nuestra Blockchain y poder cambiar el mismo para lo que utilizaremos el siguiente código:
pragma solidity ^ 0.4.18;
contract HolaMundo {
string public word = 'Hola Mundo';
function HolaMundo() public {
word ;
function setword(string _new) public{
word = _new; 
} }
4.- una vez compilado el programa y validado que cumple con el objetivo, es hora de poder ejecutar el miso desde nuestro nodo ethereum para lo cual seguiremos los siguientes pasos.
5.- abrimos nuestra consola de comandos y ejecutamos nuestro nodo ethereum desde la carpeta "Eth" que creamos en el anterior post y ejecutamos la sentencia siguiente:
Geth --datadir Eth -- networkid 1337 --maxpeers 3 --nodiscover -- mine
Este proceso puede demorar mucho tiempo.
Con esto ya tendremos nuestro nodo en modo minero para procesar cualquier transacción
6.- abrimos nuestra billetera ethereum y nos vamos a la pestaña de contratos, buscamos la opción nuevo contrato y copiamos el código del paso 3.
7.- Ejecutamos el contrato, con cualquiera de nuestras cuentas creadas y esperamos a que se procese la transacción
8.- una vez confirmada la transacción nos vamos al contrato creado y realizamos las pruebas correspondientes.
Con esto ya habremos creado nuestro primer smart contract.
En el siguiente Post desarrollaremos un contrato más completo explicando cada parte del código.
submitted by rodoqui to u/rodoqui [link] [comments]

How to join the etheregen chain

Testing the waters with another public testnet...
Please contribute to the discussion!
You will need these things:
We will be using geth ONLY for the launch. You can use whatever other client you like, but I am not providing any instructions for them at the moment. Community members are welcome to write tutorials for other clients. I am also assuming you're using Ubuntu 14.04 as that's supported by geth and tutorials for other operating systems/distros already exist. You need to have Golang installed to compile geth.
  1. Create a directory for etheregen: mkdir -p ~/etheregen
  2. Change directories cd ~/etheregen
  3. Checkout the latest commit from here by cloning the repository. Then execute make geth to compile our version of geth. You need Golang to be installed. We'll provide binaries in the near future.
  4. Copy the following text in the file "genesis.json":
{ "nonce": "0x0000000000000042", "timestamp": "0x0", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x0", "gasLimit": "0x8000000", "difficulty": "0x400", "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", "coinbase": "0x3333333333333333333333333333333333333333", "alloc": { } } 
  1. Execute ./geth init genesis.json followed by ./geth account new.
  2. Execute /geth --networkid "123123" console 2>>geth.log
  3. In the geth console, execute admin.addPeer("INSERT_ENODE_HERE")where you need to replace INSERT_ENODE_HERE with the enode information located at :
enode://bfc6537e5945660ef11eeb5514a83d12bdf8c71153180600f765a61021cd15ed8[email protected]
  1. If you wish to mine, you can execute miner.start(N) where N is the number of threads.
submitted by etheregen to Etheregen [link] [comments]

Command Line Options in geth

$ geth help NAME: geth - the go-ethereum command line interface Copyright 2013-2017 The go-ethereum Authors USAGE: geth [options] command [command options] [arguments...] VERSION: 1.7.3-stable COMMANDS: account Manage accounts attach Start an interactive JavaScript environment (connect to node) bug opens a window to report a bug on the geth repo console Start an interactive JavaScript environment copydb Create a local chain from a target chaindata folder dump Dump a specific block from storage dumpconfig Show configuration values export Export blockchain into file import Import a blockchain file init Bootstrap and initialize a new genesis block js Execute the specified JavaScript files license Display license information makecache Generate ethash verification cache (for testing) makedag Generate ethash mining DAG (for testing) monitor Monitor and visualize node metrics removedb Remove blockchain and state databases version Print version numbers wallet Manage Ethereum presale wallets help, h Shows a list of commands or help for one command ETHEREUM OPTIONS: --config value TOML configuration file --datadir "/home/karalabe/.ethereum" Data directory for the databases and keystore --keystore Directory for the keystore (default = inside the datadir) --nousb Disables monitoring for and managing USB hardware wallets --networkid value Network identifier (integer, 1=Frontier, 2=Morden (disused), 3=Ropsten, 4=Rinkeby) (default: 1) --testnet Ropsten network: pre-configured proof-of-work test network --rinkeby Rinkeby network: pre-configured proof-of-authority test network --syncmode "fast" Blockchain sync mode ("fast", "full", or "light") --ethstats value Reporting URL of a ethstats service (nodename:[email protected]:port) --identity value Custom node name --lightserv value Maximum percentage of time allowed for serving LES requests (0-90) (default: 0) --lightpeers value Maximum number of LES client peers (default: 20) --lightkdf Reduce key-derivation RAM & CPU usage at some expense of KDF strength DEVELOPER CHAIN OPTIONS: --dev Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled --dev.period value Block period to use in developer mode (0 = mine only if transaction pending) (default: 0) ETHASH OPTIONS: --ethash.cachedir Directory to store the ethash verification caches (default = inside the datadir) --ethash.cachesinmem value Number of recent ethash caches to keep in memory (16MB each) (default: 2) --ethash.cachesondisk value Number of recent ethash caches to keep on disk (16MB each) (default: 3) --ethash.dagdir "/home/karalabe/.ethash" Directory to store the ethash mining DAGs (default = inside home folder) --ethash.dagsinmem value Number of recent ethash mining DAGs to keep in memory (1+GB each) (default: 1) --ethash.dagsondisk value Number of recent ethash mining DAGs to keep on disk (1+GB each) (default: 2) TRANSACTION POOL OPTIONS: --txpool.nolocals Disables price exemptions for locally submitted transactions --txpool.journal value Disk journal for local transaction to survive node restarts (default: "transactions.rlp") --txpool.rejournal value Time interval to regenerate the local transaction journal (default: 1h0m0s) --txpool.pricelimit value Minimum gas price limit to enforce for acceptance into the pool (default: 1) --txpool.pricebump value Price bump percentage to replace an already existing transaction (default: 10) --txpool.accountslots value Minimum number of executable transaction slots guaranteed per account (default: 16) --txpool.globalslots value Maximum number of executable transaction slots for all accounts (default: 4096) --txpool.accountqueue value Maximum number of non-executable transaction slots permitted per account (default: 64) --txpool.globalqueue value Maximum number of non-executable transaction slots for all accounts (default: 1024) --txpool.lifetime value Maximum amount of time non-executable transaction are queued (default: 3h0m0s) PERFORMANCE TUNING OPTIONS: --cache value Megabytes of memory allocated to internal caching (min 16MB / database forced) (default: 128) --trie-cache-gens value Number of trie node generations to keep in memory (default: 120) ACCOUNT OPTIONS: --unlock value Comma separated list of accounts to unlock --password value Password file to use for non-interactive password input API AND CONSOLE OPTIONS: --rpc Enable the HTTP-RPC server --rpcaddr value HTTP-RPC server listening interface (default: "localhost") --rpcport value HTTP-RPC server listening port (default: 8545) --rpcapi value API's offered over the HTTP-RPC interface --ws Enable the WS-RPC server --wsaddr value WS-RPC server listening interface (default: "localhost") --wsport value WS-RPC server listening port (default: 8546) --wsapi value API's offered over the WS-RPC interface --wsorigins value Origins from which to accept websockets requests --ipcdisable Disable the IPC-RPC server --ipcpath Filename for IPC socket/pipe within the datadir (explicit paths escape it) --rpccorsdomain value Comma separated list of domains from which to accept cross origin requests (browser enforced) --jspath loadScript JavaScript root path for loadScript (default: ".") --exec value Execute JavaScript statement --preload value Comma separated list of JavaScript files to preload into the console NETWORKING OPTIONS: --bootnodes value Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers) --bootnodesv4 value Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes) --bootnodesv5 value Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes) --port value Network listening port (default: 30303) --maxpeers value Maximum number of network peers (network disabled if set to 0) (default: 25) --maxpendpeers value Maximum number of pending connection attempts (defaults used if set to 0) (default: 0) --nat value NAT port mapping mechanism (any|none|upnp|pmp|extip:) (default: "any") --nodiscover Disables the peer discovery mechanism (manual peer addition) --v5disc Enables the experimental RLPx V5 (Topic Discovery) mechanism --netrestrict value Restricts network communication to the given IP networks (CIDR masks) --nodekey value P2P node key file --nodekeyhex value P2P node key as hex (for testing) MINER OPTIONS: --mine Enable mining --minerthreads value Number of CPU threads to use for mining (default: 8) --etherbase value Public address for block mining rewards (default = first account created) (default: "0") --targetgaslimit value Target gas limit sets the artificial target gas floor for the blocks to mine (default: 4712388) --gasprice "18000000000" Minimal gas price to accept for mining a transactions --extradata value Block extra data set by the miner (default = client version) GAS PRICE ORACLE OPTIONS: --gpoblocks value Number of recent blocks to check for gas prices (default: 10) --gpopercentile value Suggested gas price is the given percentile of a set of recent transaction gas prices (default: 50) VIRTUAL MACHINE OPTIONS: --vmdebug Record information useful for VM and contract debugging LOGGING AND DEBUGGING OPTIONS: --metrics Enable metrics collection and reporting --fakepow Disables proof-of-work verification --nocompaction Disables db compaction after import --verbosity value Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3) --vmodule value Per-module verbosity: comma-separated list of = (e.g. eth/*=5,p2p=4) --backtrace value Request a stack trace at a specific logging statement (e.g. "block.go:271") --debug Prepends log messages with call-site location (file and line number) --pprof Enable the pprof HTTP server --pprofaddr value pprof HTTP server listening interface (default: "") --pprofport value pprof HTTP server listening port (default: 6060) --memprofilerate value Turn on memory profiling with the given rate (default: 524288) --blockprofilerate value Turn on block profiling with the given rate (default: 0) --cpuprofile value Write CPU profile to the given file --trace value Write execution trace to the given file WHISPER (EXPERIMENTAL) OPTIONS: --shh Enable Whisper --shh.maxmessagesize value Max message size accepted (default: 1048576) --shh.pow value Minimum POW accepted (default: 0.2) DEPRECATED OPTIONS: --fast Enable fast syncing through state downloads --light Enable light client mode MISC OPTIONS: --help, -h show help COPYRIGHT: Copyright 2013-2017 The go-ethereum Authors
submitted by balatero to u/balatero [link] [comments]

Problem connecting to Rinkeby - "incompatible genesis block"

I'm having trouble connecting to the Rinkeby test net. I have initialised the rinkeby.json local chain, but whenever I try to run it through Mist, I get this error:
This is what I type in terminal:
/Applications/ --rpc $HOME/.rinkeby/geth.ipc --node-networkid=4 --node-datadir=$HOME/.rinkeby --node-ethstats='yournode:Respect my [email protected]' --node-bootnodes=enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb[email protected]
I've tried the following: 1. Deleted the chain data in ~Library/Ethereum 2. Replaced "/Applications/" with geth (and it works fine) 3. ln -s ~/.rinkeby/geth.ipc ~/Library/Ethereum
I've looked as far as I can, and I can't find any solutions. My assumption is that Mist is attempting to sync the genesis block from the main net (or ropsten test net), which is conflicting with the rinkeby genesis block. "Have 6341f..." is the rinkeby genesis block.
Any ideas?
submitted by 42letters to ethereum [link] [comments]

Help with peer discovery in private Ethereum blockchain using geth

Sorry if this is too specific/technical of a question to ask here. If anyone can recommend somewhere better to ask let me know.
At work we set up our own Ethereum blockchain internally to play around with. Each node is initialized with the same genesis block, and we are all using the same network id. Everything works fine if we add each other as peers normally. We can mine, create contracts, etc and everyone stays in sync. However, it seems like something isn't configured right because there is no automatic peer discovery. My understanding is that if I designate a node as a "bootnode" and start all other connections using the --bootnodes flag pointed at that node then it should bootstrap connections to all other nodes that did the same thing. However, when running admin.peers in the console we always only see the bootnode's id itself. No discovery is happening. Functionally this is fine so far, but I'm curious why the automatic peer discovery isn't happening.
The command we are using to start all nodes (including the bootnode itself) is:
geth --datadir "~/Documents/Ethereum/privatechain" --networkid 1235 --bootnodes "enode://{nodeId_of_bootnode}@{bootnode_local_ip}:30303" console 
As a separate, potentially unrelated question. Is there any relationship between the "chainId" config param in the genesis block and the "--networkId" param used to start geth? My understanding is those don't have to themselves match, but all nodes have to agree on those values.
submitted by stkenkere to ethereum [link] [comments]

Required Understanding for Developing Ethereum Based Application

I am trying to create the understanding for developing an Ethereum based application
Lets say if I want to develop an inventory system. Here are the basic operations Purchase inventory, Maintain stock, vendor and Inventory Issue transactions to various departments.
So help me understand the basic design structure while implementing it in Ethereum block chain.
Just to start with what all contracts will be needed
Contract for Inventory stock operations -> Struct to hold inventory data -> Struct to hold Departments -> Vendors will be basically an Ethereum blockchain user -> initialize inventory -> add departments -> buy inventory -> issue inventory
Should this blockchain be created in a private ethereum blockchain (i.e. lets say with a networkid starting with 5 and common across all nodes) as developing for a specific company Each vendor should be registered in that blockchain network and have some ether balance Like in case of a regular centralized application following kind of structure is expected 1. Table structure to maintain following - Inventory, Vendors, Departments, PurchaseOrders, IssueOrders etc.
What I am expecting is people who are developing dapps how do they think from design perspective what can be applied. A rough idea will be great to get a perspective and then can start working that direction. Otherwise many a times it happens you start thinking in one direction and later have to change to completely
submitted by susmitblockchain to ethdev [link] [comments]

OS X El Capitan mess: mostly sorted out (might be helpful)

Gang, I installed Ethereum months ago, got distracted and forgot about it. Fast forward to today -- I see a beta wallet build! Woohoo! Try to run it, no luck. With my very limited command line experience, I started to dig. The first thing that was obvious is something was screwed with OS X 10.11's CLI:
xcrun: error: invalid active developer path (/Library/DevelopeCommandLineTools), missing xcrun at: /Library/DevelopeCommandLineTools/usbin/xcrun 
After some more digging, I had to do a manual update of the command line tools:
xcode-select --install 
Then, I updated homebrew
sudo brew update 
gmp symlinks were causing an issue (couldn't overwrite), so
sudo chown -R $(whoami):admin /uslocal 
Then I was able to
brew link --overwrite gmp 
Then (FINALLY!) I was able to update my geth 1.0.2!
bash <(curl -L) 
Tried this
geth --datadir /my/chain/ --networkid 23 --ipcpath /Users//Library/Ethereum/geth.ipc 
But I had no account created. So...
geth account new 
And all was good. Fired up wallet and voila, I'm processing blocks!
Still processing blocks (my Macbook Pro is tethered to my phone at the moment), but at least I have an address and I'm syncing.
Is there a way for me to earn ETH once my wallet is done syncing?
submitted by swartzfeger to ethereum [link] [comments]

I can't send coins on the test id network without completely crashing Ethereum (Client Ver 1.1.0; OS Ubuntu 15.04)

Whenever I try to send some coins from me to myself I get a long page of errors... Everything is working fine if I do this on networkid "1" :
I have two consoles, one with the ethereum client mining:
 geth --genesis ~/genesis-test.json --datadir /tmp/ --networkid 1846 console 
And the second one attached:
 geth --genesis ~/genesis-test.json --datadir /tmp/ --networkid 1846 --ipcpath /tmp/geth.ipc attach 
Am I missing something?
submitted by Sherlockcoin to ethereum [link] [comments]

Ethereum contract not working on windows.Any help ?

Started geth instance with
geth --rpc --rpcaddr "localhost" --rpcport "8545" --rpccorsdomain="*" --unlock 0 --rpcapi "db,eth,net,web3" --genesis ./test/genesis.json --datadir ./ethereum_experiment --networkid 123 --nodiscover --maxpeers 0 console
After this - used contract
contract SimpleStorage { uint storedData; function set(uint x) { storedData = x; } function get() constant returns (uint retVal) { return storedData; } }
I have compiled this code from
I can see contract mined -
Contract mined! address: 0x83146573a91807b56a4de0fd4e95c22cc056891e transactionH ash: 0x0d10482f11b340bcce69536b8e44b5ccebee94872b6123c982eb7ee874b8a42c
After this I hit - simplestorage which returned -
simplestorage { address: "0x83146573a91807b56a4de0fd4e95c22cc056891e", transactionHash: "0x0d10482f11b340bcce69536b8e44b5ccebee94872b6123c982eb7ee874 b8a42c", allEvents: function(), get: function(), multiply: function(), set: function() }
then when i hit set method, it says invalid address
simplestorage.set(5) invalid address
I tried different contracts. whenever i try to set something on global variable in contract it says invalid address. Is it a problem that i am trying it in windows ? or is it a bug ? I am pretty sure that I am not missing anything but if anyone who can help me by resolving it - i will be very grateful.
submitted by jakasman to ethereum [link] [comments]

Problems setting up a private test net

I have been trying to set up a private test net, which is going so-so. Using geth right now and I have been able to run a single node that mines to my coinbase. So far so good.
geth version: 1.2.2
I start up my first node with:
geth --datadir ~/.ethereum_dev --dev --networkid 45 --genesis ~/genesis.json --etherbase "0xACCOUNT0" --mine --minerthreads "1" --port "30303" --verbosity "5" 
Second one (on the same box for now, to count out networking or compatability issues):
geth --datadir ~/.ethereum_dev2 --networkid 45 --genesis ~/genesis.json bootnodes="enode://3957ac1a886d74a6195604cd879492d284066026fc561ae41e5625d28fb632a6c[email protected]" --verbosity "5" --port "30304" 
Log messages are here:
Basically, it complains about "Too many peers".
submitted by Legogris to ethereum [link] [comments]

Friend can't connect to my testnet

I'm running a private testnet that talks to a website of mine (not a localhost site) with these parameters:
$ geth --networkid XXX --rpc --rpcaddr="localhost" --rpcport="8080" --rpccorsdomain="" --maxpeers 1 --datadir ~/.ethereum_experiment --genesis ~/ethereum/test/development_genesis.json --mine --minerthreads 1 console 2>> /dev/ttys001 
I want to get the website working for my friend, but he can't seem to connect to my testnet using the following:
$ geth --networkid XXX --rpc --rpcaddr="localhost" --rpcport="8080" --rpccorsdomain="" --maxpeers 1 --datadir ~/.ethereum_experiment console 2>> /dev/ttys001 
Does he require the same genesis block as me? I assumed that he would just download w/e blocks I've previously mined already from my node on the chain. I can never see him as a peer on my node.
submitted by thunder_cougar to ethereum [link] [comments]

Ethereum Mainnet Deployment‍‍- How To Create Your Own ERC20 Cryptocurrency Token in 2020 Ethereum 2.0 Explained By Vitalik Buterin 2020 - YouTube Ethereum network bandwidth will increase 6400 times - YouTube What is Ethereum  Smart Contracts and Ethereum Explained ... Ethereum Tutorials- How to Setup your own private Blockchain

Chain ID Name Short Name Chain Network Network ID; 1: Ethereum Mainnet: eth: ETH: mainnet: 1: 100: xDAI Chain: xdai: XDAI: mainnet: 100: 101: EtherInc: eti: ETI ... Etherscan allows you to explore and search the Ethereum blockchain for transactions, addresses, tokens, prices and other activities taking place on Ethereum (ETH) 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 Classic, the public Ethereum Classic ... Network ID and chain ID Ethereum networks have two identifiers, a network ID and a chain ID. Although they often have the same value, they have different uses. Peer-to-peer communication between nodes uses the network ID, while the transaction signature process uses the chain ID. Connecting To The Network How Peers Are Found. Geth continuously attempts to connect to other nodes on the network until it has peers. If you have UPnP enabled on your router or run ethereum on an Internet-facing server, it will also accept connections from other nodes. Geth finds peers through something called the discovery protocol.

[index] [5338] [3566] [1539] [1745] [6411] [2313] [5431] [818] [1741] [5381]

Ethereum Mainnet Deployment‍‍- How To Create Your Own ERC20 Cryptocurrency Token in 2020

14.Deploying Your Own Token on The Ethereum Mainnet Network Lesson 14 - Deployment on Ethereum mainnet This lesson is all about deployment on Ethereum mainnet using Truffle and geth. ( Blockchain Training : ) This Edureka "What is Ethereum" video will introduce you to Ethereum and Smart Contracts... The Ethereum (ETH) network was apparently the target of a coordinated attack, according to several analysts. Following reports that some Parity Ethereum nodes lost sync with the network, on Dec ... We are just creating a private local ethereal network & Ethereum wallet setup and private network created in blockchain . then Connecting Mist To Our Private Network . Start trading Bitcoin and cryptocurrency here: Ethereum was proposed in 2013 and brought to life in 2014 by Vitalik Buterin. Unlike the...