All Questions

Filter by
Sorted by
Tagged with
7
votes
1answer
1k views

When does the fallback function get called?

Is it true to say that if the first four bytes of an Ethereum's transaction does not contain one of the contract's encoded function calls, then the fallback function will be called? In other words if ...
21
votes
3answers
15k views

How to loop through mapping in solidity?

I have a mapping in my contract like below: mapping (address => uint) public voterCount; To calculate the total votes, I would like to loop through the mapping and sum the uint values. How do I do ...
18
votes
1answer
14k views

How to convert string to bytes32 in web3js?

I have a contract with a public variable that's bytes32. If I enter the value 20160528 then it auto converts to bytes32. Is there anyway to convert it back from the nodejs terminal? I've been ...
17
votes
2answers
2k views

How can I check if a contract has self-destructed in Solidity?

I have got a problem: I have a contract factory that creates some temporary contracts. I want every contract to exist for about 5 days, afterwards, it self-destructs. However, I want to create a ...
15
votes
1answer
4k views

Difference between transactions and raw transactions in web3.js

Reading the documentation of web3.js I have come across sending transactions and raw transactions.In the documentation it's specified that send raw transaction sends an already signed transaction. ...
15
votes
4answers
1k views

How to increase my privacy on Ether accounts?

What would be the best way, if any, that one could change their address/account in order to make themselves unknown or hard to identify by people they traded with? More specifically, if I send ETH to ...
14
votes
4answers
8k views

What Hierarchical Deterministic (HD) wallets are available for Ethereum?

A Hierarchical Deterministic (HD) wallet has some nice features such as easier backup (instead of needing to backup multiple keystore files and the passwords for each of them). Are there any ...
12
votes
4answers
6k views

How to transfer the whole balance of an account?

If I have an account with 5 ETH, can I send the full account balance of 5ETH to another account and have exactly 5ETH received on the second account ? I understood that it will fail because I have no ...
11
votes
0answers
478 views

Guidelines for designing contracts to handle bugfixes? [duplicate]

Most introductory guides for contract design talk about creating "mortal" contracts (contracts that include some function that triggers a suicide() call), but what about if that contract was for some ...
11
votes
4answers
1k views

“potential rewrite attack” message on Geth

When I was sending Ether using Mist I got the following message on Geth. I0528 18:34:57.312997 core/blockchain.go:959] imported 1 block(s) (0 queued 0 ignored) including 3 txs in 19.344963ms. #...
9
votes
4answers
17k views

Is there API to create Ether wallet?

I know how to create wallet manually, however I would not like to take my clients out of website (I doubt anyone would) and would rather do their wallet creation behind the scenes when they register ...
9
votes
1answer
642 views

What data will zk-SNARKs protect?

Implementing zk-SNARKs is planned in Ethereum roadmap, what data will be obfuscated? transaction sender and receiver? data in transactions? data stored in contracts? variables and methods in ...
8
votes
2answers
2k views

Who has access to ethereum 0x0000000000000000000000000000000000000000 address?

Who own ethereum 0x0000000000000000000000000000000000000000 address? I have received some 0Chain token from this address. I know this is a genesis address but who can access it?
8
votes
1answer
488 views

What is the cryptic part at the end of a solidity contract bytecode?

Given the following contract: pragma solidity ^0.4.11; contract Simple { bytes32 public v; function set(bytes32 _v) { v = _v; } } When disassembling, neither remix, solc or evm ...
8
votes
1answer
941 views

Give a summary of the fork state changes in block 1920000

The hard fork during block 1920000 contained the execution of an irregular state change. For reference purposes it would be great to have a technical overview of these changes and how they were ...
6
votes
3answers
2k views

How can I modify bytes32 result to uint?

I want to separate three last digits of the most recent block header hash and get the result as uint. I can get the answer as bytes32 by this code, but how can I change this result to uint? contract ...
6
votes
1answer
2k views

How does a fallback function rejecting ether work?

