Document precompiles support
Add README section (or separate README file in evmone_precompiles) describing which precompile is supported and by what "backend" (e.g. pure EVM, EVMMAX, EVMMAX-C++, native, etc).
Precompiles documentation would be useful.
@chfast is it possible to build the evmone shared library with precompiles enabled?
Are precompiles something that can be included in the library or do they need to be linked in separately?
@bhartnett,
No, currently precompiles are not a part of the evmone shared library. Low level code is in the evmone::precompiles static library, but the high level code is in evmone::state in precompiles.cpp. This is quite a mess currently. But we can clean it up and make a part of the main library.
However, they won't be enabled for EVM execution because the EVMC API is not very good for this. So in the end, if you want to use EVMC you need to wire precompiles yourself, similarly as this is done in host.cpp.
I'm also slowly working on new API where this is all hidden and you can just execute a transaction. The API itself should also be simpler than EVMC and less "chatty".
No, currently precompiles are not a part of the evmone shared library. Low level code is in the
evmone::precompilesstatic library, but the high level code is inevmone::stateinprecompiles.cpp. This is quite a mess currently. But we can clean it up and make a part of the main library.However, they won't be enabled for EVM execution because the EVMC API is not very good for this. So in the end, if you want to use EVMC you need to wire precompiles yourself, similarly as this is done in
host.cpp.I'm also slowly working on new API where this is all hidden and you can just execute a transaction. The API itself should also be simpler than EVMC and less "chatty".
I see, thanks. Good to know, actually after spending some time looking into it I've decided to wire in the precompiles myself in the EVMC host side.
Also, this new API you mentioned sounds interesting. Perhaps is something we can use in the future.