New answers tagged

2

Possible applications that exist at the intersection of blockchain and AI/ML are numerous but I can't imagine how block production or validation would be one of them. As Ismael said first, there is no subjectivity involved. It's a little like thinking about how an AI can help an i7 be a better CPU. AI as actors in a system concerned with ownership is more ...


1

The fact that a 0x0 is pushed to the stack on a failed call and 0x1 for a successful call is specified under the description of CALL on page 35 of the yellowpaper. To answer your second question, no, there are no cases where CALL pushes 0x0 to the stack without the transfer of ETH being reverted. Small note: If you are thinking of a way to get ETH into a ...


2

There is only one EVM (Ethereum Virtual Machine) and it's not physically located in any single place. It's distributed to each node. The EVM is a rather abstract construct. If a function in contract A calls a function in contract B all the execution happens within the same transaction. A transaction either succeeds fully or fails fully (in which case all ...


1

It is a miner mistake to allow invalid transactions. A block with invalid transactions is using blockchain space with something useless for infinite time. If the user doesn't have enough balance the miner cannot charge a fee. nonces serve the purpose of having a defined execution order and protecting from certain attacks like transaction replay.


1

The ecrecover address is: 0x01 Without assembly you can call the ecrecover function like that: function recoverEC_Method1 (bytes32 _hash, bytes32 _r, bytes32 _s, uint8 _v) public pure returns (address) { bytes memory prefix = "\x19Ethereum Signed Message:\n32"; bytes32 prefixedHash = keccak256(abi.encodePacked(prefix, _hash)); return ecrecover(...


3

In addition to @mafrasi2's answer, geth ships with a binary called evm. evm compile <filename> can compile "easm" source. You haven't said what sort of assembly you were writing (or given a sample), so I'm not sure if that meets your needs.


1

I've used this assembler in the past, but it's unmaintained and you would need to update it yourself if you want to use any constantinople instructions. I didn't test it, but this one appears to be up to date and a bit more mature. You will have to do some simple preprocessing beforehand, though.


0

Make the constructor payable too. Refer the following code. constructor() public payable{ owner = msg.sender; }


2

I think the hidden assumption here is that something with a name like Ethereum "Virtual Machine" calls for isolation. This is a misunderstanding about the nature of the EVM. The EVM is a specification for an ephemeral state machine. the EVM state is derived by processing transactions correctly. Transactions can include the deployment of code and ...


0

I later realized that the resolver was not the owner of the second Pausable. That was the reason of my error. In other words, the EVM solves the call dinamically. If I can change the object, the EVM will call the function of the changed class without error.


Top 50 recent answers are included