Questions tagged [rpc]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
1answer
306 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 "...
4
votes
1answer
1k views

Geth --rpcaddr doubt

Can you tell me the differences between --rpcaddr 127.0.0.1 --rpcaddr 0.0.0.0 --rpcaddr my_public_ip --rpcaddr my_private_ip during a private network config? Thank you
4
votes
1answer
314 views

Question about suicide traces in Parity

I use Parity's trace facility extensively to help me account for all transactions on individual accounts. I've been able to get almost complete accuracy (off-chain) of account balances for each block, ...
3
votes
2answers
2k 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 ...
3
votes
1answer
93 views

How to connect to Ethereum Mainnet from a Mobile App?

I have tested with various private Ethereum chains and test ones using Web3 and RPC calls to a node from React. I am working on connecting to the mainnet for Ethereum with the same principle. If I ...
3
votes
1answer
481 views

web3.js: Error: The method shh_newSymKey does not exist/is not available on Web3.js

My main goal is to call web3.shh functions using RPC API , Web3.py or Web3.js. I can call web3.shh functions when I use geth attach; which is my last option to do. I am following this answer. geth ...
3
votes
1answer
962 views

Raw transaction nonce won't increment until confirmation

I am building transactions manually and have been able to successfully create raw transactions which can be broadcasted to the network. My problem is, that while I can get a nonce from the web3....
3
votes
1answer
312 views

Retrieve event args from getPastLogs

When we use web3.eth.getPastLogs it returns topic and data properties together with rest data. Does it possible to retrieve event args parsing just data and topic as filter? Without to make additional ...
3
votes
0answers
112 views

GETH gets out of sync from time to time

GETH tooks 6 days to sync, after that it will get out of sync from time to time. (PC is running with SSD, never shutdown, and network availability is 100% with 500mbps connection). May I know how ...
3
votes
0answers
268 views

Invalid JSON RPC response: {“id”:6,“jsonrpc”:“2.0”}

I'm following this tutorial https://medium.com/@ConsenSys/a-101-noob-intro-to-programming-smart-contracts-on-ethereum-695d15c1dab4 I have downloaded the code from github repo. I'm using ganache as ...
3
votes
0answers
54 views

What RPC APIs are safe to expose?

What RPC APIs are safe to expose (make public, so accessible by anyone), and what are the unsafe ones, and why? I've read: are there "public" ethereum nodes? or any recommendations on ...
2
votes
3answers
883 views

How to get token holders via json RPC

So I want to get the token holders of a token like this: https://ropsten.etherscan.io/token/0xfa68d281e7ff1a8e9393428ba0abe8961cf342cb#balances Via my Ethereum node. I tried: https://github.com/...
2
votes
1answer
247 views

Private Ethereum Node connection with Metamask

I am able to connect using metamask localhost 8545 option, as well as computer within the intranet. geth --identity "SK" --datadir data --networkid 18 console --rpc --rpcport 8545 --rpcaddr "0.0.0.0" ...
2
votes
1answer
306 views

Parity web3 access for another user account on same server?

I am following the instructions from the Parity github page: https://github.com/paritytech/parity/wiki/Basic-Usage Specifically: $ npm install web3 $ node > Web3 = require("web3") > web3 = ...
2
votes
1answer
173 views

How does one retrieve revert/require error messages from RPC

In both of these questions, the user is asking if it's possible to get the error string from a revert or require. The answers say, basically, "Yes" and point to Truffle or other methods. VM Exception ...
2
votes
1answer
98 views

Using json RPC without any libraries besides js

I am currently trying to call a function on my smart contract function adopt(uint petId) public returns (uint) that has already been deployed to the ropsten network... but here's the catch. I'm ...
2
votes
0answers
59 views

Creating new accounts using `web3`

In the new version of web3.py, the personal.newAccount functionality has been retained only for the geth client. What is the right cross-client approach to creating new accounts? See v5 migration ...
2
votes
1answer
140 views

Ethereum wallets that support “Custom RPC URL” like Metamask

I'm running a private blockchain and I've been using Metamask connected to my custom RPC URL with no issues.. I'm curious if there's any other Ethereum wallet that let's you add and connect to a ...
2
votes
1answer
60 views

How do i create account remotely?

I have two servers, one for eth-node, one for web api and user db. I want to send request to create account from web server to eth server, but i see it can be created by running command like geth ...
2
votes
0answers
251 views

“RPC error, your account is locked” when I try to deploy the last version of parity-bridge

I have already success to deploy the last version of parity-bridge (last month), but today i have pull the last version of parity-bridge. I have that on my terminal : env RUST_LOG=info parity-bridge-...
2
votes
1answer
522 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. ...
2
votes
0answers
538 views

Geth connection rpc vs ws

where I can find same articles or materials to understand differences between rpc and ws connection over geth. From my point of view rpc is part of a websocket connection, so why I have to use ws ...
2
votes
2answers
435 views

Deploying to rinkeby doesn't work

