Questions tagged [precompiled-contracts]

Questions related to ‘precompiled’ contracts, meant as a preliminary piece of architecture that may later become native extensions.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 views

What’s the 0x4 precompile?

Simple question but I couldn’t find the answer. Is it the datacopy precompile? and if yes, what it does?
0
votes
0answers
14 views

RSA signature verification: Inputs to Precompile contract

I am trying to verify an RSA signature using Ethereum smart contract. I have some doubts regarding my design. I am using the precompile at address 0X05 to generate s^e mod n, where s is the ...
1
vote
1answer
49 views

How to add custom precompiled contract?

I want to implement some features as precompiled contracts in Ethereum. I read some articles and the contract code, but I still don't know how to do this. Is there's a tutorial from scratch?
3
votes
2answers
231 views

Verifying Modular exponentiation operation in etherum

I have Alice who should do some cryptographic operations off-chain. Then a smart contact has to verify equality by performing Modular exponentiation operation. I attached an image of the off-chain ...
3
votes
0answers
96 views

VM revert on Scalar Multiplication in pre-compiled contracts

I tried to build a wrapper around the precompiled contracts as follows: https://gist.github.com/AlexXiong97/9c24bbd4541323a61fa63100860a5f89 If you paste it into Remix and deploy it, inputting any (...
2
votes
1answer
114 views

Must precompiled contracts be natively implemented?

Instead of just having special native code for each precompiled contract, a client could have special gas metering for those (as it is their main purpose) but keep the logic as EVM instructions. ...
1
vote
1answer
96 views

Very high gas costs

I noticed the following peculiarity: CALL opcode vm trace step: 1122 execution step: 1122 add memory: gas: 3859834 remaining gas: 3921090 loaded address: 0xa7913fc3e4dbf3d8caca06e1c2da85ed838e150f ...
2
votes
0answers
190 views

Web3 js events not listening after 5 mins of idle time

My contract is deployed on ropsten infura test-network and that contract has events which gets fired when there is some transaction. contract file function functionName(address from, address ...
4
votes
1answer
915 views

Calling precompiled contracts from a pure function

I'm trying to call some of the new precompiled contract (ecmul) from a pure function but it fails with: browser/ballot.sol:11:23: TypeError: Function declared as pure, but this expression (...
2
votes
1answer
190 views

Clarification on multiplication from modular exponentiation precompiled contract

I'm trying to understand what exactly Vitalik means in the following (from here): Note that adding precompiles for addition and subtraction is not required, as the in-EVM algorithm is efficient ...
19
votes
2answers
3k views

List of pre-compiled contracts

Where can I find an authoritative/"official" listing of the pre-compiled contracts currently on the Ethereum network, along with their exact specifications? I couldn't find anything in the official ...
4
votes
2answers
225 views

Why aren't all contracts compiled?

There are many proposals of adding precompiled contracts for different reasons. I do not, though, understand why a precompiled contract would be more efficient than an actual contract. If that is the ...
4
votes
0answers
109 views

Did the ripemd precompiled contract get deleted?

A bug "caused account 0000000000000000000000000000000000000003 to be deleted in block 2675119, even though the deletion should have been reverted due to an out of gas error." Source Did account 0..3 ...
2
votes
0answers
175 views

What's reverted and not reverted during an Out of Gas exception?

A seemingly crucial question on EIP 158 was unanswered: Unless the empty accounts are deleted even in the case of an EVM exception, if that is the case would that not break the guarantee that ...
5
votes
1answer
940 views

How to call the precompiled contracts from my contract?

I am trying to call one of the precompiled contracts from my contract. In this case, it is the ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) returns (address) function with the address 0x0.....
3
votes
1answer
359 views

Not all addresses created equal?

I'm using this code to send transactions in test network(Morden): var transactionObject = { to: '**addresses are below**', gasPrice: 22000000000, gas: 42000, value: 1 } var callback ...
3
votes
1answer
244 views

Do native contracts affect the integrity of blockchain?

I started reading about HydraChain and came across their concept of native contracts. This means that nodes can bypass the EVM and run contracts locally. I don't understand the point in having this ...
18
votes
1answer
662 views

Out of Gas invoking precompiled contracts on private blockchains

Why do precompiled contracts lead to Out of Gas on private blockchains? Some tidbits are provided in the Solidity docs but can it be explained more? It might be that you run into Out-of-Gas for ...
13
votes
4answers
619 views

What is the Identity function and what are its uses?

The contract at address 0x04 is the identity function. What is it and what are use cases for it?
35
votes
2answers
3k views

What's a precompiled contract and how are they different from native opcodes?

The Yellow Paper states: These are four so-called ‘precompiled’ contracts, meant as a preliminary piece of architecture that may later become native extensions. The four contracts in addresses ...