Skip to main content
66 votes
Accepted

What is nonce in Ethereum? How does it prevent double spending?

What is nonce in Ethereum? If you refer to the Glossary at Github Wiki, there are two types of nonce used in Ethereum. Account nonce - It's simply the transaction count of an account Account nonce: ...
Achala Dissanayake's user avatar
33 votes
Accepted

What is the merit of creating new smart contract languages like Solidity instead of using other languages?

Every programming language is designed for a particular operational environment and target tasks; and these constraints drive almost all design decisions on what features to support and which ones to ...
Péter Szilágyi's user avatar
19 votes
Accepted

What diagrams exist to illustrate the Ethereum blockchain creation process?

I couldn't find what I was after so I did my own:
Lee's user avatar
  • 8,558
10 votes

What is nonce in Ethereum? How does it prevent double spending?

Firstly, it's 'nonce', not 'nounce'. i) Yes, each address has a nonce. Addresses can have the same nonce, and often do. ii) Yes, all nodes on the same blockchain have recorded the same nonce for ...
Jesbus's user avatar
  • 10.5k
6 votes

What would happen if EVM didn't exist in Ethereum?

Ethereum provides two main services : Money transfer and Smart contracts processing. The first doesn't need a VM but the second does while a smart contract is a piece of code which needs a VM or a ...
Badr Bellaj's user avatar
  • 18.8k
6 votes
Accepted

Why did Ethereum design Ethash instead of using an existing memory-hard hash function?

Though it's only a partial answer, this might shed some light: http://github.com/ethereum/wiki/wiki/Ethash-Design-Rationale . I seem to recall reading a blog post by vbuterin, but I can't locate it at ...
lungj's user avatar
  • 6,680
6 votes
Accepted

What is the tech stack behind the Prysm client?

Raul Jordan here from the Prysm project. The Prysm client is an open source implementation of the Ethereum 2.0 blockchain written in Go, just as the familiar go-ethereum project was for Ethereum 1.0 ...
Raul Jordan's user avatar
5 votes
Accepted

What is the tech stack behind the Teku client?

The recording is poor and it's a bit out of date now, but the this talk gives an intro to the Teku architecture: https://www.youtube.com/watch?v=1PHZHpVPLk4 Generally the major components of ETH2 ...
ajsutton's user avatar
  • 221
4 votes
Accepted

SafeMath safe add function assertions against overflows

Firstly, kudos to the OpenZeppelin safeMath library parts of which I've used in my code. Given that addition is commutative, it doesn't really matter which you use. The answer will either be equal or ...
o0ragman0o's user avatar
  • 4,330
4 votes

Are there multiple instances of Ethereum state or a single latest image?

The ethereum state is stored on disk in a merkle tree separate from the actual data of the blockchain (ie. the blocks of transactions). The state is not included in blocks - only the state root is ...
Ethan's user avatar
  • 724
4 votes

What would happen if EVM didn't exist in Ethereum?

Ether/Tokens will be transferable and even smartcontracts can be achieved without a VM( as seen in blockchains like Stellar). But such are limited to a few basic logical features. The main reason why ...
M4X_'s user avatar
  • 157
4 votes
Accepted

codeHash variable value

I believe that the hash of the empty string is the code hash only until the constructor returns the body code. I always find the yellow paper hard to read, but if you continue reading the Contract ...
user19510's user avatar
  • 28.1k
4 votes
Accepted

Doesn't having a centralised front end pose a huge security risk to an Ethereum app?

This does indeed present a glaring security risk. In theory the user previews their transaction in MetaMask etc before sending, so they don't have to trust the dapp, but in practice the data you ...
Edmund Edgar's user avatar
  • 16.9k
4 votes
Accepted

Wouldn't a 64bit-based EVM be more efficient on the Ethereum Ecosystem?

You will have several problems If you keep your storage at 256 bits it will be more complex to access. You need 4 x 64 bits words to address a storage slot. All operations will have to convert 256 ...
Ismael's user avatar
  • 30.5k
4 votes

EVM - How is it connected to the Blockchain?

A blockchain is an example of a more general concept, called a distributed state machine. A state machine is a system that has a set of states, and a function that transistions between those states. ...
Tjaden Hess's user avatar
  • 37.1k