A contract in Solidity can have a fallback function like: // This contract rejects any Ether sent to it. It is good // practise to include such a function for every contract // in order not to loose ...
4
votes
3answers
1k views

How to recover EtherLi Multi-Sig Wallet without SMS?

For any reason is phone number in my EtherLi Multi-sig wallet settings wrong. I don't receive the 2nd verification code by SMS due to the wrong digit in my phone number. Please let me know how to ...
4
votes
1answer
566 views

How to setup constantinople fork for private ethereum chain

I am trying to add the constantinople fork to my private net with is running on geth. I have updated to latest geth, geth 1.8.23. I have stopped my current geth node running and have chnged the ...
3
votes
1answer
1k views

How to fork Ethereum from the current state?

I've read a lot of tutorials and guides that teach how to set up your own private network from scratch. However, how would I do that from the current state of the blockchain? Instead of generating a ...
2
votes
3answers
2k views

How to import account form geth console to metamask (private blockchain)

I want to import accounts from geth console(private network) but I can't. I have UTC file when I create account with geth but when I open file and copy mac and paste to metamask (private key) account ...
17
votes
1answer
4k views

How Can I Add My Name Next To Address On Etherscan?

I'm wanting to set up a charity and want to use a public wallet for accepting donations with on Etherscan where I can have a displayed name next to the wallet like this: How Can I Add My Name Next To ...
14
votes
1answer
3k views

What happens if transaction runs out of gas before transaction completes?

As gas cost can only be estimated until the transaction is executed against the actual contract state at the time of execution on the blockchain, what happens if transaction runs out of gas before the ...
11
votes
5answers
127k views

Cannot allocate big buffer - Not enough graphics memory?

I am using Claymore's Dual Ethereum v9.5 Here is my config file: setx GPU_FORCE_64BIT_PTR 0 setx GPU_MAX_HEAP_SIZE 100 setx GPU_USE_SYNC_OBJECTS 1 setx GPU_MAX_ALLOC_PERCENT 100 setx ...
9
votes
1answer
2k views

Custom balance accounts testrpc?

I am setting up unit tests with for my contracts using truffle. I am using also testrpc, but having accounts with 2.123...... *10^37 Wei is not very helpful to visualise and debug things. I am trying ...
9
votes
1answer
3k views

How to send ether to a cold storage account?

