All Questions

Filter by
Sorted by
Tagged with
19
votes
2answers
3k views

Methodological security review of a smart contract

Is there a tool, checklist of methodology to help reviewing smart contract security? E.g. for each of function you review Is there re-entry possibility and how it behaves on re-entry How it behaves ...
33
votes
5answers
17k views

How can I debug a smart contract?

When developing my smart contract, how can I debug it? Are there any debugging, testing tools or simulators that I can use to examine my code?
31
votes
6answers
41k views

How long is the first sync supposed to last?

I've been running Geth (latest version) for around 12 hours and it's still not finished. The command prompt shows this : INFO [05-21|12:05:00] Imported new chain segment blocks=1 txs=...
26
votes
1answer
8k views

Cannot perform write functions in smart contract - invalid address?

I have the following simple smart contract... contract SimpleStorage { uint storedData; function set(uint x) { storedData = x; } function get() constant returns (uint retVal) ...
23
votes
1answer
9k views

How can I verify a cryptographic signature that was produced by an Ethereum address key pair

If I have a cryptographic signature from an Ethereum address key pair, how can I verify that signature?
17
votes
1answer
9k views

At which point the smart contracts get executed?

Let's say I sent a transaction to invoke a smart contract (to its address). At which point will the smart contract get executed? Is it during the transaction validation process? Also, is there any ...
26
votes
13answers
23k views

How to upgrade solidity compiler in truffle

I couldn't find a way to upgrade a version of truffle solidity compiler. Also curious how to see that information for deployed contracts in truffle console
22
votes
1answer
7k views

What is Parity's “warp” sync, and why is it faster than Geth “fast”?

A follow-up of one of the classic questions on this site: One of the answers to this question suggested using Geth's --fast flag to help quickly synchronise the block data. Now, parity comes with ...
20
votes
3answers
4k views

Why does ethereum creates a new block,without even a single transaction? [duplicate]

I'm running a private Ethereum blockchain. When I set one of the nodes to mine, that node continuously creates blocks, even if there are no transactions inside of it. What is the purpose of this?
20
votes
3answers
4k views

Pass a function as a parameter in Solidity

Can you pass a function as a parameter in Solidity? My guess: There is the concept of address in Solidity, but they represent contracts. Contracts can have fallback functions, but I don't think you ...
18
votes
3answers
3k views

How does a contract find out if another address is a contract?

Is it possible, from within a contract written in Solidity, to check if a contract is placed on a specific address or if this address does not contain any code?
13
votes
1answer
9k views

geth init, what are the arguments?

this command works but yields a warning of future removal so I'd like to use new option init : ➜ ~ go-ethereum/build/bin/geth --datadir="~/testgeth/" --genesis ~/testgeth/customgenesis.json --port ...
16
votes
2answers
92k views

How fast should be an internet connection to mine ETH?

How fast should be an internet connection to mine ethereum and don't have connection issues? What about ping? And, how many GB of data would get downloaded over a month period? I have a 250GB limit.
21
votes
1answer
2k views

Are events permanently stored and reliably available to contracts in the future?

I've seen this forum post about using Ethereum as an event store: Events in Solidity, using blockchain as eventstore. However, it doesn't seem conclusive. For instance it says: I confirmed with ...
20
votes
3answers
5k views

How to add new Sealer in Geth 1.6 Proof of Authority?

Hi there Ethereum experts, I'm trying out Proof-of-Authority in Geth 1.6 for my private network and got it to work on a few nodes using Puppeth. Now, I have two questions about maintain the private ...
16
votes
2answers
1k views

Can a contract's internal storage keep increasing forever?

In other words, is there a limit on the amount of storage a contract can hold? Suppose a field is an Array for instance, and the contract has a method for adding items. Can I keep calling the ...
16
votes
2answers
4k views

What are the key criteria for meeting the ERC20 token standard?

I'm looking for a clear way to describe "the ERC20 token standard" to regular folks like me who are not developers, and can't seem to find a plain language articulation of the core components of that ...
6
votes
1answer
4k views

how to produce enode from node key?

What is the algorithm to produce a bootnode's enode url ? For example, I have this data: Node key: 59233b25bfa4c214a8713e07a395a5d11478de10f36c6c80ba5369541f73bc44 IP: 127.0.0.1 Port: 30303 From ...
26
votes
5answers
5k views

How to detect if an address is a contract?

I'm interested in knowing whether any particular address is a contract address or a standard address. There have been similar questions on the topic, but I'm not looking to detect whether an address ...
17
votes
1answer
4k views

What is the exact meaning of a transaction's new receipt 'status' field?

In this answer (https://ethereum.stackexchange.com/a/6010/1529) it seems to say that the status field will always be '1' unless the transaction failed, in which case it will be '0'. In the summary ...
15
votes
3answers
3k views

Accessing past values of Smart Contract variables

I would like to know if is possible to inquiry variable values using older blocks. For example I have contract Simple { string32 message public; function Simple() { message = msg....
15
votes
3answers
18k views

Call function on another contract

I've created a contract called "Name" which I've deployed to the testnet. this function just register some text for the user and display it back. My contract is: contract Name is mortal{ ...
13
votes
5answers
9k views

Decode input data on transaction

I have an ABI and the input value of the transaction and want to know what function has been called on a contract and with what arguments (one or multiple of different types), preferably using geth, ...
13
votes
2answers
767 views

What is the way to make Ethereum available to users for free?

As the web is mostly free today (I mean the old web, the one < 3), most people won't agree in beeing asked for fuel to run sites, apps, even if the gain in terms of safety and trust are so much ...
21
votes
3answers
10k views

Store data in mapping vs. array

I see there're some Solidity examples that are using mapping for storing state, and some are using arrays. For example this example is using mapping: struct Campaign { .... } uint numCampaigns; ...
16
votes
1answer
1k views

How should I handle blockchain forks in my DApp?

In the user interface of my DApp, how can I detect that a blockchain reorganization happened and what should I do to update the UI state once the fork is resolved?
14
votes
1answer
6k views

How should we set a import path in solidity?

I failed to compile a solidity file with import statement. Error: Source not found: File not found. import './contract.sol'; How should we set a import path? I used web3.js for compiling. ...
12
votes
3answers
18k views

how do you know your db is synced in geth?

In order to answer this question there is a need to get the timestamp of when the database is synced with geth. I can think of two ways of doing that : find the 1st occurrence of 1 block in the geth ...
12
votes
1answer
2k views

Is it possible to change the block target time?

We're curious to know what factors go into block times in a private network with a limited number of validators. Is this fixed or can it be parameterized in any way? How is it related to block times ...
9
votes
1answer
1k views

Can a contract view the details of a transaction, given a transaction id?

Can a contract view the details of a transaction, given a transaction id? More generally, what details of the blockchain is a given contract aware of?
21
votes
2answers
1k views

What type of operations have negative gas costs?

I understand that some operations cost negative gas because they free up space on the blockchain, such as selfdestructs. What are all the operations that can have negative gas? Does this only occur ...
18
votes
2answers
16k views

How can I return multiple strings from a contract function?

In solidity it's obvious how to get a single string returned from a function. But, I'd like to have the smart contract return multiple string values. Is there a way to do this?
16
votes
2answers
9k views

Is it possible to overflow uints?

The Ethereum token tutorial has a check for a uint256 overflow. function transfer(address _to, uint256 _value) { /* Check if sender has balance and for overflows */ if (balanceOf[msg.sender] ...
13
votes
2answers
4k views

Is it impossible to use an array of strings as the argument to solidity function?

If I try to define a function using an array of strings as an argument, solc gives me the following error: Error: Internal type is not allowed for public or external functions. function test(...
10
votes
1answer
1k views

Why do some blocks contain no transactions?

While poking through my Geth logs I noticed that block 1,000,006 doesn't actually contain any transactions. Why is that?
7
votes
1answer
2k views

Is there any profit from using pure and view functions modifiers?

I have a function that does not read or modify contract's state: contract C { function add(uint a, uint b) public returns (uint) { uint res = a + b; return res; } } Does it ...
6
votes
2answers
6k views

How to apply pyethrecover.py on v3 .json/transfor v3 .json to .v1

I'm trying to get pyethrecover.py running via Python on one of my .json files that were created by Ethereum-wallet for Mac. It seems that my .json file is v3 and the pyethrecover.py only works for v1 ...
6
votes
2answers
5k views

How to create a token smart contract that sends tokens after recieving payment in ether?

Hey everyone I am launching an ICO. I need to create a smart contract that holds a certain amount of tokens that I created. Then when ether is sent to the smart contract address for my token. It will ...
5
votes
3answers
2k views

Writing contracts without fully syncing blockchain

I've read this post and this one and I'm still wondering if there is a way to deploy a contract without fully syncing the blockchain, for example by using a light client. I would like try my hand at ...
22
votes
2answers
11k views

Is there a way to find an account's current transaction nonce?

I need to know my transaction nonce because I am doing fancy stuff with contract addresses (which are the keccak hash of my address + my transaction nonce). Is there a way to find this through the ...
18
votes
1answer
5k views

The meaning/specification of “config” in genesis.json

As I tried to search from Google, there are some genesis.json example files to customize the parameter of genesis block in Ethereum private blockchain. In the file, there is a part called "config" "...
13
votes
1answer
5k views

How are the account “pictures” used in Mist generated?

In mist, all accounts have a colourful pixelated "profile picture" used to identify them. For instance, in this screenshot from the Mist releases page, the Dogecoin Bounty DAO is given a purple ...
12
votes
4answers
7k views

How can I get the data of the latest 10 blocks via web3.js?

How can I get latest 10 block data by using web3.js like most block explorer does?
10
votes
3answers
3k views

copy a struct from Contract A into a struct in Contract B using Contract C

I want to copy a struct from Contract A into a struct in Contract B using Contract C. Is it possible in solidity ?? We can do it for single variables.
8
votes
1answer
1k views

Losing connection between nodes on private network

I have 3 nodes running on a private network. After asking this question, I've manually added node1 as peer to node2 and node3, so my network looks like this: _______ ...
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 ...
16
votes
1answer
13k 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 ...
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 ...
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. ...
13
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 ...

15 30 50 per page