Questions tagged [evm]

EVM is the Ethereum Virtual Machine, the protected, distributed "sandbox area" (virtual machine) where contract execution occurs, replicated on every node in the network. EVM is also the name of the bytecode that runs on the virtual machine -- what Solidity, Serpent and LL get compiled down to before deployment.

Filter by
Sorted by
Tagged with
5
votes
4answers
384 views

Why do you want to use different implementations of EVM?

Currently there are many implementations of EVM (Java, C++, Python, Go, etc). For example: I will be using Solidity to write DApp on the top of EVM-Java and EVM-Python, why would I want to use EVM-...
1
vote
3answers
448 views

Reading storage from another contract [duplicate]

Is it possible to read any storage spot in a contract from another contract in EVM? I don't care if it is hackish or not. My guts say that's not possible because it makes it possible to read internal ...
1
vote
0answers
137 views

Gas cost of a Message Call

I was trying to calculate the cost of a message call (CALL, DELEGATECALL, CALLCODE) following the yellow paper but I've not been able to fully understand it. It seems that Ccallgas is an isolated ...
1
vote
1answer
66 views

Execution environment variables Iw and Ie

According to the yellow paper, one of the Execution Environment variables is: Iw, the permission to make modifications to the state. I can't find further information about it, for example how it'...
3
votes
1answer
227 views

How do the ethereum components work together

hy i have been reading about the ethereum project and its components, i understand that there are 3 major components (EVM, swarm, whisper) Swarm is a peer to peer data sharing network in which ...
2
votes
3answers
131 views

Are Ethereum Contracts Vulnerable to Hash Table Poisoning Attacks?

Does anybody know something about this? I know that in general terms we will say not, but looking on the internet I found that isn't sure the answer to the question: Can the EVM’s Internal ...
1
vote
0answers
132 views

Why Remix JavaScript VM and Web3 Provider show different behavior at the time CALL is made?

I'm using Geth evm version 1.8.4-stable to run private network and I see different behavior on CALL between the Remix environment of Javascript VM and Web3 Provider. On this example, using callHi() ...
7
votes
3answers
1k views

How to receive revert() reason for past transactions?

I run a geth/parity nodes for broadcasting user's transactions to Ethereum blockchain. Some of contract functions provide reasons for revert (see examble below): contract Example { function test (...
2
votes
1answer
247 views

Assign metadata to a transaction

How can I append some (extra) data to a transaction that calls a contract method (with given parameters)? The transaction has only one 'data' field which is used to serialize the method call. If I ...
4
votes
1answer
150 views

How are storage pointers implemented in the EVM layer?

I'm trying to understand how storage pointers work. From looking at the ethereumjs-vm implementation it seems that the actual value is returned from SLOAD. Does the compiler handle the 'pointer' ...
0
votes
1answer
233 views

How does message call send gas?