Is it possible to do the following: Back up the keystore on a usb drive. Format the computer used to generate the keystore. Send ether to a public address in the keystore. Reinstall geth (or other ...
7
votes
1answer
2k views

Default Value for gas in sendTransaction

What is the default value for gas in sendTransaction api? Suppose I don't specify gas parameter in the sendTransaction api, what will be used? Also, will this vary if it is a contract transaction ...
7
votes
1answer
3k views

Will a GPU help with Proof-of-Stake?

Will a GPU be required to do proof of stake as a full node? Will it help me be more profitable? Will a highly available network connection be worth more than having a beefy GPU? What if I don't stay ...
5
votes
2answers
2k views

Solidity Exceeds block gas limit during Mocha Tests with Ganache-cli

How can I increase the gas limit in this case? The error message is "n: Exceeds block gas limit" or "base fee exceeds gas limit". I think there is some kind of api I need to set the block gas limit ...
4
votes
1answer
2k views

Not syncing due to “unhandled trie error: missing trie node”

Having an issue. Was caused by Avast blocking a file after I sent some Ether to Dao. Have removed Avast now that I understand it was messing stuff up. Restarted computer... now when i try to sync it ...
3
votes
1answer
2k views

Does my mining situation sound normal?

I've tried overnight mining and have had no luck. I first created an account using geth account new. Then I use geth --rpc to stay in sync with the blockchain and ethereum -G to start the minining ...
3
votes
1answer
5k views

How long to wait for pending transactions?

Is there any timeout for pending transactions? How long to wait before re-sending the transaction. I am sending multiple transactions and need to track the status of all those transactions. But I am ...
3
votes
1answer
548 views

I need help with signatures

So, for my studies, I am supposed to interact with a contract function that has the following built in condition: if (ecrecover(_h, _v, _r, _s) == msg.sender && _h == sha3(this)) I am ...
3
votes
2answers
528 views

Would a minimal gas price tx ever be mined?

I want to mine and charge a minimal gas price (like the minimum required to prevent infinite loops and such), to enable many smaller transactions to be confirmed super cheaply and to lower the cost of ...
2
votes
1answer
3k views

Which miner gets the gas fee for each transaction? [duplicate]

I'm guessing that miners are randomly selected, but I'm curious as to which miner receives the fee for gas paid for each transaction? In hindsight, the answer to this question is obvious: of course ...
1
vote
2answers
2k views

Should signed text messages use the “\x19Ethereum Signed Message” prefix?

Background: I want to implement sign message feature in Trezor. Is there a standard for signing text messages? So far I found out that etherscan.io signs messages without the prefix, i.e. it signs ...
25
votes
6answers
4k views

What are common pitfalls or limitations when coding in Solidity?

What would be on your list to warn other developers about? What works in most other languages that does not work, or behave as expected, in Solidity? For example only: what parameters can be passed ...
25
votes
2answers
19k views

Can we get all elements stored in a mapping in the contract

Can we get all elements stored in a mapping in the contract using web3.js ?
32
votes
2answers
21k views

Solidity, create contract from contract

Based on documentation it should be possible to create new contract from contract contractAddress = new OwnedToken(name); When I invoke this method from contract, the address I receive seems to be ...
25
votes
2answers
19k views

What exactly is the Nothing-At-Stake problem?

What exactly is the Nothing-At-Stake problem in Proof-of-Stake consensus networks? While I understand what the nothing at stake problem means, I do not really understand the security implications. ...
25
votes
1answer
8k views

How to unit test smart contracts

How are Ethereum contracts tested? I've seen Truffle which referrers to itself as an Ethereum development framework. Are there any other frameworks and what is their level of maturity? Is there a de ...
15
votes
6answers
19k views

Better pattern to detect web3 default account when using metamask

Context: I want to use blockies to render an identicon on the page, i get the defaultAccount from web3, for this, the user has to be logged on to metamask with a selected address from his wallet. The ...
65
votes
2answers
49k views

What is the relationship between Mist and Ethereum Wallet?

In https://github.com/ethereum/mist/releases 0.3.6 the files are named Mist. Starting in 0.3.7 the files are named Ethereum-Wallet. Will files named Mist take over in the future, or will there be 2 ...
32
votes
2answers
4k views

Do contracts also have a nonce?

Do contracts also have a nonce and if so how is it calculated? Usual accounts have a nonce that is increased with every transaction. However, contracts can't make transactions, they can only make ...
13
votes
6answers
17k views

Is there a list of DAPPS that are already useable? [closed]

Is there a list of DAPPs that are already useable? Useable means there is an easy accessible GUI, that can interact with the contract.
25
votes
6answers
38k views

Is there a way to generate ethereum paper wallets?

Is it possible to store ether on paper wallets or generate printable private keys offline somehow?
20
votes
2answers
4k views

List of pre-compiled contracts

Where can I find an authoritative/"official" listing of the pre-compiled contracts currently on the Ethereum network, along with their exact specifications? I couldn't find anything in the official ...
14
votes
1answer
4k views

How can I create a listener for new transaction with Ethereum RPC calls?

I am trying to create mini-service which would allow me to subscribe for incoming Ethereum transactions (coinbase example). I thought that in Ethereum it could be done with eth_newFilter and ...
9
votes
1answer
3k views

How to steal eth using delegatecall and selfdestruct

This documentation says Even if a contract’s code does not contain a call to selfdestruct, it can still perform that operation using delegatecall or callcode. This worries me. I've created ...
26
votes
2answers
13k views

How many transactions can the network handle?

The voting on ethereum analysis by Dominik Schiener calculated that it would take 40 days to hold the UK general elections on the ethereum blockchain due to the transaction and gas limits. I redid ...

15 30 50 per page
1 7 8 9 10 11 70