diff --git a/README.md b/README.md index 8f31a7f..7b5dba8 100644 --- a/README.md +++ b/README.md @@ -259,8 +259,6 @@ This section describes how to run geth node with the [Wagon](http://github.com/g ### Aleth (cpp-ethereum) + Hera -**NOTE: this client currently is not supported fully and the instructions here may be wrong.** - Support for aleth (formerly, cpp-ethereum) is a work in progress and more information may be found [here](aleth.md). diff --git a/aleth.md b/aleth.md index 44db67f..3c1d5f8 100644 --- a/aleth.md +++ b/aleth.md @@ -1,7 +1,5 @@ # Aleth (formerly cpp-ethereum) -**NOTE: this client currently is not supported fully and the instructions here may be wrong.** - `aleth`, `alethvm` and `testeth` contain options to run them with [Hera ewasm VM](https://github.com/ewasm/hera): - `--vm hera` enables Hera only, @@ -29,7 +27,8 @@ The shared library file is located under the `src` directory. ```sh > aleth \ --vm /path/to/libhera.so \ ---evmc fallback=true \ +--evmc metering=true +--evmc evm1mode=fallback \ -d /tmp/ewasm-node/4201 \ --listen 4201 \ --no-bootstrap \ @@ -37,7 +36,7 @@ The shared library file is located under the `src` directory. -t 1 \ -a 0x031159dF845ADe415202e6DA299223cb640B9DB0 \ --config ewasm-testnet-aleth-config.json \ ---peerset "required:61e5475e6870260af84bcf61c02b2127a5c84560401452ae9c99b9ff4f0f343d65c9e26209ec32d42028b365addba27824669eb70c73f69568964f77433afbbe@127.0.0.1:1234" +--peerset "required:enode://53458e6bf0353f3378e115034cf6c6039b9faed52548da9030b37b4672de4a8fd09f869c48d16f9f10937e7398ae0dbe8b9d271408da7a0cf47f42a09e662827@23.101.78.254:30303" --log-verbosity 4 ``` diff --git a/ewasm-testnet-aleth-config.json b/ewasm-testnet-aleth-config.json index fa503f1..5a1879b 100644 --- a/ewasm-testnet-aleth-config.json +++ b/ewasm-testnet-aleth-config.json @@ -4,15 +4,16 @@ "accountStartNonce": "0x00", "maximumExtraDataSize": "0x20", "homesteadForkBlock": "0x00", - "EIP150ForkBlock": "0x00", + "EIP150ForkBlock": "0x00", "EIP158ForkBlock": "0x00", "byzantiumForkBlock": "0x00", - "eWASMForkBlock": "0x00", + "eWASMForkBlock": "0x00", + "daoHardforkBlock": "0x00", "minGasLimit": "0x5208", "maxGasLimit": "0x7fffffffffffffff", "tieBreakingGas": false, "gasLimitBoundDivisor": "0x0400", - "minimumDifficulty": "0x400", + "minimumDifficulty": "0x20000", "difficultyBoundDivisor": "0x0800", "durationLimit": "0x0d", "blockReward": "0x4563918244F40000", @@ -21,8 +22,8 @@ "allowFutureBlocks" : false }, "genesis": { - "nonce": "0x0000000000000000", - "difficulty": "0x1", + "nonce": "0x00", + "difficulty": "0x01", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "author": "0x0000000000000000000000000000000000000000", "timestamp": "0x5b79de34", @@ -30,17 +31,16 @@ "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", "gasLimit": "0x47b760" }, - "accounts": { + "accounts": { "0000000000000000000000000000000000000001": { "precompiled": { "name": "ecrecover", "linear": { "base": 3000, "word": 0 } } }, "0000000000000000000000000000000000000002": { "precompiled": { "name": "sha256", "linear": { "base": 60, "word": 12 } } }, "0000000000000000000000000000000000000003": { "precompiled": { "name": "ripemd160", "linear": { "base": 600, "word": 120 } } }, "0000000000000000000000000000000000000004": { "precompiled": { "name": "identity", "linear": { "base": 15, "word": 3 } } }, - "0000000000000000000000000000000000000005": { "precompiled": { "name": "modexp", "startingBlock" : "0x2dc6c0" } }, - "0000000000000000000000000000000000000006": { "precompiled": { "name": "alt_bn128_G1_add", "startingBlock" : "0x2dc6c0", "linear": { "base": 500, "word": 0 } } }, - "0000000000000000000000000000000000000007": { "precompiled": { "name": "alt_bn128_G1_mul", "startingBlock" : "0x2dc6c0", "linear": { "base": 40000, "word": 0 } } }, - "0000000000000000000000000000000000000008": { "precompiled": { "name": "alt_bn128_pairing_product", "startingBlock" : "0x2dc6c0" } }, - "000000000000000000000000000000000000000a": { "codeFromFile": "dummymetering.wasm", "balance": "0x01", "nonce": "0x00", "storage": {} }, - "000000000000000000000000000000000000000b": { "codeFromFile": "dummyevm2wasm.wasm", "balance": "0x01", "nonce": "0x00", "storage": {} }, - "9fa4f23079bae7a7a5c392b67e18093310315bfc": { "balance": "100000000000000000000000000", "storage": {}, "nonce": "0x0", "code": "" } - } + "0000000000000000000000000000000000000005": { "precompiled": { "name": "modexp" } }, + "0000000000000000000000000000000000000006": { "precompiled": { "name": "alt_bn128_G1_add", "linear": { "base": 500, "word": 0 } } }, + "0000000000000000000000000000000000000007": { "precompiled": { "name": "alt_bn128_G1_mul", "linear": { "base": 40000, "word": 0 } } }, + "0000000000000000000000000000000000000008": { "precompiled": { "name": "alt_bn128_pairing_product" } }, + "000000000000000000000000000000000000000a": { "codeFromFile": "metering.wasm", "balance": "0x01", "nonce": "0x00", "storage": {} }, + "9fa4f23079bae7a7a5c392b67e18093310315bfc": { "balance": "0x200000000000000000000000000000000000000000000000000000000000000", "storage": {}, "nonce": "0x0", "code": "" } + } } diff --git a/metering.wasm b/metering.wasm new file mode 100644 index 0000000..4e6c17a Binary files /dev/null and b/metering.wasm differ