Most Popular

1500 questions
11
votes
4 answers

ethminer Failed to submit hashrate

I keep getting an error: ethminer Failed to submit hashrate :( I am very new to this whole mining thing, and just want to learn more. I am using: Geth Version: 1.5.0-unstable ethminer version 1.2.7 Build: Linux/g++/Interpreter/RelWithDebInfo This…
doart3
  • 133
  • 1
  • 1
  • 9
11
votes
1 answer

What is `--gcmode=archive` in geth

I have been running a geth node, mostly to see event logs fired by my contracts. I ran the node with syncmode=fast and finally the node is synced. I can successfully read the logs. Now, I read here the option --gcmode=archive described as: Trie…
DaveIdito
  • 894
  • 5
  • 19
11
votes
1 answer

Make function payable for a specific ERC20 token?

When a method is payable, it's possible to send ether to the contract while calling it, and the function can check the amount sent through msg.value. How can I make a function receive something other than ether, such as an ERC20 token?
11
votes
3 answers

How to check if an array key exists?

I've got the following simple contract: pragma solidity ^0.4.24; contract MyContract { struct Person { uint age; uint size; } // Index of a person is its ID. Person[] persons; event PersonAdded(uint indexed id, uint age, uint…
haggis
  • 245
  • 1
  • 2
  • 10
11
votes
1 answer

How to avoid/detect multiple internal transaction out-of-gas side effects?

Following an issue I opened in github, this bothers me. The operation described in the issue, which happened during following avsa's tutorial on creating a DAO, generated two internals transactions as evident here: Shortly, the internals…
kobigurk
  • 413
  • 2
  • 10
11
votes
2 answers

Do I need to encrypt the keystore file(s)?

When I run cat on one of the files in the keystore directory I see things like id, mac, etc. but I do not see private key. Is it safe to send the keystore file unencrypted over the internet? If the private key is in the file, which one is it and can…
sfish
  • 555
  • 6
  • 10
11
votes
2 answers

The difference between contract address and wallet address

Disclaimer: this is a rather long question. To my understanding, contract address and wallet address are two profoundly different concepts, with the only thing in common being the fact that they are both given as the hexadecimal representation of a…
goodvibration
  • 26,003
  • 5
  • 46
  • 86
11
votes
5 answers

How to check currently installed web3 version?

How to check installed web3 version with command line terminal?
Alien
  • 415
  • 1
  • 4
  • 19
11
votes
3 answers

What’s the point of checking msg.sender≠0 ? Are there cases where msg.sender can be null?

In the Tron contract (a large ICO listed on many exchanges) lies this modifier which is used for all token transfers : modifier validAddress { assert(0x0 != msg.sender); _; } I understand how a contract can write directly into the ledger…
user2284570
  • 1,008
  • 1
  • 12
  • 30
11
votes
2 answers

Why is there block gas limit?

Why is there block gas limit? Should it just be the sum of gas limit used by each transactions inside the block? Why do we need an extra field for it instead of calculate it?
fluter
  • 297
  • 3
  • 7
11
votes
2 answers

web3 websocket connection prevents node process from exiting

I have a node js process that creates a web3 websocket connection, like so: web3 = new Web3('ws://localhost:7545') When the process completes, it does not exit, but rather hangs forever with no console output. Taking at look at what handles the…
Andy Pang
  • 211
  • 2
  • 3
11
votes
3 answers

Can ZKSnarks be implemented on the Ethereum ecosystem?

Since Zcash seems to have it's ZKSnarks implementation finished (or almost at least). And versions of JPMorgan's Quorum had appeared with ZKsnarks implementations included see:…
CPereez19
  • 2,835
  • 13
  • 41
11
votes
2 answers

Does view functions cost gas? And how to send transaction in a proper way?

I have a method defined as: getNames() view public , if i call on it contractInstance.getNames.estimatedGas() it returns me a non-zero value, why? I mean, view methods should not consume any gas! On the other way, since this is a call it does not…
rollotommasi
  • 211
  • 2
  • 6
11
votes
2 answers

How big could a contract be?

I am trying to figure out how big could a contract be? Is it possible to have 10k functions? One million? More? Is there any restriction on the function's body size? Does a bigger contract need more gas to be deployed? Is a bigger contract slower…
StanislavL
  • 287
  • 3
  • 14
11
votes
2 answers

Difference between truffle-contract and web3.eth.Contract

maybe this is a very simple question but I've tried unsuccesfully to understand the difference between truffle-contract and web3.eth.Contract from web3.js 1.0. As far as I've understood they seems to me two different module used for working with…
Luigi Cerone
  • 293
  • 3
  • 10