2

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.

Would this be possible?

2

There's no reason they can't be implemented in the EVM, but that completely defeats the purpose. The reason precompiles are precompiles instead of just Solidity libraries that people deploy is because, since they're programmed in the client's language and compiled, they're orders of magnitude more efficient than writing them in EVM bytecode.

  • Thanks, I guess it is faster, but just wondering if it really makes a difference in practice. – Stringer Feb 3 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.