Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

Filter by
Sorted by
Tagged with
149
votes
2answers
29k views

What is the difference between a transaction and a call?

What is the difference between a transaction and a call? In some interfaces, I can interact with contracts via calls or via transactions. What is the difference between the two, and can contracts also ...
51
votes
3answers
21k views

How to reduce the chances of your Ethereum wallet getting hacked?

Summary The hack that occurred on May 12 2016 to steal 7,218 ethers from Patrick only affects miners where: Incoming RPC connections from the Internet on TCP port 8545 are forwarded to the machine ...
43
votes
3answers
36k views

How to call a contract method using the eth_call JSON-RPC API

Ok, so I'm trying to call a contract method using the methods provided by the Ethereum JSON RPC interface. The JSON RPC is running on an Ubuntu machine. Unfortunately, I can't really get a result back ...
40
votes
6answers
20k views

Create and sign OFFLINE raw transactions?

I'm looking to create a raw transaction, sign it, and broadcast it using the eth.sendRawTransaction RPC method. I would like to do this offline using code or an open-source library OR online but ...
32
votes
1answer
23k views

What are ipc and rpc?

The question is quite simple , I have only basic Idea of RPC but none of IPC. AFAIK, if I connect to ethereum node via ipc then the my geth should be running on same machine. and If I connect via ...
28
votes
3answers
12k views

What are the limitations to estimateGas and when would its estimate be considerably wrong?

web3.eth.estimateGas and JSON-RPC estimateGas can be used to see how much gas should be specified for a transaction, before crafting the transaction. Since it is an estimate, are there any ...
28
votes
3answers
17k views

How can I make new account by JSON-RPC?

I'd like to make new account by JSON-RPC.I've checked the wiki of Ethereum, however I could not find out how to do that. I've found call existed accounts, but it isn't what I want. eth_accounts ...
27
votes
1answer
13k views

What does v, r, s in eth_getTransactionByHash mean?

In Ethereum JSON-RPC I found the return is: Returns Object - A transaction object, or null when no transaction was found: hash: DATA, 32 Bytes - hash of the transaction. nonce: QUANTITY - the number ...
26
votes
1answer
2k views

Is searching data stored in event logs prohibitively slow?

Augur uses event logs to store data that never needs to be accessed on-contract, since it is about 10x cheaper than on-contract storage. However, I've noticed that retrieving event logs (e.g., using ...
26
votes
3answers
20k views

How to explore all transactions for a given account?

After beeing able to check account balances, I am looking for a method to list all transactions for a given Ethereum account through json-rpc protocol. I haven't found any method suitable for that on ...
24
votes
3answers
20k views

How can I expose Geth's RPC server to external connections?

I want to set up a private network of applications which can connect to a single Geth node. What options do I have for exposing the RPC server? I'm running this: geth --rpc --testnet (sometimes I use ...
23
votes
2answers
12k views

Is there a way to find an account's current transaction nonce?

I need to know my transaction nonce because I am doing fancy stuff with contract addresses (which are the keccak hash of my address + my transaction nonce). Is there a way to find this through the ...
18
votes
3answers
21k views

How to attach geth to a local Parity RPC port 8545?

I'm running parity with the --jsonrpc flag which listens on port 8545 by default. I'm trying to attach a geth instance, like described in the the docs: Attach a console to a running geth instance. ...
18
votes
4answers
9k views

Error “no key for given address or file” when unlocking coinbase account

Using json-rpc eth_unlockAccount() method I can unlock everyone of my node accounts except coinbase. When trying to unlock coinbase account, geth responds with the message: no key for given address ...
17
votes
2answers
6k views

Canceling / overwriting a pending transaction using geth JSON RPC

This is a private network A transaction was sent to create a contract using the eth_sendTransaction RPC call. The transaction is "removed" marked "will be removed" because it ran out of gas but ...
16
votes
1answer
17k views

What is http://localhost:8545?

Why do some ethereum related websites (for example regis.nu, there are many others) tell me they cannot find a node running at http://localhost:8545 and what can I do about that? Regis.nu allowed me ...
16
votes
1answer
3k views

How can I retrieve my account's Augur (REP) token balance via JSON-RPC?

