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
1
vote
0answers
23 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 ...
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
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
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 ...
1
vote
0answers
23 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 ...
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 ...
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
74 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
36 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?
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 ...
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
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
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 ...
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 ...
2
votes
1answer
47 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
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 ...
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
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
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 ...
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 ...
0
votes
1answer
57 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 ...
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 ...
2
votes
1answer
29 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.
0
votes
0answers
37 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)); ...
3
votes
1answer
29 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
23 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.
2
votes
1answer
80 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
0answers
50 views

Instantiation of an EVM on goLang

I'm dealing with goLang on an go-ethereum fork. In order to query a contract endpoint I need to get a fresh EVM reference for properly call the contract. I've found there is a NewEVM function that ...
2
votes
1answer
95 views

After EIP 198 introduction, how much gas is required for RSA signature verification in solidity?

Thanks to the introduction of EIP 198, RSA signature verification is now feasible in Ethereum. How much gas is required for such a verification?
0
votes
1answer
23 views

What does it mean that Solidity can encode arbitrary state transition functions?

From Ethereum White Paper: "What Ethereum intends to provide is a blockchain with a built-in fully fledged Turing-complete programming language that can be used to create "contracts" that can ...
3
votes
1answer
84 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(...
0
votes
1answer
33 views

Multiply small rational number to obtain integer piece

I'm trying to make some advanced calculations in Solidity. I was able to successfully implement the algorithm on my contract, but its results are way below zero, and whenever I try to get it with ...
1
vote
1answer
91 views

how execute smart contract step by step?

I have a few problems understanding the step of execution of transaction in smart contract. 1-When a user send a transaction to smart contract, this smart contract is not executed immediately instead ...
0
votes
1answer
88 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 ...
1
vote
2answers
47 views

Get values from stack when certain Opcode is called

I am currently trying to use genetic algorithms to automatically generate test cases that for ethereum smart contracts similar to https://ieeexplore.ieee.org/abstract/document/7840029>this paper. In ...
5
votes
1answer
101 views

Why does gas cost explode with more than 7 variables in a struct

I'm assuming this has to do with Ethereum's 7 variable stack limit but in the following code test struct TestStruct5 { uint8 m_nOther1; uint8 m_nOther2; uint8 m_nOther3; uint8 ...
1
vote
1answer
82 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
0answers
39 views

Gas is 0 when executing CALL opcode?

I wrote a very simple smart contract like this: contract Test{ function test1(address payable addr, uint256 value) payable public { addr.transfer(value); } } And I compiled it using ...
0
votes
1answer
91 views

What's the root cause “contract error - Gas estimation failed Gas estimation errored with the following message (see below)”?

Rest of the error: The transaction execution will likely fail. Do you want to force sending? Internal JSON-RPC error. I got that message on several cases, usually on different mistakes. What'...
1
vote
1answer
49 views

EVM bytecode debugging jumps

How can i determine forehand the destination of JUMP for which there is no PUSH instruction thst preceeds it and the entries in the code where they where set, when analysing the bytecode? I looked ...
0
votes
0answers
45 views

How does UTXO fit into this schema?

I have been rather confused by the eponymous web3 stack introduced by the Web3 Foundation. https://wiki.web3.foundation/en/latest/tech_stack/Layer-0/platform_neutral_computation_description_language/ ...
0
votes
1answer
20 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 ...
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 ...
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
0answers
28 views

Delegatecall not changing state

I was trying the code in https://gist.github.com/sogoiii/f0ced0a4e569b5f38d302e7072d78b43 to observe the difference between call and delegatecall. pragma solidity ^0.4.18; contract D { uint public ...
0
votes
1answer
92 views

Can Ethereum verify zk-SNARK proofs?

I am wondering if the Ethereum Virtual Machine can verify a proof generated from a certain statement? Are there any precompiled contracts for verifying a proof?
0
votes
1answer
38 views

Which `EVM` bytecode is actually used to “deposit” the transferred Ether?

A quick question. Which EVM opcode is actually used to "deposit" the transferred Ether into the contract? From the EVM opcode list, there are only two opcodes related to the fund transfer: balance and ...