All Questions

Filter by
Sorted by
Tagged with
18
votes
2answers
4k views

Is there a maximum number of entries for a mapping?

In many contracts, notably voting, there is a mapping of the kind mapping(address => bool) voted; How many voters can be registered in that way? is there a size limit? will the contract need more ...
16
votes
4answers
18k views

Possible to store the blockchain in a different directory?

I'm running geth on Linux within a Chromebook. The blockchain is being stored within ~/.ethereum, along with other important files. Problem is, the storage capacity on my Chromebook is quite limited ...
27
votes
1answer
14k views

How does the delegatecall method work to call to another contract's method?

I'm trying to figure out how to use the delegatecall method on a contract address in a contract to call a function in a separate contract. I know Libraries are the higher level interface to use but I ...
20
votes
2answers
3k views

Explanation of Parity Library Suicide

So today, A vulnerability found within the Parity walletLibrary which resulted in freezings of potentially hundreds of millions of dollars from wallets using parity multi-sig. Can someone technically ...
20
votes
2answers
8k views

What are the types of nodes in Ethereum?

I have seen the usage of the word full node many times. What exactly is an Ethereum full node? What are bootstrap nodes and light nodes/clients? Are there any other types of nodes?
15
votes
1answer
4k views

Deploying contract with constructor arguments via Geth RPC

How can I deploy a compiled contract with constructor arguments using geth rpc? I have tested my call deployed the compiled contract bytecode just fine, I just don't understand how I can pass ...
30
votes
3answers
4k views

What was the reason to invent the EVM?

What was the reason to invent the Ethereum Virtual Machine (EVM)? Why not use an existing virtual machine like the Java-VM. The big advantage would be that the existing toolsets for Java development ...
19
votes
4answers
16k views

How can I perform float type division in solidity?

How can I achieve proper division of two integers in solidity? Suppose I perform : 3/2 the solution provided is 1 and not 1.5 please help.
18
votes
4answers
9k views

How does one contract send ether to another contract with more than 2300 gas?

I want one contract to collect a certain amount of finney before sending it to another contract, but I can't simply send in with C2.send(thisMuch). function() { Dividend m = Dividend(dividendAddr)...
14
votes
3answers
3k views

What are State Channels and use case/code examples?

A previous Reddit post gave some indication: It's basically Lightning-network style payment channels but for arbitrary state updates. Participants in the Dapp send messages with transactions to ...
14
votes
2answers
3k views

isContract function using EVM assembly to get the address' code size

My problem is that I need to make sure my contract processes only the transactions coming from EOA (externally owned accounts). For this I need to determine the type of account I'm dealing with. In ...
9
votes
2answers
3k views

how to use ethereumjs-tx.js in a browser

I have been trying to use ethereumjs-tx in a browser. I have downloaded the browser builds from here https://github.com/ethereumjs/browser-builds/tree/master/dist This is my code snippet <head>...
8
votes
1answer
783 views

Getting complete state of a smart contract

From the yellow paper, I figured out that a contract has 4 components 1. nonce, 2. balance, 3. code, 4. storage. To know about the current state of a smart contract we need to know the all these ...
6
votes
1answer
2k views

How is an ABI stored in bytecode?

I'm trying to understand how a simple hex string like 0x25d8dcf2 is enough information to execute a function in a contract. I've read up on the ABI and understand that the hex string is basically just ...
24
votes
2answers
16k views

When will the difficulty bomb make mining impossible?

I know the answer must be out there in the code already, but I couldn't figure out where exactly. Could someone do the maths for me: With block 200k the difficulty bomb started increasing the ...
18
votes
4answers
16k views

How do I send an arbitary message to an Ethereum address?

How can I send a message to another Ethereum address? And how would that user receiving know that its a message? Is there an Ethereum wallet that will show that I sent a message to that address? And ...
16
votes
6answers
12k views

Encoding/Decoding contract ABI data