How can I check the contract balance, like Augur (REP), on an address with JSON-RPC? There doesn't seem to be alot of documentation about this.
15
votes
1answer
4k views

Deploying contract with constructor arguments via Geth RPC

How can I deploy a compiled contract with constructor arguments using geth rpc? I have tested my call deployed the compiled contract bytecode just fine, I just don't understand how I can pass ...
14
votes
3answers
5k views

Can Mist be attached to a Geth node on a different computer over HTTP RPC?

I gather that Mist will automatically look for Geth on a local machine via IPC to save it maintaining its own blockchain. Is it possible to tell it to look for an instance of Geth on another machine ...
14
votes
4answers
19k views

unable to connect Ethereum node even RPC port: 8545 is open

I have created my private Ethereum blockchain network. From different servers I am able to connected and added into the network as peer without any problem. The way I run my server: geth --...
14
votes
2answers
3k views

How can I sign a transaction using c#?

I want to create a signed transaction using C#, which will later be used by Nethereum via JSON-RPC to call eth_sendRawTransaction. I have the raw transaction and the private key, now how do I sign ...
14
votes
2answers
5k views

How do I set the nonce for raw transactions?

A few questions about rawTransactions: Are they documented anywhere? How exactly should I set the nonce of a rawTransaction? If I start geth, and submit nothing but rawTransactions to it, then the ...
14
votes
1answer
4k views

How can I create a listener for new transaction with Ethereum RPC calls?

I am trying to create mini-service which would allow me to subscribe for incoming Ethereum transactions (coinbase example). I thought that in Ethereum it could be done with eth_newFilter and ...
13
votes
2answers
1k views

Can Solidity constant functions be arbitrarily complex?

Non-constant functions are limited in computational complexity by the block gas limit. I assume, but am not sure, that this does not apply to constant functions. Are constant functions in any way ...
12
votes
3answers
4k views

are there “public” ethereum nodes? or any recommendations on hosting solutions?

I've always ran apps on Heroku. Just developed a smart contract and I need to check the blockchain from the app. Are there public nodes I can connect to to get the info I need to show on my app? If ...
12
votes
2answers
5k views

How to get the transaction confirmations using the JSON RPC

How do I get the block confirmations for a specific transaction using the JSON RPC? This is information that would come inside the transaction JSON in bitcoin but it doesn't seem to come in ethereum. ...
12
votes
1answer
1k views

Out of gas during contract creation

A few days ago, several attempts at creating a contract failed with out of gas errors (confirmed by etherscan/ethercamp and getBalance API), however it is not clear to me what failed exactly, and how ...
11
votes
5answers
14k views

Invalid JSON RPC response: “” In Browser-Solidity

I'd like to connect private geth node from browser-solidity, however it returned the error Invalid JSON RPC response: "". Please check the following picture for details. Could you tell me how to ...
11
votes
1answer
6k views

Error: personal_unlockAccount method not implemented

Using web3 under nodejs I suddenly want to unlock my account before calling a DAO contract function: var Web3 = require('./node_modules/web3/lib/web3'); // dont override global variable if (typeof ...
11
votes
1answer
3k views

Can I unlock an account using JSON-RPC?

The only way I can work with ETH is through --rpc mode. Normally I would prefer to use the Python interface. But I found myself in a situation where the RPC is very limited. For example, I can't ...
11
votes
2answers
5k views

Calling debug_traceTransaction from web3 API

I want to use debug.traceTransaction to get internal transactions from NodeJS using web3 API. I'm using web3 0.17 beta and I don't see any debug_traceTransaction on the code. Am I missing something or ...
11
votes
1answer
1k views

How to connect an Android App user to ethereum network?

I'm working on developing a decentralized application which requires every user of the Android app to have separate account containing his ether balance information and other user-specific information....
10
votes
1answer
2k views

How can non-javascript applications communicate with Ethereum nodes?

Web3 implements the Ethereum JSON-RPC spec and seems to be the preferred method for communicating between a javascript applications and the Ethereum node. However there are situations where you might ...
10
votes
2answers
3k views

Error: etherbase address must be explicitly specified

