Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

124 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
2answers
2k views

Windows curl error with JSON-RPC

Using Windows, when I started Geth with: geth --rpc --rpcaddr 192.168.1.9 --rpcport 8545 --rpcapi "eth,net,web3,personal" --datadir C:\Users\BulldogBud\AppData\Roaming\Ethereum\testnet\chaindata --...
6
votes
1answer
327 views

Accessing custom JavaScript functions via RPC API on Geth

Geth allows me to define & load my own custom JavaScript functions with --preload flag or require() on Geth console. But is there way to access my functions via RPC interface? Like : curl -H "...
5
votes
1answer
150 views

Receive deployed contract address by transaction hash with JSON-RPC request

I want to receive deployed contract address by transaction hash. Transcation example - 0x996a683acd59a2ad17461f76ce0f387a89a5ac257ec5d667556219c6acc7f45a. As you can see this contract was deployed by ...
4
votes
0answers
460 views

eth_getTransactionReceipt returns null only sometimes and only on my node, tx is successfully mined in

I'm having this strange problem and it may be related to the way my node is configured. I'm making calls to both infura and my own nodes like so: {'id': 123, 'jsonrpc': '2.0', 'method': '...
4
votes
1answer
4k views

UTC/json wallet file: deleted -> recovered -> corrupted. 0.1 ETH REWARD

--EDIT-- I have advanced in my research. The UTC/JSON file in question is a 491 byte file. There are 256 random characters in the file with each 16 possible characters. Like a 256-number long ...
4
votes
0answers
278 views

Error: Transaction not confirmed for sendTransaction at rpc connection through http

I am trying to send a transaction to a contract deployed on the testnet. I run the geth HTTP JSON-RPC, with unlock option and the necessary apis accessible. When I exec the web3.eth....
4
votes
1answer
164 views

Send json rpc request in Long connection

How can i send rpc request in long connection. Since the default rpc request using the short connection. When i send many requests together, the geth will break down with to many open file error, ...
3
votes
1answer
189 views

Getting the latest eth_call result from a cluster of nodes

What's the best way to know the block number associated with the result of an eth_call? Assume I have several nodes that i'm running and i'm making calls to all of them (for redundancy). My goal is ...
3
votes
0answers
294 views

eth.getTransaction returning null? Troubleshooting steps

Why am I getting null trying to query ANY transaction id? Any ideas to troubleshoot? Running in light mode. I can query last block number. I can query balances of addresses without issue. eth....
3
votes
0answers
258 views

Parity RPC eth_newFilter not returning pending events

I'm trying to create a listener for new pending TXs on the network using Parity RPC's eth_newFilter method. I'm sending the request using the following parameters, expecting to get pending ...
3
votes
0answers
529 views

JSON RPC transfer of ERC20 Tokens with Parity

How can I use Parity with JSON RPC to send and receive ERC20 tokens?
3
votes
1answer
651 views

send a tx, json rpc, golang

I tried to send a tx via geth json rpc using the following code. But the geth rpc server response with "Invalid sender". I also tried HomesteadSigner. In that case there is no error received, but I ...
3
votes
0answers
758 views

How to run a testnet json rpc server?

I recently tried getting back into developing on Ethereum and it seems that everything about my setup has changed in the last half a year. I used to just be able to download a wallet from https://...
3
votes
0answers
215 views

c++ ethereum could not open wallet

Created 3 accounts as follows: $ eth account new Couldn't open wallet. Does it exist? Enter a passphrase with which to secure this account: Please confirm the passphrase by entering it again: ...
3
votes
0answers
230 views

Send JSON RPC request in BATCH

Is there any way i can send rpc request in batch way using pyethapp? If exists, whether it can help to increase the request efficiency? Thanks a lot.
3
votes
1answer
729 views

Encode method signature and parameters using Go-Ethereum

Is there any way to use the Go-Ethereum library to get the string I have to send to JSON RPC to call a contract method. I mean, Go-Ethereum comes with a CLI, so there must be some built-in functions ...
2
votes
0answers
21 views

Why does clef not implement ethereum's JSON-RPC

Assuming that the RPC standard still matches what is to be found today on the ethereum wiki, I was rather surprised to learn that the method calls provided by clef do not match the signer methods in ...
2
votes
0answers
86 views

Why does Ethereum use JSON-RPC and not gRPC?

I am fairly new to networking protocols especially JSON-RPC and gRPC as they are not nearly as common in web development as REST. I was reading around and seems like gRPC generally performs better. So ...
2
votes
0answers
24 views

Calculated blockhash of PoA block mismatches with actual blockhash returned by RPC

I set up a Demo PoA chain using Parity Etheruem. I sent some transactions to it and it started producing blocks. A block on my demo PoA chain was generated with block hash ...
2
votes
0answers
47 views

Unable to send large transactions on ethereum private chain

I have a small contract pragma solidity ^0.4.17; contract A10test{ mapping(uint=>string) public data; uint public revisionNo=0; function setdata(string _data) public { data[revisionNo] = ...
2
votes
0answers
123 views

parity json RPC eth_getBalance timeout on light mode

I have timeout problem with eth_getBalance on light mode enable on parity json-rpc. I have no problem with light mode disabled. Here my command on parity parity --chain ropsten --jsonrpc-apis all -...
2
votes
0answers
38 views

JSON RPC Data Structure

Is there a data structure that contains all the JSON RPC endpoints? Not the wiki, but a JSON or SQL file that I can use to programatically iterate over all the endpoints to generate code.
2
votes
0answers
365 views

Getting Json file from remix

I have been deploying contracts on rinkeby but we are almost done to go to mainnet. I have been comparing deployments with truffle and remix and there is a huge difference in gas uses, so I would ...
2
votes
1answer
278 views

Is there any limitation for the number of threads to service RPC calls?

Bitcoin has the config. How about ethereum? (geth) https://en.bitcoin.it/wiki/Running_Bitcoin -rpcthreads=<n> Set the number of threads to service RPC calls (default: 4)
2
votes
0answers
1k views

gRPC vs JSON-RPC API?

gRPC is modern high-performance RPC framework. Using gRPC is certainly than the use of JSON RPC for communication between geth nodes and the clients such as web3. Is gRPC is part of the Ethereum ...
2
votes
0answers
137 views

Is it possible to see the event log when using eth_call?

I want to perform a transaction locally (with the call method in web3 which perform a eth_call RPC call). It returns only the return value of the function called and I want to see the event log. I ...
2
votes
0answers
72 views

Programmatically unlock certain accounts with Parity?

Using geth it is easy to send transactions from multiple accounts but I do not know how to do this with Parity. I do not want all accounts unlocked. I do not want any account unlocked when it is not ...
2
votes
0answers
318 views

Parity syncing status for smart contract events with warp

So I'm trying to find the fastest way to fully sync a parity node in order to get all smart contract events, not just account states. The problem I've found is that when parity has warp syncing ...
2
votes
1answer
1k views

Subscribe to events usign geth websocket

I'm trying to subscribe to geth using the websocket api. First step was to start geth: geth --ws --wsport=8456 --wsorigins="*" --fast --cache=512 --rpcport=8455 --rpc --rpcapi="personal,eth,network" ...
2
votes
0answers
848 views

public facing full node with nginx

I am running a node on a Hosted root server, and will soon be synced, but I am not sure how I can now use this node to mine with my local Unix miner. What I have Xenon CPU with 32GB RAM 1 Terrabyte ...
2
votes
0answers
51 views

Why does my JSON-RPC request never complete?

I've set up geth to run in a Docker container with the following command (yes, I realize it's wide open to the world): docker run -it -p 127.0.0.1:8545:8545 -p 30303:30303 -v /data/ethereum:/root/....
2
votes
0answers
483 views

How to check token transactions with geth

I'm new to smart contracts, my apologies if this is a wrong approach. I want to monitor incoming (confirmed, not caring about pending) token transactions to my wallet (using geth). I found out how to ...
2
votes
3answers
1k views

Error: Invalid number of arguments to Solidity function | when trying to pass in parameter from App.js to Solidity

I am trying to call a function in my Solidity file (Coder.sol), while passing through a parameter from my App.js file. My function in my App.js file looks like this: handleStartRequirement: function(...
2
votes
0answers
374 views

Rejected/Removed Transactions how and when can they happen?

Background: I am writing a blockchain viewer/exporter that requests, via Parity JSONRPC, blockchain information and then stores this info off chain. Currently I am trying to accumulate all pending ...
2
votes
1answer
761 views

how to call web3.isAddress() via JSON-RPC?

web3.isAddress (and other web3 methods such as toWei) works fine in the geth console, but when called from RPC (or IPC), it always returns {"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"...
2
votes
1answer
158 views

Can't access swarm 8500 port from outside

I run local swarm node, so I can access it from localhost:8500. RPC request works fine locally. But when I try to send requests to swarm rpc from another server, it is not accessible. I see port 8500 ...
2
votes
2answers
841 views

Ether Historical Price Data

I am looking for historical ether prices. There was a thread already discussing this enter link description here, however, I would like to get not only the prices available for Ether on Poloniex but ...
2
votes
0answers
346 views

Detecting exceptions in transactions

I've seen some suggestions from the community about managing throws in transactions using some different methods: Don't use a throw - use events for error checking Check using ...
2
votes
2answers
1k views

web3 js eth.contract equivalent in PHP

var Web3 = require('web3'); var web3 = new Web3(); web3.setProvider(new web3.providers.HttpProvider("http://blahblah.com:8545")); var token = web3.eth.contract(ABI).at("x0x_contract_address") How ...
1
vote
0answers
16 views

smart contract Thether balanceOf method returns 0x

i used web3j-java call Tether contract method balanceOf(the server node is mine , and on ether mainnet),my address has 3USDT,but i call balanceOf , the node returns me 0x as the balance value,it is ...
1
vote
1answer
29 views

message: 'invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go struct field SendTxArgs.value of type *hexutil.Big'

I am using a JSON RPC request and source code is as follows: var options ={ url: "http://127.0.0.1:8545", method: "POST", headers: {"Content-Type":"...
1
vote
0answers
42 views

Understanding eth_estimateGas with regards to gas price, and current mempool

Does anyone have a detailed understanding of how eth_estimateGas works with regards to gasPrice and the current mempool state? I have historically seen some really odd behavior when using ...
1
vote
1answer
287 views

How to get contract object using ABI json and address with web3j?

I worked with web3js(JavaScript) and used web3.eth.Contract with 2 params (json, address) and successfully got contract object. Now I started to work with web3j(Java) and don`t understand how I have ...
1
vote
0answers
13 views

Transaction from non-miner node is not getting mined sometimes

I have a private Ethereum network containing 2 nodes,NodeA and NodeB. When I initiate a sendTransaction from NodeA(non-mining node) to deploy Ethereum contract using JSON-RPC, the transaction hash is ...
1
vote
0answers
22 views

Simple way to balance web3j connections between nodes

Context: I have a client that can connect to 3 local-network nodes to distribute query-loads and be more resilient to network/software issues. I have managed to create a -simple- watch-dog with a ...
1
vote
0answers
37 views

Why does ethereum JSON RPC encode bytes as hex?

Why not use base64 since it would be more compact?
1
vote
1answer
77 views

Remix IDE Desktop + Geth node as test network

I'm trying to connect the Remix Desktop client to my local Geth node. as usual i added: geth --rpc --rpccorsdomain https://remix.ethereum.org while starting up the node. This obviously only works ...
1
vote
1answer
25 views

Problem with contracts being deployed multiple times in Node.JS backend

I have a Javascript frontend that passes records in a JSON to the backend via Express to be deployed to the blockchain (currently using Rinkeby) with truffle-hdwallet-provider. This appears to work ...
1
vote
0answers
117 views

Curl Request Java - How To

I am looking to use some of the management admin API's found here: https://github.com/ethereum/go-ethereum/wiki/Management-APIs but unfortunately, the web3j library does not support the calls that I ...
1
vote
0answers
34 views

Inconsistent responses with 'eth_getTransactionByHash' through RPC API. Can anyone help?

I have been using the requests library with python to query the geth/rpc api in order to get ETH transaction data. I connected to geth via "geth --rpc --unlock TESTINGADDRESSWITHNOVALUE --allow-...