6

It looks like your code is written in ES6, but Geth does not support ES6 syntax. Geth uses otto as its JavaScript VM, which only supports ES5. You'll need to translate your code to ES5 first. Something like this (completely untested): function waitBlock(callback) { function innerWaitBlock() { var receipt = web3.eth.getTransactionReceipt(transferfunds....


6

Archive mode means that all states of values in smart contracts as well as all balances of an account are stored. e.g. if the value of a string in a contract changes from XYZ in block 6000000 to ABC in 6000001, you can recall that string's state from block 6000000 with web3.eth.call, providing the blocknumber (as hex value with 0x prefix) as one of the ...


5

Using eth_Call to execute function: Example.test(0x0000000000000000000000000000000000000000000000000000000000000002) of Example contract we will receive following reply from geth node: ...


4

The "last 65 blocks" part is normal. When the "fast sync" mode was first introduced in eth/63, it was even more. I suggest you take a look at that PR for a general description on what geth's --syncmode=fast actually does. In short: not downloading all the blocks up to the head is done so that chain reorgs can be handled gracefully - especially since the ...


3

Truffle team recently released Portable Solidity Debugger that can be used to debug transactions on the main Ethereum network as they claim http://truffleframework.com/blog/announcing-full-portable-solidity-debugger we built it to work with any Ethereum client, so you could debug transactions against the main Ethereum network if you so desired truffle ...


3

First make sure you have the latest version, EAP 15, 173.2696.28, and you are using the latest version of Go, 1.9, as that's preferred for a better debugging experience due to the recent improvements in Go with regards to debugging. Then, go to Run | Edit Configurations | Go Applications | select the run configuration you want to edit | Run kind and change ...


3

I've had the same issue. It appears that --nodiscover is just disabling your node from running node-discovering algorithm to find peers to connect, but it doesn't prevent others from discovering and attempting to connect to your node. If you'd like to limit the inbound connection attempts, you could specify --netrestrict. e.g. --netrestrict="127.0.0.1/8"


3

If you see that, you aren't yet synchronized, not even close. You are just done with the block download phase and still running the state downloads. You can see this yourself via the seemingly endless Imported state entries [...] stream of logs. You'll need to wait that out too before your node comes truly online. More informations here: https://github.com/...


3

I view it as a byte-addressed byte-array. It is certainly byte-addressed, in that consecutive integer addresses refer to consecutive bytes in memory. It is true that you can only read a 32 byte word (mload reads 32 consecutive bytes), but reads are not word-aligned. mload(0) and mload(1) are both valid and have 31 bytes in common. so it is not really a ...


3

