Most Popular
1500 questions
65
votes
2 answers
How can I figure out if a certain key exists in a mapping, Struct defined inside Library (in Solidity)?
pragma solidity ^0.4.8;
library Library {
struct data {
unit val;
}
}
contract Array{
using Library for Library.data;
mapping(address => Library.data) clusterContract;
function addCluster(address id) returns(bool){
…
alper
- 8,395
- 11
- 63
- 152
64
votes
7 answers
How to import a plain private key into geth or Mist?
This is such a basic question, but I can not figure out how to import a plain, unencrypted private key into geth or mist?
I tried geth account import 7[......]bla but it seems this command is always looking for an unencrypted keyfile.
Any ideas?
q9f
- 32,913
- 47
- 156
- 395
64
votes
7 answers
How can I verify that a contract on the blockchain matches the source code?
Given the (Solidity) source code of a smart contract, is there a way to deterministically compile the code and compare it with the code on the blockchain? I want to verify that the contract does what the source code claims to do and the author…
J-B
- 8,941
- 16
- 46
- 77
64
votes
7 answers
What is the recommended way to safely store Ether?
There are several options for storing Ether :
Accounts
Mist/Geth accounts.
Paper wallets.
Icebox Air gapped offline signing of transactions
Wallet
Mist Multi-signature.
In short there are a lot of options.
So my question is is there an…
JackWinters
- 3,413
- 2
- 17
- 29
63
votes
1 answer
Which TCP and UDP ports are required to run an Ethereum client?
The geth CLI options suggest that per default the client listens on TCP port 30303. This page, additionally suggests that UDP port 30301 is used for node discovery.
Is this all that is required or are there any additional ports in use?
zanzu
- 5,360
- 4
- 25
- 43
63
votes
3 answers
What's the difference between 'address' and 'address payable'?
I saw a Solidity smart contract where some variables were declared with the type address and some were declared with the type address payable. What are the differences between the two?
Do they store the same data?
How do you convert a value from…
Jesbus
- 10,478
- 6
- 35
- 62
62
votes
5 answers
How can I get a geth node to download the blockchain quickly?
I'm running a geth node on slow hardware. At the current rate of progress it could be several days before I can download all the blockchain. Is there a way to get it to synchronise more quickly?
paulmorriss
- 2,559
- 3
- 17
- 24
62
votes
5 answers
What is the difference between an internal/external and public/private function in solidity?
Currently reading solidity documentation: https://solidity.readthedocs.io/en/develop/types.html#function-types
By default, function types are internal, so the internal keyword can
be omitted. In contrast, contract functions themselves are public…
monty_lennie
- 763
- 1
- 5
- 9
62
votes
4 answers
Use string type or bytes32?
What are the benefits to using string datatypes over bytes32 to represent text data. It seems my contract runs into an out of gas exception when I switch the data structures from bytes32 to string.
ethereal
- 1,805
- 2
- 14
- 25
60
votes
5 answers
What is an 'EOA' account?
Cointelegraph has recently written about 'EOA' in relation with contracts and accounts.
As an EOA, the state simply stores the account's balance in ether and a sequence number is used to prevent transaction replay attacks. On the other hand, it…
q9f
- 32,913
- 47
- 156
- 395
60
votes
1 answer
What is Geth's "light" sync, and why is it so fast?
This question is in a similar vein to the past questions about geth --fast and parity --warp.
There was a recent question where the OP wanted to do as little syncing as possible, and one of the answers suggested the following:
Try geth --light,…
Richard Horrocks
- 37,835
- 13
- 87
- 144
59
votes
5 answers
Normal transactions VS. Internal transactions in etherscan
On etherscan:
-->> accounts >> contract accounts >> selecting one contract,
There are two types of transactions mentioned under No Of Transactions:
Normal transactions and Internal transactions.
What is the difference between them and why are the…
Kobayashi
- 1,255
- 1
- 9
- 14
59
votes
4 answers
For pool mining, what exactly is a share?
Can someone please explain exactly what a share is in the context of pool mining? I have a superficial understanding of testing random nonces to find a hash under the current difficulty. I also understand that mining pools set a custom easier…
spaceminer
- 591
- 1
- 4
- 3
59
votes
5 answers
How to select a network id or is there a list of network ids?
We're starting a new open network based on the Ethereum protocol. The question is how to allocate a network id for the new network. In Ethereum we have main net, four test networks, classic with test network etc.
Is there a list of network ids? If…
Igor Barinov
- 2,138
- 1
- 16
- 25
59
votes
13 answers
How do I set up a private ethereum network?
I'd like to set up a local (private) blockchain that isn't connected to the wider internet so that I can deploy some test contracts. How do I go about doing that?
Ethan Wilding
- 4,821
- 7
- 24
- 31