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
2
votes
2answers
304 views

How do I use filter EVM log events by an indexed field in web3j?

I've looked through the documentation, but there doesn't seem to be this scenario listed. What I want to do is filter the Ethereum event log of a specific contract by an indexed field with Web3j. ...
2
votes
1answer
2k views

What is the maximum value an int and uint can store

I need to understand a couple of things: What is the maximum value an int and uint can store? Are the maximum values stored in int and uint the same?
0
votes
0answers
10 views

Pulling EVM Bytecode of Contract Address [duplicate]

Is there a way to pull the EVM bytecode of a given contract address? Using Web3 perhaps? I believe using the web3.eth.Contract command may get access to the contract, but I am specifically looking ...
0
votes
1answer
220 views

Opcode for out of gas inside a message call

According to the Solidity documentation: A require-style exception is generated in the following situations: ... If you call a function via a message call but it does not finish properly (i.e. ...
2
votes
1answer
38 views

Why Ethereum sets user balance to MaxBig256 whenever a contract query is performed?

There is a strange behaviour on user wallet balances when performing a contract call (that is supposed to have no cost). Balance is right (expected value) until a free call is requested to a contract. ...
0
votes
0answers
18 views

Loading modified contracts keeping the same super class

I am trying to implement upgrade of contracts. One pattern by [1] is to have a layer to resolve the actual address of a contract. I implemented that adding the Pausable manipulation. My idea was to ...
0
votes
3answers
41 views

Is it possible to find out dynamic array size looking at a smart contract?

This question already answers that in order to get the size of an array programmaticaly, a getter should be defined. However, assuming that there isn't a getter, is there a way to find out size of a ...
8
votes
1answer
422 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 ...
9
votes
1answer
211 views

Extra byte in the TheDAO v1 bytecode

I tried decompiling the TheDAO v1 bytecode with disasm and it seems to fail for me. I entered the TheDAO bytecode here and found that the last instruction was : [10836] PUSH16 ...
0
votes
2answers
22 views

Does a transaction that consumes the block gas limit take an entire block by itself?

Does a transaction that requires the entire block gas limit to be executed (currently ~8M) take the entire block by itself? And if that's true, will that transaction take longer to get confirmed than ...
0
votes
1answer
20 views

EVM Stack - number of elements

The words in the stack are 256-bit, therefore 32 bytes in hexadecimal representation. The Ethereum Yellow Paper states “the stack as a size of 1024”, although it does not say what (bits/words). A ...
0
votes
0answers
8 views

TypeError: Function overload clash during conversion to external types for arguments

Why do I get following error "TypeError: Function overload clash during conversion to external types for arguments." when using compiler version ^0.5.0; but when I choose 0.5.2; and later releases ...
30
votes
3answers
3k 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 ...
1
vote
1answer
33 views

Can I deploy smart contract written in an older version of solidity ? If yes how to recognize it in EVM?

If I can compile a smart-contract written in an older version say 0.1.3, can I still deploy it? If I can, is there a way to look at EVM bytecode and tell that this smart contract is written with an ...
0
votes
1answer
19 views

Unstructured storage proxies. Variables not being overwritten?

When using delegate call I was under the impression that storage slots declared in the proxy will be overwritten by the implementation. Unstructured storage implementations declare bytes32 variables ...
2
votes
1answer
75 views

Using 'call' from a constant function

I am trying to determine the behavior of call when executed from a constant function. Of course, the compiler issues a warning on that: Warning: Function declared as view, but this expression (...
0
votes
1answer
39 views

How to get the return value of a contract from a contract call?

If a contract does returns something, (whether a string or return true/return false) how to get it’s return value ? I mean where does the return value is stored ? Is necessary to use RETURNDATACOPY or ...
2
votes
1answer
430 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
48 views

Method to verify an address nonce within a contract?

Hey I'm looking for a simple way to verify that a certain address has executed x number of transactions? I noticed that this can be accomplished by having them deploy some contract and verifying ...
2
votes
1answer
27 views

Can Array.push Fail?

Is it possible that Array.push to fail? I noticed we never check whether it fails or not and thought it can be a vulnerability if an adversary makes it fail.
1
vote
2answers
329 views

Is it possible to retrieve an event log from a reverted transaction?

I know there is an upcoming change to solidity which will allow the returning of require() calls with a string error message. But I'm wondering if it's possible to do something like this now. Since ...
2
votes
1answer
35 views

Two legal questions on Ethereum and Smart Contracts

1- Who answers before the judicial instances by any problem in the platform of Ethereum? 2- How does the decentralized platform of Ethereum to annul and render ineffective any smart contracts on ...
2
votes
1answer
58 views

Extra incentives for miners in smart contracts

I am thinking to create a smart contract where miners are not only incetivized by gas price but where basically the miner can get other assets like erc20 tokens if he/she mine my transaction in the ...
1
vote
1answer
141 views

Why EVM and Solidity and not JVM and Java?

Why wasn't JVM and Java used for Ethereum? But instead, EVM and Solidity was invented for the express purpose for Ethereum?
3
votes
1answer
83 views

How to get an evm reference inside go-ethereum GetBalance function?

In order to modify GetBalance function to fork go-ethereum, I find difficulties to get a reference of the running evm. The function has a reference for self *StateDB: func (self *StateDB) GetBalance(...
2
votes
1answer
32 views

Assertion Rely on Balance Amounts

Is it possible in Ethereum blockchain to have two or more events simultaneously occurred? Regarding the following solidity code: function _transfer(address _from, address _to, uint _value) ...
90
votes
7answers
38k views

What is an ABI and why is it needed to interact with contracts?

ABI is referenced in many places including the official Ethereum website. What is an ABI and why is it necessary to use?
0
votes
1answer
25 views

Are current ethereum opcodes prices in pyethereum updated?

I am not an expert in opcodes for Ethereum, but I am wondering if their prices here [https://github.com/ethereum/pyethereum/blob/develop/ethereum/opcodes.py] are updated as the latest version used by ...
1
vote
1answer
115 views

Debugging a VM error in solidity

I'm getting the following error while running a test in truffle: Error: Returned error: VM Exception while processing transaction: revert Now, the code is simply to big and complicated to run ...
0
votes
0answers
27 views

address.call(abi.encodeWithSignature(“func(<param>)”, _params) doesnot work

contract C1 { uint public num; address public sender; function callSetNum(address c2, uint256 _num) public { (bool res,) = c2.call(abi.encodeWithSignature("setNum(uint256)",_num)); ...
1
vote
1answer
38 views

Numerical Value of Bools in Solidity

What is the numerical value of true and false? Presumably one is 0x0000000000000000 and one is 0x0000000000000001
3
votes
1answer
28 views

Why does function GetEVM set the balance of from address to MaxBig256?

As you can see in this line, func (b *LesApiBackend) GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, header *types.Header) (*vm.EVM, func() error, error) { state.SetBalance(...
0
votes
1answer
45 views

Are state changes reversed if the contract “crashes” during execution?

Are state changes reversed if the contract "crashes" during execution? I know that state changes are reversed, if the contract runs out of gas during execution. However, are state changes also ...
0
votes
1answer
80 views

Contracts are “instantiated” by the account creating transaction?

I read the following in a research paper: Short Paper: Formal Verification of Smart Contracts that: contracts are “instantiated” by the account creating transaction; this will allocate the ...
1
vote
1answer
53 views

“Difficulty” opcode pushes always 0x0 to stack

Currently, I do some experiments with Geth-EVM and opcode execution. During the experiments, I observed that the DIFFICULTY opcode always pushs 0x0 to the EVM stack regardless of how I set the ...
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
60 views

What are the differences between Hyperledger Burrow and Ethereum?

What are the main differences for these two platforms (I know that Burrow runs EVM style smart contracts in a permissioned environment. Does that mean Burrow supports all the different smart contract ...
0
votes
1answer
110 views

How to understand output of debug.trace

I have created a Private Ethereum network and I have deployed a contract in it.. Now I am trying to post a transaction in that contract but I m getting error that transaction has been reverted by EVM ...
1
vote
1answer
87 views

It is possible to get bytecode from the evm in golang?

Imagine this scenario, I have a contract that has a function where I call with runtime.Call(). But this function returns an address of a newly created contract, but not the bytecode as runtime.Create ...
0
votes
1answer
21 views

Which software is considered as an EVM Interpreter?

I am reading an article which talks about EVM interpreter but does not provide the name of interpreter. Is solc an EVM interpreter? Zulfi.
1
vote
1answer
100 views

What happens in CALL when gas is set to 0?

Reading the documentation on the CALL opcode : "call contract at address a with input mem[in..(in+insize)) providing g gas and v wei and output area mem[out..(out+outsize)) returning 0 on error (eg. ...
5
votes
1answer
70 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
2answers
62 views

In Casper, what is the incentive to store the entire chain?

Do the validators need information from the blockchain to produce blocks, or is it enough just to store a few recent blocks? What is the incentive to use large amounts of storage to store the complete ...
0
votes
2answers
367 views

How calldata is stored in memory?

when I execute this: bytes8 h = 0x000008dfe2f440000733c; t.call.gas(0x7e0b0)(bytes4(keccak256("enter(bytes8)")),0x8dfe2f440000733c0000000,h); the calldata is : 0: ...
0
votes
2answers
208 views

Smart Contract with web3j - Stored SHA hash returned is not the same as input

I have a contract that stores sha-256 hashes of documents (stored as bytes32). I also have a method to retrieve a hash that is mapped to a unique id for the document. However, when I retrieve and ...
0
votes
1answer
105 views

How to tell the contract deployed size? (Error: The contract code couldn't be stored, please check your gas amount.)

I get Error: The contract code couldn't be stored, please check your gas amount. whenever I deploy to any test network (rinkeby, ropsten) or the live network. Deploy to a local Ganache works perfect. ...
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 ...
53
votes
5answers
13k views

How can you decompile a smart contract?

On the blockchain I can inspect the code of a contract, and see the EVM opcodes. Is there a way to decompile this and convert it back to (Solidity) source code?
1
vote
1answer
99 views

Verify multiple state channel signatures in one transaction

What are some ways to verify multiple state channel signatures (using ECverify) in a single transaction?
1
vote
1answer
117 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 ...