Update precompiled contracts range
This commit is contained in:
Edward Ashton (Brook Street) 2018-11-28 11:45:16 +00:00
Родитель ad50aa279c
Коммит 59cd7eb722
2 изменённых файлов: 11 добавлений и 7 удалений

Просмотреть файл

@ -10,7 +10,7 @@ The main entry point is `evm::Processor::run()`. You will need to provide `evm::
eEVM supports all opcodes from Ethereum's [Homestead release](http://ethdocs.org/en/latest/introduction/the-homestead-release.html), as listed in [opcode.h](include/opcode.h). Note that this does not include more recent opcodes such as `RETURNDATACOPY` or `RETURNDATASIZE` from [EIP #211](https://github.com/ethereum/EIPs/pull/211).
The implementation ignores all gas costs - gas is not spent, tracked, or updated during execution, and execution will never throw an outofgas exception. However, it may still be necessary to pass a sensible initial gas value to `evm::Processor::run()` in case the bytecode calculates or verifies gas budgets itself.
The implementation ignores all gas costs - gas is not spent, tracked, or updated during execution, and execution will never throw an outofgas exception. However, it may still be necessary to pass a sensible initial gas value to `evm::Processor::run()` in case the bytecode calculates or verifies gas budgets itself. It also does not provide the precompiled contracts at addresses 1 to 8.
So far, the code is not particularly optimized in any dimension. In fact, it is in experimental state.
@ -28,11 +28,14 @@ We build and test eEVM on Linux and Windows on x86-64, but it should be function
Build the static library and tests.
```bash
mkdir build; cd build
cmake -GNinja ..
ninja
mkdir build
cd build
cmake ..
make
```
It is also possible to build with Ninja or another generator of choice, and the code will compile with either GCC or Clang (other compilers are untested).
Run the tests.
```bash
@ -45,7 +48,8 @@ ctest -VV
Open the Visual Studio 2017 developer command prompt. Create .sln and .vcxproj files and build the static library and tests as follows.
```cmd
mkdir build; cd build
mkdir build
cd build
cmake -DBoost_INCLUDE_DIR=<boost directory> ..
msbuild ALL_BUILD.vcxproj
```

Просмотреть файл

@ -1217,11 +1217,11 @@ namespace evm
const auto offOut = ctxt->s.pop64();
const auto sizeOut = ctxt->s.pop64();
if (addr >= 1 && addr <= 4)
if (addr >= 1 && addr <= 8)
{
// TODO: implement native extensions
throw Exception(
ET::notImplemented, "Native extensions are not available.");
ET::notImplemented, "Precompiled contracts/native extensions are not implemented.");
}
decltype(auto) callee = gs.get(addr);