Hot answers tagged

48

IPC or Inter-process Communications generally works on your local computers. In the Ethereum space, IPC normally involves geth creating a IPC pipe (which is represented by the file $HOME/.ethereum/geth.ipc) on your computer's local filesystem. Other processes on the same computer can then use the IPC file to create bi-directional communications with geth. ...


18

The --datadir flag specifies the location data directory. geth --datadir <path to data directory> This directory should contain the following subdirectories: chaindata keystore nodes On start up GETH will try to open IPC (inter-process communication) unix socket within your data directory geth.ipc. However FAT32 file systems do not support the ...


17

The IPC file is only present when Geth is actually running. So be sure to start Geth and you should see a message like. I0219 09:45:48.128503 node/node.go:290] IPC endpoint opened: /Users/username/Library/Ethereum/geth.ipc The location displayed here depends on your operating system. These are the other options. macOS ~/Library/Ethereum/ Linux ~/....


11

This feature is available since version 0.8.2 (Pull-Request). You will need to start the node with RPC enabled: geth --rpc Connect Mist via: Mist --rpc http://localhost:8545 Please mind the security implications: This is less secure than using local IPC - your passwords will be sent over the wire as plaintext. Only do this if you have secured ...


11

As far as I know Mist can only connect to a local instance, and even then only via IPC. The reason is that is uses a few APIs that are not exposed by default over HTTP and would probably be unsafe to do so (e.g. account management).


10

Here are some libraries for interacting with an Ethereum node. They are grouped by language, and roughly according to their last commit, with any appropriate brief notes. Javascript has been included since they are alternatives to web3.js and provide value to the overall list. Javascript https://github.com/AugurProject/ethrpc with IPC support, last ...


7

IPC is short for inter-process communication and is no standard file in your installation or environment but rather a domain socket. After you installed geth the ipc socket is not automatically created and its also not considerable a permanent resource. The geth.ipc socket only exists as long as geth is running. You can specify the ipc path with the --...


7

Try this format: geth --datadir /tmp/geth attach ipc:/tmp/geth/geth.ipc (ipc: after attach) Source: https://github.com/ethereum/go-ethereum/issues/2634


5

Start geth with the flag --datadir "path/to/the/directory-you-want". See https://ethereum.gitbooks.io/frontier-guide/content/cli.html. The default directory is: Mac: ~/Library/Ethereum Linux: ~/.ethereum Windows: %APPDATA%/Ethereum Taken from: https://github.com/ethereum/go-ethereum/wiki/Backup-&-restore


5

Try geth --light console, available since v1.5.2, but listed under "Experimental Features". Syncs in minutes if not seconds. Update - The initial sync took 11 minutes. Subsequently, syncing 7 hours worth of blocks took 8 seconds. I'll document some light client stats below. Here are some stats (the current block is 2972534: Iota:geth user$ geth --light ...


4

Looks like the path is hardcoded somewhere in the code. Yes. The Mist connections are hard coded to use IPC only, and not RPC. user@Kumquat:~/EthereumSource/mist$ find . -iname '*ipc*' ./tests/mocha-in-browser/spec/ipc-spec.js ./modules/ipc ./modules/ipc/ipcProviderBackend.js ./modules/ipc/ipcProviderWrapper.js ./modules/ipc/getIpcPath.js ./modules/...


4

Have you started a geth node on the same machine before attaching? datadir, ipcpath and networkId are parameters to start a node. While datadir parameter change the default data folder position (default ~/.ethereum), ipcpath change the default IPC file position (default ~/.ethereum/geth.ipc) To start a test network use something like: geth --networkid 1234 ...


4

What I'm doing now is using TestRPC as the Web3 provider to Browser Solidity as a Chrome extension. You can then develop and run DAPP front-ends and use the Chrome console to interact with web3.


4

The RPC standard is an unsecured (usually) webserver that communicates via standard HTTP messages (GET/POST/PUT/etc). If unsecured (and maybe parity provides the ability to secure it with certs of some kind), this means anyone who can access the port it's listening on will be able to control all functions exposed by that RPC. The IPC endpoint, on the other ...


3

I solved the problem, taking in account these 2 points: I was using umask 022 but the correct thing would have been umask 002. However, this still doesn't work (maybe because geth hardcodes the mask when creating the socket file instead of querying the default umask for the user). As a workaround for this, I use chmod 770 on the socket file shortly after ...