When I make a RPC to geth running remotely, I cannot get the account list / balance of the account. It also says that the coinbase is not set. But as far as I know, isnt the coinbase supposed to be ...
9
votes
4answers
3k views

Geth RPC connections securely

I have read everywhere that exposing personal over rpc is dangerous and is vulnerable. The question is HOW? Is it possible for anyone to send transactions to my geth console, if my ipaddress and port ...
9
votes
1answer
2k views

Is it possible to call debug_traceTransaction from nodejs?

Following answer (https://ethereum.stackexchange.com/a/9437/4575) [ 1 ] guide us to call debug_trace through using geth: As documented in debug.traceTransaction(...), you can only access this API ...
9
votes
3answers
4k views

How could “ethereum block explorer” connect into geth that is already running on the main server securely?

I am working on private Ethereum Network. I run Ethereum boot-node and Ethereum Block Explorer app ( https://github.com/etherparty/explorer (A lightweight ethereum block explorer.) ) on the main ...
9
votes
2answers
957 views

geth: shh_newIdentity does not exists/is not available

I'm trying out whispers with web3 and geth on a private testnet. I'm just running the following code taken from Ethereum Whisper wiki. function sendWhisper() { var shh = web3.shh; var appName ...
9
votes
1answer
2k views

RPC error “invalid or missing value for params” when calling contract constant void functions

My contract has a function defined like this: {"constant":true,"inputs":[],"name":"queryNumEscrows","outputs": [{"name":"","type":"uint256"}],"payable":false,"type":"function"} Having no inputs. Its ...
8
votes
2answers
7k views

Geth response: invalid content type, only application/json is supported

I started geth on a remote server running on rinkeby with the parameters --rinkeby --fast --cache=128 --rpc --rpcaddr 0.0.0.0 When I try to test my access to geth using curl -X POST --data '{"...
8
votes
2answers
4k views

Getting contract balance over JSON RPC

I'd like to read the contract balance (amount of unspend ETH on the contract) over Geth JSON-RPC API. E.g. the number displayed here: http://testnet.etherscan.io/address/...
8
votes
1answer
4k views

web3.js import contract abi from .json file

So I have a deployed contract with address0. I can easily interact with it using my index.html like so: import contract_artifacts from '../../build/contracts/contract.json' var contract0 = contract(...
8
votes
1answer
13k views

Error: Invalid JSON RPC response: undefined from node web3.js app

I'm getting Error: Invalid JSON RPC response: undefined from my node.js application when it tries to execute a function. My steps: ethereum wallet 0.5.1 to deploy a contract to the testnet. start the ...
8
votes
1answer
1k views

sendRawTransaction results in queued TXs

I attempted to send raw TXs via eth.sendRawTransaction API but get stuck. I'm using EthereumJS to generate and sign TXs, and indeed, I can submit TXs through eth.sendRawTransactin, but the TXs always ...
8
votes
2answers
3k views

How can I get notification from geth when I receive ether?

I'd like to get notification from geth when my account receives ether. I'm thinking to type api command eth_getBalance in every minute, in order to check if my account receive ether or not. However, I ...
8
votes
1answer
623 views

Will I be able to get past contract events through rpc if I use geth --fast?

Or in other words, will geth --fast download the events logs?
8
votes
1answer
3k views

How to set up Geth in a Docker container on a VM such that RPC works?

The Geth team conveniently provides a Docker container for the latest Geth builds, but when using Docker on Windows or Mac OS (where Docker is using a virtual machine to host containers) how to run it ...
8
votes
1answer
3k views

Is JSON-RPC error behavior documented?

Running geth, it's easy to see what its implementation of JSON-RPC does on errors: $ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_compileSolidity","params":["contract test { function multiply(...
8
votes
2answers
6k views

Get smartcontract token balance via JSON RPC

Via Geth commandline I can get my smartcontract token balance with: var mytest = eth.contract([{interface}]).at(contract address); mytest.balanceOf(eth.accounts[0]) >998 I want to present the ...
8
votes
1answer
363 views

Check if a contract implements specific ABI using JSON-RPC

In my Python web service, I'd like to confirm if a contract supports specific ABI (certain call methods). I am running get and communicating over JSON RPC. What are steps to for this? I am guessing ...

1
2 3 4 5
10