3 votes

What would happen if EVM didn't exist in Ethereum?

The blockchain ecosystem would have remained centralized within Bitcoin. The EVM is the essence of the evolution to programmable blockchains.
Igor Lilic's user avatar
3 votes
Accepted

What is the timestamp of a confirmed transaction based on?

As @Thomas has answered, timestamp of a transaction is the same as the block it is contained in. Let me try to explain it as for my understanding. is the TimeStamp based on when the transaction is ...
Achala Dissanayake's user avatar
3 votes

What is the timestamp of a confirmed transaction based on?

The timestamp of every transaction in a block is the same as the block itself. All transactions in a block have the same timestamp. The timestamp is written by the miner that finds the block hash for ...
Thomas Jay Rush's user avatar
3 votes

SafeMath safe add function assertions against overflows

A bunch of examples to get away from the brain ache. I'm basically re-writing o0ragman0o's answer. If my answer makes sense, maybe accept his answer instead :) First example, with no overflow ...
Richard Horrocks's user avatar
3 votes

What is the merit of creating new smart contract languages like Solidity instead of using other languages?

In particular, in the smart contract world, the code is designed to inter-operate with EVM and hence there are a few key requirements for a language to be used in smart contract. Compiler needs to be ...
Zainan Victor Zhou's user avatar
3 votes
Accepted

How to securely Interact with a contract on user's behalf from centralized server?

Pre-Approve The user could sign transactions offline for example using ethereumjs-tx. The service then broadcasts the signed transactions. These could either modify the contract directly or they could ...
JackWinters's user avatar
  • 3,423
3 votes

What are the pros and cons of Ethereum balances vs. UTXOs?

With bitcoins UTXO model a single wallet can spend multiple outputs asynchronously whereas with ETHs nonce model you must wait for a previous transaction to get mined before your next transaction may ...
Albert Renshaw's user avatar
3 votes

Wouldn't a 64bit-based EVM be more efficient on the Ethereum Ecosystem?

Of course, it’s difficult to say for sure, but my intuition is that the bottleneck is not the size of the words. The bottleneck is the purposeful imposition of the 14 second block time. The block time ...
Thomas Jay Rush's user avatar
3 votes
Accepted

How State variable are stored and updated?

The Ethereum blockchain is a state machine. When you define a state variable in a submitted transaction that data is stored and synchronised across the nodes of the network. For example “x is ‘hello’” ...
Thomas Clowes's user avatar
3 votes
Accepted

What is an SSZ partial?

The idea of a SSZ partial is that any SSZ type (see SSZ spec what SSZ is) is just used to provide a typed "view": you have type information for everything that could be there, but you may only need ...
protolambda's user avatar
3 votes
Accepted

What is the tech stack behind the Lighthouse client?

What are Lighthouse's major components? From a very high level we have three components, each launched from the single lighthouse program: Beacon node: connects to the p2p network, verifies blocks ...
paulhauner's user avatar
  • 1,248
2 votes

What is the Ethereum network architecture? What are the major components of this?

As of now (Homestead release) there is only one node implementation, however the may be customisations across instances. Most notably: mining is not enabled by default on an Ethereum node, but can be ...
zanzu's user avatar
  • 5,360
2 votes

SafeMath safe add function assertions against overflows

Without attempting to prove that either way works completely reliably (would require more time and caffeine to be sure), I can say I tested the alternative, assert(c >= b && c >= a); ...
Rob Hitchens's user avatar
  • 55.4k
2 votes

Is there a layered architecture diagram for Ethereum?

Not so detailed as per the Java documentation, but this figure is floating around the internet which is quite apt to begin with, in order to fill in further details. Ref: https://www.easyeth.com/...
Mayukh Mukhopadhyay's user avatar
2 votes
Accepted

Why does the blockchain store multiple copies of the same code?

For now it's probably for simplicity of implementation - due to the fact that keeping one copy properly would require reference counting. Since contracts can be destroyed using the SUICIDE opcode, if ...
Matthew's user avatar
  • 205

Only top scored, non community-wiki answers of a minimum length are eligible