It seems I have a bit of trouble deploying a contract to testnet through infura this is my code: var Web3 = require('web3'); var web3 = new Web3(new Web3.providers.HttpProvider('https://rinkeby....
1
vote
1answer
3k views

GETH command --rpc

I want to learn how to use the GETH console. What does command "geth --rpc" do? Why are so many entries generated? What is it syncing? If it is a syncing process, when or what message means the ...
1
vote
1answer
65 views

transactions in rpc block response sometimes have chain null and sometimes correct chain

when doing e.g. a blockByNumber rpc request I am getting a result like this from parity: https://gist.github.com/ligi/fbc7061d93f087cf0eb0f4db83d1fced what is puzzling me that some transactions have: ...
1
vote
2answers
747 views

How to check Ethereum smart contract info?

I want to know 3 things: Is an address a smart contract? Is this smart contract an ERC20 or ERC721 token? Is the Solidity code public?
1
vote
1answer
99 views

How did MyEtherApi manage to disallow some methods (Parity)

I want to launch a public node with RPC enabled, open to others and for me. However, I want to disable the RPC methods that are unsafe to expose to the outside. Looking at MyEtherApi, they have ...
1
vote
2answers
2k views

TypeError: Web3.providers.WebsocketProvider is not a constructor?

Trying to connect to a geth machine over websocket? JS code. var Web3=require('web3'); var web3 = new Web3(new Web3.providers.WebsocketProvider('ws://10.244.5.43:8546')); console.log(web3....
1
vote
1answer
998 views

How should I enable the api’s ‘personal’ and ‘admin’ over RPC on Azure ‘Ethereum Consortium Blockchain’

How should I enable the api’s ‘personal’ and ‘admin’ over RPC on Azure ‘Ethereum Consortium Blockchain’. Is there any way by which we get direct access to the VM console (Now we SSH on to the VM to ...
1
vote
1answer
478 views

go-ethereum rpc connection via http for native dapps

For native dapps we can establish an rcp connection over IPC using conn, err := rpc.NewIPCClient("/home/karalabe/.ethereum/testnet/geth.ipc") Now what if I want to establish an rpc connection over ...
1
vote
1answer
36 views

Is it possible to filter pendingTransactions?

To get a list of the pending transactions that my node is aware of I can easily call the eth_pendingTransactions jRPC call. This will give a big list of pending transactions, which all need parsing to ...
1
vote
2answers
27 views

How do I activate HTTP JSON-RPC on a Geth node?

I want to use RPCs to access a Geth node. Do I have to execute admin.StartRPC on the node in order to activate the RPC server?
1
vote
2answers
320 views

Error when try to connect to infura using HDWallet

I would like to debug a transaction using truffle and infura. truffle debug --network=infurarinkeby 0x7... truffle-config.js: infurarinkeby: { provider: function() { return ...
1
vote
2answers
604 views

Javascript Web3 sendTransaction not working

I wrote the following to interact with a Geth node. Got Error: authentication needed: password or unlock. Is there any way to bypass that? I don't want to use private key in my code either. Can I ...
1
vote
1answer
508 views

Check if node is running in private network

Is there a command in the geth javascript console to check if node is running in private net or if it is public? For now I always had to check it in the left hand corner in mist if it's private or ...
1
vote
1answer
269 views

run node safe prevent RPC hack!

I was running a node on my vps and my coinbase account was hacked. could anyone tell me what would be the default command to start geth on port 8545. Thank you
1
vote
1answer
287 views

unable to list accounts in web3.py via RPC

I built a private chain on my computer using geth and I want to interact with it using web3.py. But there was something wrong. I started the private chain(containing only one node) with the command $ ...
1
vote
1answer
46 views

What information do nodes exchange with each other?

From my understanding nodes are able to communicate with each other to send and receive information such as newer block info etc... I would like to understand what those informations are, and why can ...
1
vote
1answer
250 views

Security and Geth RPC

Sorry just a little confused. If the geth rpc node needs to be running on the live server (say you deploy your dapp to the world), does that mean everyone has access (via the web) to modify the ...
1
vote
0answers
42 views

RPC command to list current nodes

I am using Parity and I want to see a list of the IP addresses of every node my node is talking to. I am sure I have done this before but I can't remember how. Please share the curl/RPC command to ...
1
vote
1answer
703 views

MetaMask - RPC Error: Error: WalletMiddleware - Invalid “from” address

I'm trying to create a simple Dapp (via tutorial) which would allow me to send Ether from sender to receiver (via a contract with an address that automatically approves the transaction). The truffle ...
1
vote
2answers
74 views

Is it possible to connect to public Ethereum like blockchain with Remix to deploy and view contracts?

I've tried to do so by specifying the web3 provider and the 8584 port but it gets stuck on every try. Is this possible? if so, is there another solution for that need?
1
vote
0answers
130 views

How to use 'geth attach' with Infura?

I have a project in Infura and the project ID is 6f...3a. I'm having problem to start geth attach process with Infura. I tried all protocols (http, https, ws and wss) but all failed. Did I miss ...
1
vote
0answers
16 views

One rpc connection faster than another

I have four synced peer nodes running on two separate machines. Nodes 1-3 have been around since the beginning of the block chain and are all on one machine while Node 4 was just added around block ...
1
vote
1answer
60 views

Is it possible to artificially delete a given block from local chain database without causing any problems?

Is it possible to artificially delete a given block from local chain database without causing any problems? for example, how could I delete the latest block from my local eth node, and resync newly ...
1
vote
0answers
58 views

Handle nonce after RPC timeout

From time to time, I will be making some 5 ~ 10 tx/s on Ethereum via RPC interface. I have to handle the nonce manually because it cannot update fast enough. But I am facing issue below: From time ...
1
vote
1answer
815 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
2answers
228 views

How to get balances of all the accounts(~1000) in Geth node?

How can I get the balance of all the accounts in my Go Ethereum node? I have about 1000 accounts and it is too slow to use eth_getBalance to get balance for each address. Are there any ways to use ...
1
vote
0answers
281 views

Geth RPC send_transaction error -32000

How do you calculate how much gas to use in a send_transaction? Amount: 0x670479cb5385800, // (decimal: 463949500000000000 wei 0.4639495 eth) Gas price: 0x6ddd00 // (decimal: 7200000 wei) Gas: ...
1
vote
0answers
141 views

Cannot connect to the Web3 provider when rpccorsdomain is on

I am getting the message: Not possible to connect to the Web3 provider. Make sure the provider is running and a connection is open (via IPC or RPC). When I specify: --rpccorsdomain "http://...