contract Sample{ event Data(uint test) ; function test2() { Data(msg.gas) ; } } contract Sample2{ function try(address addr){ Sample(addr).test2() ; addr.call(...
2
votes
2answers
190 views

Why do we need to use “view” or “pure”?

I know when to use view and pure, but I dont know why we use it. Does EVM optimize anything When I use them?
2
votes
3answers
59 views

Given the current trend of Ethereum Network growth, is smart contract practical for long term usage/storage?

My question is actually three parts, (yes I know about the upcoming sharding development in progress): It's free to access Ethereum Network data (we don't normally need the rest of the blockchain but ...
0
votes
1answer
75 views

Writing to blockchain using Solidity

So I have been looking at solidity recently and got a hold of the voting app. Pretty simple to get a hold of. But here is what I am confused about (coming from the background of developing for the web/...
2
votes
1answer
106 views

What is the difference between sealing and mining a block?

I have seen numerous sites referring to sealing a block and mining a block. I understand a miner seals a block but I do not really understand what sealing actually involves. On that point, how does ...
5
votes
1answer
247 views

Are there any specifications/details on the call stack?

I am trying to understand how the call stack inside the EVM works. I can't find anything in the yellow paper not else where online. Can anyone explain how the call stack works and if you can access ...
2
votes
3answers
492 views

Updated list of EVM Opcodes

Is there an updated Opcode Specifications available for the EVM to date? Specifically, is there a continuously updated list of Opcode Specifications similar to that found in the ethereum yellow paper?...
0
votes
1answer
19 views

Does running a buggy function stops hole contract from work?

Does running a method in a contract that has a bug in it, stops other methods of contract from doing their work? I mean in other programming works , when a buggy method runs the hole program will ...
0
votes
1answer
57 views

Hint required for beginner

pragma solidity ^0.4.16; contract FunctionTest { bool public foo = true; string public name; uint256 public counter = 0; function setName() public { // } function ...
2
votes
0answers
289 views

Unexpected behavior with `block.timestamp` in truffle test

I am doing some experiments with block.timestamp(which is now's alias). I wrote some code to see if block.timestamp really represents the timestamp of the last mined block. From the documentation: ...
1
vote
1answer
443 views

What is EVM code?

I am reading about Ethereum and I am a little confused with the terms EVM code, message, and contract account. Is EVM code and smart contract the same?
3
votes
2answers
171 views

reading contract bytecode from leveldb

Is there a way to read a deployed contract's bytecode from leveldb? From what I understand, within each account in the state tree, there exists the nonce, the balance, the codehash, and the storage ...
1
vote
1answer
116 views

How is account managed in Ethereum blockchain?

What is the process for creating account? (I know I can geth account new, but what is the internal process actually being done?) Where does the entropy for randomness come from when creating an ...
5
votes
1answer
68 views

Ethereum client implementation

I think to better my understanding of the EVM and underlying file system, I want to read through one or more ethereum client implementations and potentially build a client myself. So far I've been ...
3
votes
1answer
110 views

How does the EVM resolve method ID collision?

What happens if I craft an EVM binary such that the ABI sees two matching method IDs, and try to deploy the contract? Is it a valid transaction?
2
votes
1answer
59 views

which nodes have evms and how do they compare the results?

which nodes have ethereum vm? I have read that nodes with evms run the transactions and check if they all got the same result. How do they sync and compare their results?
0
votes
1answer
47 views

Online tool to get EVM code of address

Using the console of an Ethereum client, you can get the binary code of a contract placed on the blockchain. Does an online tool to get this binary code exist?
2
votes
1answer
70 views

Bytecode execution during contract deployment

during the process of contract deployment the 'loading' code is executed (60606040523415600e57600080fd5b5b603680601c6000396000f300). This bytecode sequence loads the actual contract into the evm/...
2
votes
2answers
547 views

Smart contracts and the inherent lack of security in trusting compiled byte code

Smart contracts on the blockchain are compiled. Is there any system in place to verify all the public dapp contracts do what they propose to be doing? i.e. this could be done by compiling open-source ...
4
votes
1answer
2k views

How can we add new nodes under PoA?

I implemented a PoA system successfully. But after the initial setup (eg two nodes), how are new nodes added? I understand that the acceptance of a new node is a voting process but I am not certain ...
1
vote
1answer
114 views

How does the EVM connect to all the blockchain nodes?

Someone recently told me that Ethereum does not use IP addresses to work out the node connections. I know networkid is used in the connection but how does networkid translate into the EVM finding the ...
2
votes
1answer
404 views

EVM opcodes-prices

1) Why are opcodes in Ethereum priced the way they are priced and why is the EVM so expensive? 2) Right upfront, I do not say that it is too expensive to perform a tx on Ethereum, I just say that ...
1
vote
1answer
34 views

Smart Contract GridLock / Stuck Thread

Since Smart Contracts can call multiple contracts, is there a chance that smart contracts enter a gridlock situation?
11
votes
1answer
3k views

What is eWASM and why is it the direction for the next version of the EVM?

eWASM was first proposed in EIP 48 with performance advantages over the EVM. Are there other advantages since the EIP was written in 2015? The initial benchmarks are also gone and are there any ...
2
votes
1answer
102 views

Reading State History - how?

I know state is mutable but changes are held in the chaindata as leveldb data. How can we actually read the chaindata history? Are there some utilities for this? if I have this code - pragma ...
0
votes
0answers
60 views

Why does this contract work on Ropsten but not on a private blockchain?

The following contract runs successfully in Ropsten but not on a private blockchain. I assumed it could be a gas issue. So I increased the gaslimit and started a new blockchain but I get the same ...
1
vote
1answer
71 views

Can Ethereum handle storage of strings in volume? [duplicate]

I have someone who wants to put strings onto a private blockchain. He thinks it will be safe for his data. So the idea is to store names and addresses etc on the blockchain (private). I did some ...
0
votes
0answers
61 views

Why would the gas cost be so high on a simple contract?

The contract does not run, it cannot get enough gas. Here is the txn - > > eth.getTransactionReceipt("0x069fdab662d9bb69f0af6a526c60289cb3d2cfa4cba1345fdd53e517cef136aa") > { blockHash: &...
0
votes
1answer
55 views

Why is eth.coinbase node based and not blockchain based?

I have tested with geth using --datadir and found that if I have more than one node created using personal.newAccount then the account data is not shared. This seems confusing to me. I believed ...
1
vote
1answer
380 views

How does a bootnode work?

I saw this - "The first time a node connects to the network it uses one of the predefined bootnodes. Through these bootnodes a node can join the network and find other nodes." At https://...
4
votes
0answers
146 views

Is it possible to trace a function call hitting revert?

It is possible to trace a transaction with debug_traceTransaction. But it needs the transaction hash, requiring it to be a transaction in first place. I'm debugging a function call that generates a ...
0
votes
3answers
61 views

How secure is messaging to smart contracts?

If I sent a message via http to a smart contract, how secure is that? If I cannot use TLS, then could someone listen at he port and then intercept the message and then divert the message to an unknown ...
1
vote
1answer
115 views

Ethereum Bytecode

Why does Ethereum store bytecode on the blockchain and not the sourcecode, what's the tradeoff? As far as I know sourcecode does not need as much storage.
2
votes
1answer
78 views

Where is the source code for Ethereum stored?

I am interested to see exactly what is coded for Ethereum. I know web3 is on github. Where is all the fundamental source code stored for the EVM and all the main components?
2
votes
1answer
303 views

Why can't the return value of a transaction be included in the transaction receipt?

Shouldn't this be possible as the return value will be known when the receipt is created?
1
vote
3answers
156 views

How to detect if a contract has a particular function implemented?

I would like to detect if an address has a particular function implemented. In this case isSafe: interface ISafe { function isSafe() public pure returns (bool _true); // other functions I ...
2
votes
1answer
541 views

Where is contract persistent storage stored?

I am trying to work out where the data is actually stored. If a contract is deployed with a dynamic array defined, then at the time of deployment no allocation is made for the storage. I understand ...
0
votes
2answers
746 views

How to access an API from a solidity smart contract?

I saw how this can be done using Oraclize. Is there any native way to access an API from a solidity smart contract? I understand there is a restriction on the solidity program to be able to call an ...
7
votes
2answers
409 views

Ed25519 in smart contracts

Is there a practical way (preferrably OSS library or implementation) to verify Ed25519 signatures in Solidity (compiled for and run on the EVM), in smart contracts? Update: I've created EIP665
2
votes
1answer
43 views

Call to 0x00…02 in remix debug trace

I'm currently trying to reenact a random transaction and I've come across a weird call to 0x0000000000000000000000000000000000000002. Even weirder, this call seems to actually do something since the ...