Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix aleth genesis file and instructions #143

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).


Expand Down
7 changes: 3 additions & 4 deletions aleth.md
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -29,15 +27,16 @@ 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 \
-m on \
-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
```

Expand Down
28 changes: 14 additions & 14 deletions ewasm-testnet-aleth-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -21,26 +22,25 @@
"allowFutureBlocks" : false
},
"genesis": {
"nonce": "0x0000000000000000",
"difficulty": "0x1",
"nonce": "0x00",
"difficulty": "0x01",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"author": "0x0000000000000000000000000000000000000000",
"timestamp": "0x5b79de34",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"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": "" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Balance in geth seems to be:

    "9fa4f23079bae7a7a5c392b67e18093310315bfc": {
      "balance": "100000000000000000000000000"
    }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.. I only tested syncing against the public testnet (milestone-v1 genesis) and not staging

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something else must have changed with the genesis we have in staging because I am getting genesis mismatch when trying to connect after making this change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay it syncs against staging. We need a tagged release so that #143 can be merged and then, the aleth branches changed here and this PR merged.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean exactly?

}
}
Binary file added metering.wasm
Binary file not shown.