14

The way I check is: Find out what the last block is. https://etherchain.org Start geth with console (https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options) When geth is running enter the command eth.syncing eth.syncing will show you your block sync info. You are looking for currentBlock. Example: ./geth console eth.syncing Output: { ...


7

The JSON_RPC eth_call method allows you to simulate a transaction on the blockchain, including contract executions. This method can be accessed in geth or web3.js as eth.call({from: eth.accounts[0], to: myContract, gas: 1000000, value: web3.toWei(1,"ether")}) If you know the ABI for a contract, you can use var myContract = eth.contract(myABI).at(...


7

in your build folder you cmake .. -DGUI=0


7

The loadScript function in geth takes an external JS file and executes it. Example usage: //somefile.js function foo() {...}; In console: loadScript('somefile.js'); foo(); It's loaded as if every line was executed directly, like node.js .load


6

The geth console doesn't seem like the best tool for the job. A better method would be to use NodeJS + web3. Just follow these instructions to connect web3 to your testrpc, then you can use exactly the same script as before, but write to a file using var fs = require('fs'); fs.writeFileSync("myfile.txt", myArray);


5

Compare the value in the log file in the field named number with the value of the last block here https://etherscan.io If it equals or near to equal it means that your chain synchronized.


5

This is what I use in my Linux environment. I save the following in /home/user/bin/runGeth #!/bin/sh # Graceful exit, like pressing Control-C on a program killall -q --signal SIGINT geth sleep 10 # Hard kill, only to stop a process that refuses to terminate killall -q geth # Clear IPC as this can sometimes cause problems rm -f /home/user/.ethereum/geth....


4

Geth and web3 lib has no compiling abilities (like web3.eth.compile.solidity()) since version 1.6.0 So the way you can try out to deploy Greeter contract is compiling it with solc and then importing results to geth console. Here's full example of such approach: How to compile Solidity contracts with Geth v1.6? In example loadScript("test.js") used ...


4

geth --rpc starts the rpc interface. The rpc interface is required to be able to connect with clients (websites, for example) that want to access the Ethereum blockchain. Use options --rpcaddress and --rpcport to set address and port of the rpc interface. With --rpcapi you can limit access via rpc to certain apis. Also, --rpccorsdomain has to be set in many ...


3

No you can't as is, from geth console. But the the above code you have posted is javascript,so you have all the possibility of what you could do from java script. For example you can have it running as a Dapp, and in the call back function you call a post to your server which can record the result data. You also have the option of using node.js as one of ...


3

So there are two phases. CMake generates makefiles (or Visual Studio solutions or xcode projects), and then you build those with make, or MSBuild, etc. During the CMake phase you can pass parameters to exclude particular applications from the build process. Here are the main properties: TOOL, TEST, GUI, EVMJIT, which will all be "on" by default, but can ...


2

Depends on how you're installing it. In OS X you would run brew install cpp-ethereum because by default it comes without those. Now if you wanted to do that in Ubuntu you would probably do something like this: git clone --recursive https://github.com/ethereum/webthree-umbrella.git cd webtree-umbrella ./webthree-helpers/scripts/ethupdate.sh --no-push --...


2

So, it looks like the standalone Solidity compiler solc is only available as part of the Ethereum C++ command line tools. This means that if you want to use solc from within geth you need to install both the Go tools - that give you geth and the C++ tools, that give you solc. This looks very odd to me, particularly considering that the C++ tools are a ...


2

eth.getCompilers() returns an empty list even if installed. You can try : ➜ ~ which solc /usr/local/bin/solc then in geth > admin.setSolc("/usr/local/bin/solc") Following your edit, if you just want to use the npm package you wont be able to compile in geth, but still you can use it in a script like described in the package doc : var solc = ...


2

I had this problem too at one point. The best thing to do is to stop everything and restart your computer. This will stop all Ethereum processes. You could kill processes using the task manager / command line but this will be easier to do and it will ensure you do not kill important processes not related to Ethereum. Once you restart, re-run the GUI. If you ...


2

problem This error is caused by a process who use this folder/chain. Perhaps you've runned a previous geth client which is still alive in the background. Solution stop geth process or try to attach to it by typing: $ geth attach in your command line. This will allow you to communicate with the geth client through a console.


2

The commands don't require the -- prefix. The options do. From the help: user@Kumquat:~$ geth help NAME: geth - the go-ethereum command line interface USAGE: geth [options] command [command options] [arguments...] VERSION: 1.4.10-stable COMMANDS: import import a blockchain file export export blockchain into file upgradedb ...


2

Parity accepts both, hex and decimal. Just make sure hex numbers are prefixed with 0x (e.g., 0x539) and decimals are written normally (e.g., 1337). The incompatibilities between Geth and Parity are painful if you try to setup cross-client networks. The reason is that Geth is not designed to run different network configurations other than a modified genesis ...


2

If you are not trying to compile files on the terminal only and can use javascript to do that then this script might help you which I wrote sometime back. I also had multiple dependent contract files which were required to compile the main contract. So I solved using following way - Define all dependent contracts in an input object keeping the same import ...


2

You can use different methods. (1) Find out what the latest block is from someone who is up to date (or a online block-explorer like etherscan.io / etherchain.org), compare that to where your chain is. (2) Once you start importing blocks 1 by 1 every ~15sec, instead of in chunks of 20-50, you are probably up to date.


2

Look into Mist. It's a super convenient GUI tool that has a built-in Solidity compiler. Start by syncing on one of the testnets. Once you have test ether you can deploy contracts via the menu. Then just copy and paste your basic greeter contract code into the window to compile and deploy it.


2

They do not accomplish the same things. You will need the 3 interfaces. Command line and options is how you are going to run GETH. Interactive console is how you can send transactions, unlock account and communicate with the Ethereum blockchain. Keep on with your learning and you will understand the difference here. Install GETH, learn how to start a ...


1

Short answer: no amount of tuning will get an HDD to perform acceptably, you'll need an SSD. Longer answer: From discussions with geth devs, multi-node operators, and my own tuning experiments: PERFORMANCE TUNING OPTIONS: --cache value Megabytes of memory allocated to internal caching (default: 1024) --cache.database value Percentage of cache ...


1

The documentation you're looking for is the web3 documentation for sendTransaction. You can set the gas and gasPrice properties on the object to specify how much gas to send, and how much to pay per unit of gas, respectively. As others have pointed out, you're getting an error because the account is not unlocked. You can use either of the solutions ...


1

The sending account is locked. You need to unlock it first. In this example you can use personal.unlockAccount(eth.coinbase)


1

something about start geth like this: geth --unlock '0xd7a9a61a480d458a1181e0563b0555589a6' --testnet --etherbase '0xd7a9a61a480d458a1181e0563b055554489a6' --mine then, see here:


1

You can use node or geth to deploy a contract. Node example: npm install ethereum-js-testrpc web3 npm install solc Run the test rpc server node_modules/.bin/testrpc Console Web3 = require('web3') web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); code = fs.readFileSync('Voting.sol').toString() solc = require('solc') ...


1

Truffle Framework is the most popular tool that is available now to perform such a task. All you need is to copy your contract code into contracts directory, add an entry into migration file and run: truffle migrate The procedure is explained in details here. There are lots of tutorials and good docs available if you get lost. I hope it helped


1

If you want to stick to command line more and go through step by step then here is a more up to date version to get your first piece of code working: https://alanbuxton.wordpress.com/2017/07/19/first-steps-with-ethereum-private-networks-and-smart-contracts-on-ubuntu-16-04/


1

Unfortunately, it appears that it sets GOMAXPROCS to the number of CPU cores automatically. If you're willing to manually recompile geth every time there's a new version, you could alter the source code to set GOMAXPROCS to only 1. But otherwise, there doesn't seem to be a way to set this manually.


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