Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [json-rpc]

json-formatted remote procedure calls to communicate with ethereum clients

0
votes
1answer
7 views

POA chain: intrinsic gas too low, contract deployment

I'm trying to deploy my smart contract to a private proof of authority chain with geth, but i always get the following error message intrinsic gas too low This is the JSON RPC request i'm sending. ...
1
vote
2answers
47 views

Difference between web3.eth.getCoinbase() and web3.eth.getAccounts()[0]

What is the difference between web3.eth.getCoinbase() and web3.eth.getAccounts()[0]. In both cases, I always get the value, which is the currently selected account in Metamask. Note: The question ...
0
votes
1answer
26 views

JSON RPC call from javascript with axios

I would like to call a geth method via JSON RPC from within a react component. I tried this but I always get the Error: 405 (Method Not Allowed) Here is my code: try { const response = await ...
0
votes
1answer
17 views

CORS Issue when using RPC with 2 docker containers

I currently have a setup with two docker containers. The first container, peerA, has a private ethereum network running a single node. The second container, web-app, has a web application that uses ...
1
vote
1answer
49 views

How to get list of all transactions on all accunts in parity wallet [duplicate]

I'm looking for simplest way how to get list of all transactions(incoming, outgoing, external, internal, confirmed, unconfirmed) on all accounts created in parity wallet. The listing should support ...
1
vote
0answers
13 views

Web3JS throws InvalidResponse without Ganache core ever receiving a request?

Versions: Ubuntu 18.04 LTS Node.JS: 8.3.0 WebJS: web3: ^1.0.0-beta.37 web3-utils: ^1.0.0-beta.36 npm: 5.6.0 Truffle version 5.x (latest) I have traced through the HttpProvider code in the Web3 ...
2
votes
1answer
30 views

How to configure truffle network with IPC provider?

How can I define in truffle the ipc connection to the node? Currently I am using in truffle.js host/port fields, which are used to create a HttpProvider. module.exports = { networks: { dev: { ...
2
votes
0answers
40 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] = ...
1
vote
2answers
39 views

How eth_getStorageAt works when block option is not “latest”?

For the block parameter of eth_getStorageAt call, we are given 4 options: HEX String - an integer block number String "earliest" for the earliest/genesis block String "latest" - for the latest ...
2
votes
0answers
21 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
25 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.
0
votes
1answer
92 views

How to correctly send RPC call using Golang to get smart-contract owner?

Update 12 November 2018 Someone shared a very close solution to what I was looking for here. Update 10 November 2018 Since I'm not able to achieve this using the approach in this question, I ...
0
votes
1answer
39 views

Problem with running web3.py code

I am trying to run this code from web3 import Web3, HTTPProvider import json import pprint import requests from random import randint # Debug flags debug_transaction = False debug_CALL_transactions ...
1
vote
2answers
40 views

JSON RPC Best Practices for Sending Ethereum

I am planning on setting up an Ethereum wallet in my website. Doing so by interacting with an Ethereum node over JSON RPC. I want it to act almost 100% similar to how a cryptocurrency exchange (...
0
votes
1answer
18 views

DApp on Node2 accessing smart contract deployed by Node1

Node 1(Desktop) deployed a contract on private blockchain. From node2(Laptop),I want to interact with the contract. But I failed at 'web3.version.getNetwork(err, netId)' function.This function throws ...
1
vote
1answer
23 views

Not connecting to private blockchain from another node on the network [duplicate]

I have a Desktop and Laptop.I have configured private blockchain on my Desktop(node1) and able to sync with it from Node2 Laptop.But I am not able to get connected to the contract deployed on Node 1 ...
0
votes
2answers
53 views

How to get multiple blocks timestamps with a single JSON RPC call?

Is there a way to get data similar to the ones provided by web3.eth.getBlock(blockNumber) but with multiple blocks at once? The goal is to get the timestamps for 100 blocks in a row without ...
0
votes
1answer
78 views

Access private blockchain from another PC/Laptop?

I have private block chain on my PC.The private blockchain is configured and deployed using geth. I want to connect to that blockchain from another node(my laptop) to access the smart contract ...
1
vote
1answer
62 views

Cannot connect to parity JSONRPC from local machine

Here is my parity config: [rpc] disable = false port = 8545 interface = "all" cors = ["*"] apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "traces", "rpc", "shh", "shh_pubsub"] ...
1
vote
1answer
62 views

Parity Node: Different results from trace_rawTransaction and trace_replayTransaction rpc calls

By calling these two rpc calls, I can track if a transaction invokes more message calls. Yet when I tried this two rpc calls, i get different result on this transaction. (https://etherscan.io/tx/...
1
vote
0answers
32 views

Opening Smart Contracts on Quorum via json rpc api eth_sendtransaction for Integration Purposes

if I wish to integrate quorum blockchain with other platforms via the json rpc api eth_sendtransaction method, what other implications can there be? Assuming the smart contract built is secured and ...
0
votes
1answer
26 views

Do all geth calls require hex data?

Taking eth_getLogs as an example. Here's the original POST data: { "id": 67, "jsonrpc": "2.0", "method": "eth_getLogs", "params": [{ "fromBlock": 3138480, "toBlock": ...
2
votes
1answer
42 views

Is running a ethereum node necessary to deploy contracts with JSON RPC?

everybody, I'm currently trying to learn how to automatically deploy a smart contract to the Ethereum blockchain and I heard of the JSON RPC way of doing that. There are the eth_sendTransaction and ...
1
vote
1answer
27 views

How to use web3js to put it in json?

I have used web3js by using it in the form of node(npm). But I don't know how to extract some data generated from nodes. Does anyone know this web3js so the results can be changed to json form? ...
1
vote
0answers
924 views

How do I send html form data as JSON content type with node js? [closed]

I have a smartcontract GovtContract that works fine when I use curl commands, $curl -X POST -H "Content-Type: application/json" localhost:3000/govtcontract/set -d '{"value":"5"}' | jq $curl -X GET -...
0
votes
1answer
64 views

API to get transactions between 2 blocks in Ethereum

Assuming that I have a starting block and an ending block and I want to retrieve all the transactions that have occurred between these two blocks, is there any API that can help me achieve this?
4
votes
0answers
159 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': '...
3
votes
1answer
74 views

Trace transaction with Go client

I need to call the RPC method debug_traceTransaction but it's not present within the Go client. I'd add a method that performs the call to the RPC endpoint but I'm wondering if there's a reason ...
1
vote
1answer
37 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 ...
1
vote
1answer
53 views

How to get the progress of geth node syncing info via JSON RPC?

I install new geth nodes on remote servers pretty often and I'd like to have a script which can tell me info like this: Node1 is synced for 30%. Is it possible to get any progress of geth node ...
2
votes
0answers
73 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 ...
1
vote
0answers
31 views

Why is the transactionsRoot the same hash as “empty patricia merkle trie” root hash?

My setup is as follows: I am Using ganache-cli and metamask to send 1 ETH from account 1 to account 2. When I use JsonRPC to get the Information about Block 1 (the one with the transaction) the ...
0
votes
1answer
29 views

Is it safe to have a locally running Ethereum node exposing personal RPC API?

I am developing a REST API currently running off a node.js server. The API allows ethereum account creation, making a transaction etc. The API interacts with a locally running ethereum node to ...
0
votes
1answer
320 views

How secure is using port 8545 from the internet (aka via JSON), can someone steal my ether?

Just noticed I can access 8545 from localhost but fortunately not from the web/internet. Do I need this at all? e.q. I read about someone who had lost $20 million due to someone else sending a call ...
1
vote
1answer
72 views

To transfer ERC20 tokens (using Web3js), is it necessary to implement web.eth.Contract?

I'm kind of new to Ethereum network. I used to implement Stellar before. I have successfully implemented my JavaScript app to transfer Eth already. Therefore, I want to expand my above app to accept/...
0
votes
0answers
30 views

Getting the domain of the client http request in geth node

I am running my own geth node in fast mode. It is working as expected and I can run HTTP RPC apis by connecting to it's port 8545. I am using several domains to make requests from and I want to ...
0
votes
1answer
101 views

Securing Quorum Geth Node

I have a dapp node which uses web3js to send transactions to quorum geth node. The html pages shows the http provider and the ports. In theory anyone can use these ip and public address in the html to ...
0
votes
0answers
141 views

eth_sendRawTransaction parameter formatting

we have a JSON RPC method eth_sendRawTransaction as specified here. how is the raw transaction data formatted? I can't seem to find this anywhere. I'm guessing it consists of a signed transaction ...
0
votes
0answers
121 views

Unable to connect to geth via web3.py

I'm launching geth with following command: geth --testnet --syncmode="full" --rpcaddr "0.0.0.0" --rpccorsdomain "localhost" --rpc But when I'm trying to interact with geth by this python code from ...
0
votes
0answers
53 views

Increasing the maximum number of concurrent requests for geth node

I am running a geth node following this on Ubuntu 16.04 following this https://goo.gl/FvAisy I am using locust to run load tests on this node. However, as soon as the user count reaches 1024 the ...
1
vote
1answer
99 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)
0
votes
0answers
46 views

session terminates on a iterative JSON-RPC call using python

I am calling debug_traceTransaction from python in the following manner # Instantiate web3 web3 = Web3(KeepAliveRPCProvider(host='127.0.0.1', port='8545')) session = requests.Session() ... #RPC ...
0
votes
0answers
480 views

gRPC vs JSON-RPC API?

gRPC is modern high-performance RPC framework. Is gRPC better than the use of JSON RPC? and that GRPC is part of the Ethereum roadmap?
0
votes
0answers
20 views

Contract not deploying from etherbase node in private network

i created a private blockchain network.one is node 01 where i am not start mining and another node is i use for mining which is node 02.when i am sending transaction or want to deploy a contact from ...
0
votes
1answer
79 views

How to send an arbitrary message in transaction using JSON RPC?

I'm using geth client and the "personal_sendTransaction" method for sending a transaction. I need to add some comment to the transaction. How I can do this? I've tried to put a hex string into the ...
0
votes
1answer
59 views

Geth Curl parameter id [duplicate]

Whilst going through the documentation for using JSON RPC, 1 of the parameters hasn't been explained. What is the purpose of id? Is it specific to the type of RPC curl request being made? For e.g. ...
2
votes
1answer
160 views

How can I retrieve the number of decimals of a token with RPC?

There doesn't seem any obligation in the ERC20 standard to provide the number of decimals anywhere, yet etherscan and all other services can automatically determine the number of decimals of a token. ...
0
votes
1answer
194 views

Infura tutorial no longer accurate, how to get the initial curl HTTPS POST to work?

Following the guide at https://blog.infura.io/getting-started-with-infura-28e41844cc89, step 2 after registering is to send a HTTPS POST using curl. The command is curl -X POST --data '{"jsonrpc":"2....
1
vote
1answer
109 views

debug_traceTransaction returns “insufficient balance to pay for gas”

At block 916647, tx hash 0xca879fcf2d0146fc4e214ed5d9747a2743b6a586b4f1de1541e52c2fe6be5bad debug_traceTransaction returns error: $ curl -X POST --data '{"jsonrpc":"2.0","method":"...
0
votes
1answer
75 views

eth_sendTransaction vs eth_sendTransactionAsync - asynchronous or synchronous request

Understand that eth_sendTransactionAsync was added in Quorum. eth_sendTransactionAsync returns immediately to allow sending many private transactions/bursts of transactions without waiting for the ...