How to encode and decode ABI data? Can someone show me an example with web3js library?
15
votes
5answers
4k views

How do I know when I've run out of gas programmatically?

This keeps coming up on the gitter forums so I thought I'd ask and answer this question: How do you know when you've run out of gas?
12
votes
6answers
22k views

Is there a quicker way than geth --fast to download the Ethereum blockchain?

I had the Mist client installed, but it hadn't been updated in a few weeks so I tried renaming the chaindata folder (instead of deleting it) and downloading the blockchain with geth --fast as that is ...
12
votes
2answers
5k views

What does a “bad JUMPDEST” error mean?

When I send a transaction to call my contract, it's causing a bad JUMPDEST error. The Ethereum wiki says this error is caused when a JUMP instruction jumps to a location that wasn't marked as a jump ...
11
votes
3answers
2k views

How to prevent a replay attack between two competing chains?

After the recent hardfork we have a winning chain and a much shorter losing chain left. However, if you are pro or agains the fork, you could still mine and use one chain or the other. Now, there is ...
8
votes
1answer
1k views

solc bin vs. bin-runtime

Solc says that bin-runtime is the runtime part of the contracts. What exactly is the runtime part and how does it differ from bin output?
8
votes
2answers
14k views

How to get current time by solidity?

I'd like to describe time like Apr15th 10:00AM . I know how to describe time range as follows, but I am not sure how to call date of time. Could you tell me about it if you know? 1 == 1 second 1 ...
7
votes
1answer
1k views

How is contract storage arranged?

Thinking about smart contract storage, how is the data arranged? I know that every variable within a contract has an unique ID, therefore, it's possible to create a node with a structure like <...
0
votes
2answers
2k views

Unable to check Airdropped Tokens

I used Mist Wallet (Rinkeby Network) to try this. Have created a contract same as given here. For the sake of quick understanding, am pasting it below. I created this contract from the same owner ...
22
votes
2answers
15k views

How do I know how much gas to use when calling a contract?

When I am calling (sending a transaction to) a contract how do I determine how much gas to use? Is there a way to calculate this upfront & what happens if I send too much / too few gas?
15
votes
1answer
1k views

How does EIP 150 change the call depth attack?

It seems that EIP-150 introduced a more expensive gas based restriction on the call stack and completely removed the previous 1024 hard stack limit. Is this true? It seems it took cues from EIP-90 &...
14
votes
4answers
2k views

Error: The contract code couldn't be stored, please check your gas amount

I am using the below code to create the contact it give the error: Error: The contract code couldn't be stored, please check your gas amount. Code: primaryAccount = web3.eth.accounts[0]; //...
12
votes
4answers
2k views

Running truffle migrate just opens my truffle.js file and does nothing

I am following this tutorial: http://truffleframework.com/tutorials/building-dapps-for-quorum-private-enterprise-blockchains. I am trying to run truffle migrate on my project but it just opens my ...
11
votes
5answers
14k views

Invalid JSON RPC response: “” In Browser-Solidity

I'd like to connect private geth node from browser-solidity, however it returned the error Invalid JSON RPC response: "". Please check the following picture for details. Could you tell me how to ...
11
votes
2answers
1k views

Does Ethereum have a replace by fee option similar to Bitcoin?

If I send an Ethereum transaction that has not yet been confirmed by the network can I rebroadcast the same transaction with a higher fee and a new destination address?
8
votes
1answer
1k views

How many The DAO recursive call vulnerability attacks have occurred to date?

The first identified The DAO recursive call vulnerability attack occurred on 17 June 2016, with the accounts identified in Which accounts are involved in mounting the recursive call vulnerability ...
4
votes
2answers
3k views

How do I print my account balances and TheDAO tokens from geth

Is there a convenient script to print out my account balances and TheDAO tokens from the go-ethereum client geth?
18
votes
1answer
662 views

Out of Gas invoking precompiled contracts on private blockchains