3

(This page will be reorganised when this problem is solved) EDIT 30/04/2016 @spraff, looking at your latest data: Miner produces this output when started with geth --networkid 1100 --maxpeers 5 --mine --minerthreads 1 -rpccorsdomain "*" --datadir /ethereum/.ethereum-test-miner --port 33301 And IPC server produces this output when started with ...


3

Summary Q: Why can't I connect by IPC? Why not? Or, what else is the problem? A: From your HTML response message, it seems like your code is currently using the version of web3_extended that does not support the IPC protocol. Details Can you check that you are using tjade273/web3_extended and NOT The18thWarrior/web3_extended? The first was forked from ...


3

You are using the wrong command, the command is coinbase, not eth_coinbase. I suggest to use this code: eth = Ethereum::IpcClient.new This will automatically use the default path to get geth.ipc puts eth.coinbase["result"] And this will return your coinbase. You can see that this line, used to create the new method, is not getting the first part of ...


3

There's a lot of mixup in your question. Lets clear up the concepts first. JSON is the data serialization format that all API endpoints use, independent on how you get that request to Geth. All the various endpoints exposed by Geth use exactly the same JSON-RPC protocol to invoke methods. This is programming language independent, as long as you can generate ...


3

These answers must already be "old" :) .... On my Mac, Mist version 0.8.2, /Applications/Mist.app/Contents/MacOS/Mist --rpc /my/path/to/geth.ipc works fine. It works with RPC too (and an appropriate warning) i.e. /Applications/Mist.app/Contents/MacOS/Mist --rpc http://machine:rpcport


3

It's hard coded. So "is there a way" = sure, change the code. :-D https://github.com/ethereum/mist/blob/v0.3.8/modules/ipc/getIpcPath.js (For reference because stack exchange hates link only answers: module.exports = function() { var p = require('path'); var path = global.path.HOME; if(process.platform === 'darwin') path += '/Library/...


3

I am pretty sure that it's due to geth/mist wallet and browser running in the background hogging the same port on UDP. But is there a workaround for this? You can't use Mist and AKASHA at the same time. If one is running the other one can't connect to node. I am on OS X: error 12:21:08 geth: exited with code: 1 info 12:21:08 geth:spawn:close: 1 info 12:...


3

This happens because your geth binary runs under one user_id, but the webserver runs under another user_id (probably nobody,www ,or etc) You have to make the geth.ipc file readable and writable to your webserver, either by group access or by using the same user_id on both processes (the webserver and geth) Also, note that you can not share geth access via ...


3

According to https://truffleframework.com/docs/truffle/reference/configuration there is a field called provider. Using this field an arbitrary web3 connection provider can be injected. For IPC on Windows it looks like: var Web3 = require("web3"); var net = require("net"); module.exports = { networks: { dev: { provider: function() { ...


2

There may be a better way, but one simple technique that will certainly work is to run mainnet and testnet under different user accounts.


2

In theory using geth offline should be fine. In practice we've heard some rare reports that geth gets stuck on starting the "server" and it seems that the UPnP lookup is to be blamed, that for some reason neither succeeds, neither fails, neither times out. You could try to disable Network Address Translation (--nat=none) that relies on UPnP to see if it ...


2

Executable flag You have to make the node executable, so mist can run it. Try: sudo chmod a+x /usr/share/mist/resources/node/geth/geth Run geth manually You can also install an run geth manually and after that running mist will allow mist to connect to the running geth instance. geth --ipcpath=~/.ethereum/geth.ipc If you don't know how to install geth ...


2

If your current directory is /home/user, your IPC file will be created in /home/user/data_dir/geth.ipc. Connect using IPC with the following command: user@Kumquat:~$ geth attach ipc://home/user/data_dir/geth.ipc I could not get geth to use the relative path name, but the full path name works.


2

sudo npm install -g process You missed the g.


2

The easiest way I found would be to set up a virtual server instance, install nodejs, install the testrpc through npm and also use the Web3 module as mentioned in the post above. This video goes over how to set up the testrpc on an AWS EC2 instance and how to interact with it using the nodejs console and Web3. http://www.decypher.tv/series/ethereum-...


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