In solidity 0.4.22 the require and revert reason were added. As can be seen here, they are abi-encoded as if it were a call to a function "Error(string)". This blog post gives an example: an eth_call to a function function myFunction(uint256 input) public view returns (uint256) { require(input >= 5, "myFunction only accepts arguments which are ...


3

so, Ethereum has both a chain ID and network ID. Setting network ID only sets the latter, while passing in --rinkeby or --testnet correctly sets both


2

geth console it's plain javascript console. It's support javascript syntax, you're missing the quotes " ": admin.addpeer("enode://c32........9@[::]:30305") ^_______________________________^


2

Memory is a word-addressed byte array. Storage is a word-addressed word array. Geth simply chooses to display the memory in 32-byte segments, which is a bit of an odd choice, but when reading and writing to memory in the EVM each byte is independently accessable with mstore8


2

The problem is that the setting of GOPATH is incorrect. You need to set the GOPATH in the IDE to: /home/robert/go and then open the project via Open Directory to /home/robert/go/src/github.com/ethereum/go-ethereum. See the Go Workspace for how to set up a Go workspace.


2

All I needed isto wait...allowing it to sync up for 1 day and night solved the issue. Ether I received via faucet is visible...eth.blockNumber gives 2894417.


2

With Truffle I use HTTP-RPC calls to deploy my contracts via geth: --rpc should be provided in the CLI when starting geth to enable the HTTP-RPC server by default the HTTP-RPC server will start on localhost:8545 (i.e. 127.0.0.1:8545), though you can change this with the CLI arguments --rpcaddr <new address> and --port <new port> respectively if ...


2

A bucket list is a list of things you'd like to do before you die, such as getting a private PoA network up and running. A bucket limit is an upper bound for the number of peer IP addresses that your client can handle in any given "bucket" while running its peer discovery mechanisms. From the code, it looks like the limit is set to 2 peers from the same /...


2

I see you want a method to get each added number and that can be done just by specifying the variable as public, a getter is automatically created. But you also need to know how many items are in there, a new method must be defined. Let's consider this contract pragma solidity ^0.4.24; contract MetaCoin { uint256[] public someNumbers; function ...


2

You must specify the parameters using --rpcapi="db,eth,net,web3,personal,web3" Source


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 ...


2

Golang debuggers aren't very good at breaking, sometimes they miss the breakpoint. What are you using? Try gdb. There is no way you can skip NewEVM() function it is being called on every transaction inside ApplyTransaction() function in core/state_processor.go. Make sure your node is actually processing blocks, you could be disconnected from peers. You can ...


2

Regarding your first two points: Parameters are passed via so-called "Call Data". Call data is retrieved via certain EVM opcodes (CALLDATACOPY, CALLDATASIZE, CALLDATALOAD). In your testing environment, using the evm tool, you may provide call data with the --input parameter, eg: --input 11223344 will provide 4 bytes of data, 0x11223344. The public ABI of ...


2

The problem might be related to the location where you are storing your wallet. To be automatically detected, the wallet file needs to be stored in a folder called keystore inside the folder where geth is installed. These are the most common paths: – Mac: ~/Library/Ethereum – Linux: ~/.ethereum – Windows: %USERPROFILE%\AppData\Roaming\Ethereum If you ...


2

Can someone point me in the right direction such as documentation of where the reward is given in the codebase? The static block reward is defined in consensus.go: FrontierBlockReward = big.NewInt(5e+18) // Block reward in wei for successfully mining a block ByzantiumBlockReward = big.NewInt(3e+18) // Block reward in wei for successfully mining ...


2

Bootnode can automate this process. Create a keypair for bootnode Generate URL for bootnode In start command for all other nodes, just provide bootnode URL With this : Each node "announces" itself to bootnode on startup Queries peers from bootnode and connects to peers This article has an example : https://github.com/ethereum/go-ethereum/wiki/Setting-...


2

Sure, this is brute-force attack trying to unlock an account and send out a transaction. Never never never open up rpc port in public.


2

This is a brute-force attack against your password. Besides potentially stealing all of your ETH, descryption is relatively expensive computationally and could be a DOS vector. You should never expose the personal API to the open internet. Consider disallowing external connections by setting your rpcaddr and rpccorsdomain to localhost. Even better, use IPC ...


2

In geth's code you'll find the snippet bellow https://github.com/ethereum/go-ethereum/blob/master/eth/handler.go // Start a timer to disconnect if the peer doesn't reply in time p.syncDrop = time.AfterFunc(syncChallengeTimeout, func() { p.Log().Warn("Checkpoint challenge timed out, dropping", "addr", p.RemoteAddr(), "type", p.Name()) ...


1

Can you post the node log? You can set it by: web3.miner.setEtherbase(web3.eth.accounts[0]) you can change the parameter to suit your account. First remove that coinbase and reconfig your node. Orjust set it to the default account that you have already created. But if you remove the coinbase from the genesis.json file and set it after attaching to your ...


1

I think here is a similar issue on github https://github.com/ethereum/web3.js/issues/1119 the idea is to use Web3.providers.HttpProvider.prototype.sendAsync = Web3.providers.HttpProvider.prototype.send before creating new instance. Besides, as spoted by @cleanunicorn you should set the default ws port 8546 unless you have defined it differently when ...


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