Why do precompiled contracts lead to Out of Gas on private blockchains? Some tidbits are provided in the Solidity docs but can it be explained more? It might be that you run into Out-of-Gas for ...
8
votes
3answers
6k views

Convert an eth key to a geth key

I need to convert my eth key to a geth key. eth put the key in %appdata%\roaming\Web3\keys, and I see it as a .json file. If I move that to the %appdata%\roaming\Ethereum\keystore directory, geth ...
7
votes
2answers
6k views

Transaction pending in queue for 100mins +

Using Parity I submitted at Transfer of ETH using 'send after block' The transaction has now been pending for 100mins+ (see attached). Now I can't send any ETH as all transactions go into 'Pending' ...
11
votes
2answers
5k views

What are the contract languages?

Besides Solidity and Serpent, what are the other (experimental) contract programming languages?
8
votes
3answers
4k views

Mist: “No data is deployed on the contract address!”

I'm testing a contract on testnet using Mist. When I deploy it, it says "No data is deployed on the contract address!". And then it doesn't appear on the contracts section. What does it mean?
8
votes
1answer
470 views

Is there any way to determine how long it took for the DAO attacker to deploy the attack?

Yeah, we heard that the DAO has been attacked. I am so curious about how long it took for the attacker to perform the whole transactions?
7
votes
1answer
2k views

What is an ICAP address?

It appears ethereum is using plain hexadecimal addresses like 0x0092e965928626f8880629cec353d3fd7ca5974f for now. I noticed, the ethereum C++ implementation outputs so called ICAP addresses, check ...
6
votes
4answers
2k views

If everyone runs the same transaction, why does only the miner get gas?

If I understand Ethereum correctly, the result of a transaction is known and verified by everyone because everyone runs the code using their own copy of the blockchain. If that is indeed the case, why ...
5
votes
1answer
3k views

How to check the VM trace using Geth?

How to check the VM trace using Geth? I've ran geth with --verbosity 6, and stuff like this gets logged: I0525 01:26:12.418607 core/vm/vm.go:157] running byte VM b82addc7 I0525 01:26:12.419818 core/...
3
votes
1answer
1k views

Creating a function that calls another contract

What is the minimum amount of information you need to know to call a contract from another contract? In this re-entrancy tutorial we see the following source code to "attack" a contract. pragma ...
2
votes
1answer
889 views

New Ethereum Account with Infura

Can I create a new ethereum account using Infura like we do using web3.personal.newAccount();
0
votes
1answer
1k views

“UPDATED : ” “VM Exception while processing transaction: revert”

I tested signature verification of the code presented HERE as follows: running testRPC : root@ubuntu:/home/s# testrpc EthereumJS TestRPC v6.0.3 (ganache-core: 2.0.2) Available Accounts =============...
108
votes
2answers
20k views

`external` vs `public` best practices

Apart from the public modifier Ethereum introduces the external one. Both may be called outside of the contract and inside (the later one by this.f() pattern). Moreover, according to the docs: ...
30
votes
3answers
20k views

ERC20 vs ERC223. List of differences

Is there a list of improvements that we will have in ERC223? Are there examples of contracts? Is there a migration path for existing ERC20 tokens?
38
votes
3answers
15k views

How does the Casper proof of stake algorithm work?

Ethereum plans to move to the Casper proof of stake algorithm in a future version of the network. What are the details of that algorithm, and how does it compare to previous Proof of Stake consensus ...
17
votes
5answers
26k views

How to send ERC20 token using Web3 API?

I created some custom token in Ropsten testnet using this guide: https://steemit.com/ethereum/@maxnachamkin/how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified I can send it to other ...
44
votes
5answers
20k views

Why are selfdestructs used in contract programming?

I'm reading bits and pieces that selfdestructs within contracts are a good thing. Can someone explain what the benefits are of doing a contract selfdestruct when it comes to Ethereum programming? Is ...

15 30 50 per page