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
0
votes
1answer
88 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
88 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 ...
1
vote
0answers
25 views

Who confirms Ropsten and Rinkeby transactions?

Basic or more like "fundamental" question I guess: So if I got that right, each time someone runs Geth/Parity or other software they all become part of the EVM (ethereum virtual machine). However ...
1
vote
1answer
116 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 ...
0
votes
2answers
398 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
1answer
28 views

How dangerous the 'short address' attack is as of 2019, October and what ways there are to mitigate it?

From what I read there's a well public knowledge of reantrancy and underflows/overflows due to the cases of documented hacks and stolen ether - yet the short address attack seems less known. I know in ...
0
votes
1answer
14 views

Can I call a contract function in the “data” element via web3, especially when I am using conversion to bytes?

In other words, say In Python I have something like that: signed_txn = w3.eth.account.signTransaction(dict( nonce=w3.eth.getTransactionCount('0x0000000000000000000000000000000'), gasPrice = ...
1
vote
1answer
106 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. ...
3
votes
1answer
236 views

How to use evm compile?

I have been testing with evm and I am not getting any output. Code - pragma solidity ^0.4.18; contract d8 { function myBalance() pure public returns (uint) { return 880; } } My ...
3
votes
2answers
64 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 ...
1
vote
3answers
42 views

Basic question I guess but is “web3” a client in the sense that I want to use a very simple client to interact with the network?

Long story short I need a way to send programmatically a raw transaction without any bounds checkings or any checks...now I am not trying to abuse or flood the network - my goal is to attempt to send ...
0
votes
2answers
221 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 ...
1
vote
0answers
24 views

Solidity calldata for an array of structs

I'm trying to create the calldata offchain for an on-chain low-level call to a method that accepts an array of structs as an argument. I'm not sure how to encode the calldata for this. Here's a ...
3
votes
1answer
17 views

Create a slightly customized version of ethereum and run it as a node on a public ethereum blockchain

I might need a small modification to ethereum virtual machine but I still want to run it as a node on the public blockchain not private, if that makes sense. I assume its doable? Since I will not be ...
0
votes
1answer
108 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. ...
1
vote
1answer
102 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
150 views

Concatenating byte strings in assembly for call input data

I have the following piece of code in my contract. It's supposed to take in a byte string composed of a uint flag that is followed by a variable list of uint numbers and contruct a call using those ...
92
votes
8answers
39k 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
21 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 ...
1
vote
1answer
121 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 ...
1
vote
1answer
35 views

Different gas usage of trivial reverting contract function

We are currently testing functions on Ropsten test network and have an issue regarding the gas usage. Our functions sometimes use 12 gas more and we can not fathom why that would be the case. To test ...
0
votes
1answer
12 views

Can block validation be done using machine Learning Algorithms?

I am looking for a new era of products that leverages the potential of Machine Learning and the blockchain, Thinking of different aspects of Blockchain which can be improved with the help of machine ...
0
votes
1answer
89 views

Unhandled promise rejection (rejection id: 1): Error: Transaction has been reverted by the EVM:

I don't know where i'm doing mistake. I have deployed my contract through remix and truffle and it was deployed without any mistake but now i'm deploying it from web3 solc@0.4.24 version and EVM is ...
2
votes
0answers
15 views

Why is it required to know the function selector in a smart contract to call the function? [duplicate]

I understand what a function selector is and how it is computed: The first four bytes of the call data for a function call specifies the function to be called. It is the first (left, high-order ...
0
votes
1answer
18 views

Where does contract’s call failure behavior is definied in the yellow paper?

If a contract’s call succeeds then 0x1 is pushed on the stack and 0x0 otherwise. Where is this behavior defined in the yellow paper ? Also, are there cases were sending ether isn’t reverted in ...
2
votes
1answer
75 views

If a function calls another function in another contract, where is the called function executed?

When a contract calls a function in another contract, is the called function executed in the same EVM as the caller function, in another EVM on the same node or in another random node?
0
votes
1answer
24 views

Why some transaction errors lead to discarding the whole block?

In terms of go-ethereum code, transaction errors can be grouped into (I made up the terminology) several categories by their effect on state transition. System errors: like database connection issues....
0
votes
1answer
37 views

How to call ecrecover() in pure assembly?

If I do remember correctly, it’s a contract built‑in in the Ethereum Virtual machine, isn’t it? if yes, what’s the address to call for it?
0
votes
1answer
252 views

Threat Model Question - Code Injection / ROP possible in Ethereum Smart Contracts?

I am trying to understand a basic threat model for Ethereum Smart Contracts, to perform some research on how existing attacks techniques may be applied here as well. Is there a risk of a contract with ...
2
votes
1answer
249 views

Formal definition of the EVM as a Turing Machine

I am trying to understand the EVM in the context of a classic Turing Machine. I have read through the yellow paper and taken what I can from the internet, but I still feel like I could use some help ...
2
votes
2answers
92 views

How to assemble a contract’s code?

I wrote a contract into bare assembly (no solidity or Vhyper syntax and with all address being static). How to convert it into bytecode? If possible using the new http://remix.ethereum.org or another ...
2
votes
0answers
22 views

How to get a call graph for the binary code of a contract?

I need a call graph generator for the assembler level of smart contract code in order to analyse solidity compiler bugs. In that way, porosity is excatly what I need ! However there are too much bugs ...
0
votes
0answers
11 views

What is EVM15 as a Solidity output target?

In the Solidity compiler help menu solc --help, I noticed that evm15 is one of the new compilation targets in addition to evm and ewasm. I know what ewasm stands for, but what's the difference between ...
2
votes
2answers
205 views

Does the EVM process transactions or is it used solely to execute contract code?

Does the EVM process transactions or is it used solely to execute contract code? I wonder whether the EVM is used to process transactions? I know it is used to execute (or interpret) the bytecode of ...
2
votes
1answer
343 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?
5
votes
4answers
2k views

Issues getting a simple oraclize example to work, callback never executed

I have been trying to deploy and test the basic "SimpleDice" smart contract provided as an example from Oraclize. I have had to adjust it to work with solidity 0.4.2 a bit, but maybe I am missing ...
1
vote
1answer
43 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 ...
15
votes
1answer
1k views

How does EIP 150 change the call depth attack?

It seems that EIP-150 introduced a more expensive gas based restriction on the call stack and completely removed the previous 1024 hard stack limit. Is this true? It seems it took cues from EIP-90 &...
0
votes
1answer
33 views

How is Ethereum Virtual Machine (EVM) isolated (sandboxed)?

I always had this question in mind: What are the used technologies, in order to achieve the isolation of the EVM? does it just run as an isolated process in its own namespaces using the linux feature ...
2
votes
2answers
330 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. ...
3
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
12 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
226 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
48 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
3answers
44 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
450 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
216 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
25 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
22 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
12 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 ...