Merge pull request #21 from EthereumCommonwealth/prep-clo

Callisto Hardfork Meta
This commit is contained in:
Yohan Graterol 2018-08-31 10:52:36 -05:00 committed by GitHub
commit c0b28cd7e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 241 additions and 197 deletions

View file

@ -7,7 +7,7 @@ matrix:
- os: linux - os: linux
dist: trusty dist: trusty
sudo: required sudo: required
go: 1.10.x go: 1.10.3
script: script:
- sudo modprobe fuse - sudo modprobe fuse
- sudo chmod 666 /dev/fuse - sudo chmod 666 /dev/fuse
@ -19,18 +19,18 @@ matrix:
deploy: deploy:
provider: releases provider: releases
api_key: api_key:
secure: KARrS20Qud7MMa4NCxmKIbDeMeeA83Wb+a+O22vIGXOk8IJeG6EcUF+gRsnbT+ARqrKdRZIS84OUB/aebgNLT+j2bk8L+UoBQuz6J6JHDqz1duoVa5CK5bIopVEBfu44ZBXHdE01XWLgGS1ce027iCCk0VRAAjpKDVG2X83YONxClg+cCOc6EpVXviHsxnoMSyOpgxTXQRgdgmv1XyzbBTyYKKFWbtNg7AUbxQ0ngQf800+0OmHLZ7ooILlRH115DQ0KJQeKyegCdjJ0Uc4uoSlqVF1VXKvwCColWT3MHU/U9Ig6Edqloh8ulM3BVhnORrwYwJ+oScfzPUPkg9kwzDdA4QgAhdKHKjOa9V62vPlz/oq4fD4LRs81BHiHQVo/WFK+UTkvrqYpDi+hiFfuob8N4sUGckXP8eEVyY2XP5fCMzkhwe2Xnz2CvWqoLt6v6LeZzYFQs68ZwGuwfKn22PqkuyvO+H3X4qqe7F60ofIl9OjJCeLuIpGovG13t/ivNlRiVk8OYaYQQK6OGDVhVqeWI81GXNrttPQygLStr6nnaQo6Gawtsrwk5/OL2ztKrzypXMy+8o2AaQyxrtaGJxnDv8MMkiv0AN2r3uAAfpS2N8xaImeD0R6/EB9W/P/S54KzxyCvsgcVQ0OHJq1LmICHipzFL7lSj7wBmlXmaiA= secure: bk1TJFBdVr0wPsSiTK1RaIwU96FMPBoLHnY7cuVzn4Zj0/67Kj7tUWXnjyoa7Q/ode+HbCWSOlv+f3zVVdCI6f5Rd44cfzJR78TV1LoEdWYS0eQDw55sjVRRtJiUlJSAThDlC/GlNpMdfhgwES/Z8lUvtFql4uLcmwsmcNlBSOQkfWCn0TBFhZ8r8jylI3Gp83VAOF6sFACcmNSB98iI9t5i87kNfAgEr499kiyNSisFiyxySdC+OMzg6ocVFTXuJ1Bq3kbjrVlbRV1Q9evuzlbZPAbl7ENDBd4SuBdwaGoGtY61U4fd7MuLIf5Ds1BkMzrwb4lF6SonNA05xgA5SF/xPykGF7I0FSOSgb9rQzrpbYyfNV2DLXESOd4uAkhH0sulfKt0xUPfjoc4RV3FDt3dPgUpLrnP7alzuQ/ZzsWVsQHuLMkFqjmGfNz4do3j2MdnRdlxtHvm5Vh3c/zWzKbzIHEXfCqmmrcbbRG18qDRpu3HVWlpSFEAGJUN7ofwcoxwqOa6kmsinJ/iGvd7pPyn7nliVXXs68LJOhXZ5F0xTZ83uGy5hU8WUQrsCCF0d0MDWbZyPCBSNj83c7MNVOru1VXHQ8f1G8sX99+PqM1djCN+LOFlDTUwb1XuHx44QcdFBv5DfZV2tu6sedfcRHcR2wXj28++4ZQTEU+mGyA=
file: multi-geth-$TRAVIS_OS_NAME.* file: clo-geth-$TRAVIS_OS_NAME.*
file_glob: true file_glob: true
draft: true draft: true
on: on:
repo: ethoxy/multi-geth repo: EthereumCommonwealth/go-callisto
tags: true tags: true
skip_cleanup: true skip_cleanup: true
tag_name: "$TRAVIS_TAG" tag_name: "$TRAVIS_TAG"
- os: osx - os: osx
go: 1.10.x go: 1.10.3
script: script:
- unset -f cd # workaround for https://github.com/travis-ci/travis-ci/issues/8703 - unset -f cd # workaround for https://github.com/travis-ci/travis-ci/issues/8703
- brew update - brew update
@ -41,12 +41,12 @@ matrix:
deploy: deploy:
provider: releases provider: releases
api_key: api_key:
secure: KARrS20Qud7MMa4NCxmKIbDeMeeA83Wb+a+O22vIGXOk8IJeG6EcUF+gRsnbT+ARqrKdRZIS84OUB/aebgNLT+j2bk8L+UoBQuz6J6JHDqz1duoVa5CK5bIopVEBfu44ZBXHdE01XWLgGS1ce027iCCk0VRAAjpKDVG2X83YONxClg+cCOc6EpVXviHsxnoMSyOpgxTXQRgdgmv1XyzbBTyYKKFWbtNg7AUbxQ0ngQf800+0OmHLZ7ooILlRH115DQ0KJQeKyegCdjJ0Uc4uoSlqVF1VXKvwCColWT3MHU/U9Ig6Edqloh8ulM3BVhnORrwYwJ+oScfzPUPkg9kwzDdA4QgAhdKHKjOa9V62vPlz/oq4fD4LRs81BHiHQVo/WFK+UTkvrqYpDi+hiFfuob8N4sUGckXP8eEVyY2XP5fCMzkhwe2Xnz2CvWqoLt6v6LeZzYFQs68ZwGuwfKn22PqkuyvO+H3X4qqe7F60ofIl9OjJCeLuIpGovG13t/ivNlRiVk8OYaYQQK6OGDVhVqeWI81GXNrttPQygLStr6nnaQo6Gawtsrwk5/OL2ztKrzypXMy+8o2AaQyxrtaGJxnDv8MMkiv0AN2r3uAAfpS2N8xaImeD0R6/EB9W/P/S54KzxyCvsgcVQ0OHJq1LmICHipzFL7lSj7wBmlXmaiA= secure: bk1TJFBdVr0wPsSiTK1RaIwU96FMPBoLHnY7cuVzn4Zj0/67Kj7tUWXnjyoa7Q/ode+HbCWSOlv+f3zVVdCI6f5Rd44cfzJR78TV1LoEdWYS0eQDw55sjVRRtJiUlJSAThDlC/GlNpMdfhgwES/Z8lUvtFql4uLcmwsmcNlBSOQkfWCn0TBFhZ8r8jylI3Gp83VAOF6sFACcmNSB98iI9t5i87kNfAgEr499kiyNSisFiyxySdC+OMzg6ocVFTXuJ1Bq3kbjrVlbRV1Q9evuzlbZPAbl7ENDBd4SuBdwaGoGtY61U4fd7MuLIf5Ds1BkMzrwb4lF6SonNA05xgA5SF/xPykGF7I0FSOSgb9rQzrpbYyfNV2DLXESOd4uAkhH0sulfKt0xUPfjoc4RV3FDt3dPgUpLrnP7alzuQ/ZzsWVsQHuLMkFqjmGfNz4do3j2MdnRdlxtHvm5Vh3c/zWzKbzIHEXfCqmmrcbbRG18qDRpu3HVWlpSFEAGJUN7ofwcoxwqOa6kmsinJ/iGvd7pPyn7nliVXXs68LJOhXZ5F0xTZ83uGy5hU8WUQrsCCF0d0MDWbZyPCBSNj83c7MNVOru1VXHQ8f1G8sX99+PqM1djCN+LOFlDTUwb1XuHx44QcdFBv5DfZV2tu6sedfcRHcR2wXj28++4ZQTEU+mGyA=
file: multi-geth-$TRAVIS_OS_NAME.* file: clo-geth-$TRAVIS_OS_NAME.*
file_glob: true file_glob: true
draft: true draft: true
on: on:
repo: ethoxy/multi-geth repo: EthereumCommonwealth/go-callisto
tags: true tags: true
skip_cleanup: true skip_cleanup: true
tag_name: "$TRAVIS_TAG" tag_name: "$TRAVIS_TAG"
@ -54,7 +54,7 @@ matrix:
# This builder only tests code linters on latest version of Go # This builder only tests code linters on latest version of Go
- os: linux - os: linux
dist: trusty dist: trusty
go: 1.10.x go: 1.10.3
env: env:
- lint - lint
git: git:

View file

@ -1,15 +1,12 @@
## Go Ethereum ## Go Callisto
A distribution of go-ethereum with support of multiple Ethereum-like networks. Official golang implementation of the Callisto protocol. Based on Ethereum official golang implementation. The main goal of Callisto is to research and implement a reference protocol of self-governed self-sustaining blockchain development infrastructure. The goal should be achieved through the built-in capabilities of Ethereum-compatible smart contract systems.
[![API Reference]( [![Go Report Card](https://goreportcard.com/badge/github.com/EthereumCommonwealth/go-callisto)](https://goreportcard.com/report/github.com/EthereumCommonwealth/go-callisto)
https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667 [![Travis](https://travis-ci.org/EthereumCommonwealth/go-callisto.svg?branch=CLO%2F1.1)](https://travis-ci.org/EthereumCommonwealth/go-callisto)
)](https://godoc.org/github.com/ethereum/go-ethereum) [![Telegram](https://img.shields.io/badge/telegram-join%20chat-blue.svg)](https://t.me/CallistoNetwork)
[![Go Report Card](https://goreportcard.com/badge/github.com/ethoxy/multi-geth)](https://goreportcard.com/report/github.com/ethoxy/multi-geth)
[![Travis](https://travis-ci.org/ethoxy/multi-geth.svg?branch=master)](https://travis-ci.org/ethoxy/multi-geth)
[![Join the chat at https://gitter.im/ethoxy/multi-geth](https://badges.gitter.im/ethoxy/multi-geth.svg)](https://gitter.im/ethoxy/multi-geth)
Binary archives are published at https://github.com/ethoxy/multi-geth/releases. Binary archives are published at https://github.com/EthereumCommonwealth/go-callisto/releases.
## Building the source ## Building the source
@ -27,15 +24,6 @@ or, to build the full suite of utilities:
make all make all
## Ellaism network
This is originally an [Ellaism
Project](https://github.com/ellaism). However, A [recent hard
fork](https://github.com/ellaism/specs/blob/master/specs/2018-0003-wasm-hardfork.md)
makes Ellaism not feasible to support go-ethereum any more. Existing
Ellaism users are asked to switch to
[Parity](https://github.com/paritytech/parity).
## Executables ## Executables
The go-ethereum project comes with several wrappers/executables found in the `cmd` directory. The go-ethereum project comes with several wrappers/executables found in the `cmd` directory.
@ -80,20 +68,6 @@ This command will:
This too is optional and if you leave it out you can always attach to an already running Geth instance This too is optional and if you leave it out you can always attach to an already running Geth instance
with `geth attach`. with `geth attach`.
### Full node on the main Ellaism network
To get on Ellaism network and take advantage of fast-sync:
```
$ geth --ellaism console
```
This command will:
* Start geth in fast sync mode and start up geth's built-in interactive JavaScript console,
connecting to Ellaism network.
* Default data directory will be `~/.ethereum/ellaism`.
### Full node on the main Ethereum Classic network ### Full node on the main Ethereum Classic network
To get on Ethereum Classic network and take advantage of fast-sync: To get on Ethereum Classic network and take advantage of fast-sync:
@ -114,9 +88,9 @@ For a full list of networks supported by multi-geth, take a look at the command-
``` ```
--testnet Ropsten network: pre-configured proof-of-work test network --testnet Ropsten network: pre-configured proof-of-work test network
--ellaism Ellaism network: pre-configured Ellaism mainnet
--classic Ethereum Classic network: pre-configured Ethereum Classic mainnet --classic Ethereum Classic network: pre-configured Ethereum Classic mainnet
--social Ethereum Social network: pre-configured Ethereum Social mainnet --social Ethereum Social network: pre-configured Ethereum Social mainnet
--callisto Callisto network: pre-configured Callisto mainnet
--rinkeby Rinkeby network: pre-configured proof-of-authority test network --rinkeby Rinkeby network: pre-configured proof-of-authority test network
``` ```

View file

@ -25,9 +25,9 @@ install:
build_script: build_script:
- go run build\ci.go install - go run build\ci.go install
- 7z a multi-geth-win64.zip .\build\bin\geth.exe - 7z a clo-geth-win64.zip .\build\bin\geth.exe
- ps: Get-FileHash multi-geth-win64.zip -Algorithm SHA256 - ps: Get-FileHash clo-geth-win64.zip -Algorithm SHA256
- ps: Get-FileHash multi-geth-win64.zip -Algorithm SHA256 | Out-File multi-geth-win64.zip.sha256 - ps: Get-FileHash clo-geth-win64.zip -Algorithm SHA256 | Out-File clo-geth-win64.zip.sha256
artifacts: artifacts:
- path: '*.zip' - path: '*.zip'
@ -36,9 +36,9 @@ artifacts:
name: geth-sha256 name: geth-sha256
deploy: deploy:
artifact: /multi-geth-win64\.zip.*/ artifact: /clo-geth-win64\.zip.*/
auth_token: auth_token:
secure: 6NcsMzxggkLUTrKSB/oJQKMDORkvDIfa39CMSlF0+J4CaPScg3patFk755g+tHfA secure: OzaYbBXj6g9odl/p+gGOXOBrT9AXCmNWxeyyDetSY66CWMxEzgUT2fO/Hr0ODFxe
draft: true draft: true
on: on:
appveyor_repo_tag: true appveyor_repo_tag: true

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
GETH_ARCHIVE_NAME="multi-geth-$TRAVIS_OS_NAME" GETH_ARCHIVE_NAME="clo-geth-$TRAVIS_OS_NAME"
zip -j "$GETH_ARCHIVE_NAME.zip" build/bin/geth zip -j "$GETH_ARCHIVE_NAME.zip" build/bin/geth
shasum -a 256 $GETH_ARCHIVE_NAME.zip shasum -a 256 $GETH_ARCHIVE_NAME.zip

View file

@ -136,9 +136,9 @@ The export-preimages command export hash preimages to an RLP encoded stream`,
utils.SyncModeFlag, utils.SyncModeFlag,
utils.FakePoWFlag, utils.FakePoWFlag,
utils.TestnetFlag, utils.TestnetFlag,
utils.EllaismFlag,
utils.ClassicFlag, utils.ClassicFlag,
utils.SocialFlag, utils.SocialFlag,
utils.CallistoFlag,
utils.RinkebyFlag, utils.RinkebyFlag,
}, },
Category: "BLOCKCHAIN COMMANDS", Category: "BLOCKCHAIN COMMANDS",

View file

@ -126,12 +126,12 @@ func remoteConsole(ctx *cli.Context) error {
path = filepath.Join(path, "testnet") path = filepath.Join(path, "testnet")
} else if ctx.GlobalBool(utils.RinkebyFlag.Name) { } else if ctx.GlobalBool(utils.RinkebyFlag.Name) {
path = filepath.Join(path, "rinkeby") path = filepath.Join(path, "rinkeby")
} else if ctx.GlobalBool(utils.EllaismFlag.Name) {
path = filepath.Join(path, "ellaism")
} else if ctx.GlobalBool(utils.ClassicFlag.Name) { } else if ctx.GlobalBool(utils.ClassicFlag.Name) {
path = filepath.Join(path, "classic") path = filepath.Join(path, "classic")
} else if ctx.GlobalBool(utils.SocialFlag.Name) { } else if ctx.GlobalBool(utils.SocialFlag.Name) {
path = filepath.Join(path, "social") path = filepath.Join(path, "social")
} else if ctx.GlobalBool(utils.CallistoFlag.Name) {
path = filepath.Join(path, "callisto")
} }
} }
endpoint = fmt.Sprintf("%s/geth.ipc", path) endpoint = fmt.Sprintf("%s/geth.ipc", path)

View file

@ -51,7 +51,7 @@ func TestConsoleWelcome(t *testing.T) {
geth.SetTemplateFunc("goarch", func() string { return runtime.GOARCH }) geth.SetTemplateFunc("goarch", func() string { return runtime.GOARCH })
geth.SetTemplateFunc("gover", runtime.Version) geth.SetTemplateFunc("gover", runtime.Version)
geth.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta }) geth.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta })
geth.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) }) geth.SetTemplateFunc("niltime", func() string { return time.Unix(1519622213, 0).Format(time.RFC1123) })
geth.SetTemplateFunc("apis", func() string { return ipcAPIs }) geth.SetTemplateFunc("apis", func() string { return ipcAPIs })
// Verify the actual welcome message to the required template // Verify the actual welcome message to the required template
@ -135,7 +135,7 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) {
attach.SetTemplateFunc("gover", runtime.Version) attach.SetTemplateFunc("gover", runtime.Version)
attach.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta }) attach.SetTemplateFunc("gethver", func() string { return params.VersionWithMeta })
attach.SetTemplateFunc("etherbase", func() string { return geth.Etherbase }) attach.SetTemplateFunc("etherbase", func() string { return geth.Etherbase })
attach.SetTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) }) attach.SetTemplateFunc("niltime", func() string { return time.Unix(1519622213, 0).Format(time.RFC1123) })
attach.SetTemplateFunc("ipc", func() bool { return strings.HasPrefix(endpoint, "ipc") }) attach.SetTemplateFunc("ipc", func() bool { return strings.HasPrefix(endpoint, "ipc") })
attach.SetTemplateFunc("datadir", func() string { return geth.Datadir }) attach.SetTemplateFunc("datadir", func() string { return geth.Datadir })
attach.SetTemplateFunc("apis", func() string { return apis }) attach.SetTemplateFunc("apis", func() string { return apis })

View file

@ -89,7 +89,7 @@ func TestDAOForkBlockNewChain(t *testing.T) {
expectVote bool expectVote bool
}{ }{
// Test DAO Default Mainnet // Test DAO Default Mainnet
{"", params.MainnetChainConfig.DAOForkBlock, true}, {"", params.CallistoChainConfig.DAOForkBlock, false},
// test DAO Init Old Privnet // test DAO Init Old Privnet
{daoOldGenesis, nil, false}, {daoOldGenesis, nil, false},
// test DAO Default No Fork Privnet // test DAO Default No Fork Privnet
@ -127,7 +127,7 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc
} }
defer db.Close() defer db.Close()
genesisHash := common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3") genesisHash := common.HexToHash("0x82270b80fc90beb005505a9ef95039639968a0e81b2904ad30128c93d713d2c4")
if genesis != "" { if genesis != "" {
genesisHash = daoGenesisHash genesisHash = daoGenesisHash
} }

View file

@ -36,13 +36,13 @@ var customGenesisTests = []struct {
"difficulty" : "0x20000", "difficulty" : "0x20000",
"extraData" : "", "extraData" : "",
"gasLimit" : "0x2fefd8", "gasLimit" : "0x2fefd8",
"nonce" : "0x0000000000000042", "nonce" : "0x0000000000000000",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00" "timestamp" : "0x00"
}`, }`,
query: "eth.getBlock(0).nonce", query: "eth.getBlock(0).nonce",
result: "0x0000000000000042", result: "0x0000000000000000",
}, },
// Genesis file with an empty chain configuration (ensure missing fields work) // Genesis file with an empty chain configuration (ensure missing fields work)
{ {
@ -52,14 +52,14 @@ var customGenesisTests = []struct {
"difficulty" : "0x20000", "difficulty" : "0x20000",
"extraData" : "", "extraData" : "",
"gasLimit" : "0x2fefd8", "gasLimit" : "0x2fefd8",
"nonce" : "0x0000000000000042", "nonce" : "0x0000000000000000",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00", "timestamp" : "0x00",
"config" : {} "config" : {}
}`, }`,
query: "eth.getBlock(0).nonce", query: "eth.getBlock(0).nonce",
result: "0x0000000000000042", result: "0x0000000000000000",
}, },
// Genesis file with specific chain configurations // Genesis file with specific chain configurations
{ {
@ -69,7 +69,7 @@ var customGenesisTests = []struct {
"difficulty" : "0x20000", "difficulty" : "0x20000",
"extraData" : "", "extraData" : "",
"gasLimit" : "0x2fefd8", "gasLimit" : "0x2fefd8",
"nonce" : "0x0000000000000042", "nonce" : "0x0000000000000000",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00", "timestamp" : "0x00",
@ -80,7 +80,7 @@ var customGenesisTests = []struct {
} }
}`, }`,
query: "eth.getBlock(0).nonce", query: "eth.getBlock(0).nonce",
result: "0x0000000000000042", result: "0x0000000000000000",
}, },
} }

View file

@ -110,9 +110,9 @@ var (
utils.DeveloperFlag, utils.DeveloperFlag,
utils.DeveloperPeriodFlag, utils.DeveloperPeriodFlag,
utils.TestnetFlag, utils.TestnetFlag,
utils.EllaismFlag,
utils.ClassicFlag, utils.ClassicFlag,
utils.SocialFlag, utils.SocialFlag,
utils.CallistoFlag,
utils.RinkebyFlag, utils.RinkebyFlag,
utils.VMEnableDebugFlag, utils.VMEnableDebugFlag,
utils.NetworkIdFlag, utils.NetworkIdFlag,

View file

@ -73,9 +73,9 @@ var AppHelpFlagGroups = []flagGroup{
utils.NoUSBFlag, utils.NoUSBFlag,
utils.NetworkIdFlag, utils.NetworkIdFlag,
utils.TestnetFlag, utils.TestnetFlag,
utils.EllaismFlag,
utils.ClassicFlag, utils.ClassicFlag,
utils.SocialFlag, utils.SocialFlag,
utils.CallistoFlag,
utils.RinkebyFlag, utils.RinkebyFlag,
utils.SyncModeFlag, utils.SyncModeFlag,
utils.GCModeFlag, utils.GCModeFlag,

View file

@ -137,10 +137,6 @@ var (
Name: "testnet", Name: "testnet",
Usage: "Ropsten network: pre-configured proof-of-work test network", Usage: "Ropsten network: pre-configured proof-of-work test network",
} }
EllaismFlag = cli.BoolFlag{
Name: "ellaism",
Usage: "Ellaism network: pre-configured Ellaism mainnet",
}
ClassicFlag = cli.BoolFlag{ ClassicFlag = cli.BoolFlag{
Name: "classic", Name: "classic",
Usage: "Ethereum Classic network: pre-configured Ethereum Classic mainnet", Usage: "Ethereum Classic network: pre-configured Ethereum Classic mainnet",
@ -149,6 +145,10 @@ var (
Name: "social", Name: "social",
Usage: "Ethereum Social network: pre-configured Ethereum Social mainnet", Usage: "Ethereum Social network: pre-configured Ethereum Social mainnet",
} }
CallistoFlag = cli.BoolFlag{
Name: "callisto",
Usage: "Callisto network: pre-configured Callisto mainnet",
}
RinkebyFlag = cli.BoolFlag{ RinkebyFlag = cli.BoolFlag{
Name: "rinkeby", Name: "rinkeby",
Usage: "Rinkeby network: pre-configured proof-of-authority test network", Usage: "Rinkeby network: pre-configured proof-of-authority test network",
@ -591,15 +591,15 @@ func MakeDataDir(ctx *cli.Context) string {
if ctx.GlobalBool(TestnetFlag.Name) { if ctx.GlobalBool(TestnetFlag.Name) {
return filepath.Join(path, "testnet") return filepath.Join(path, "testnet")
} }
if ctx.GlobalBool(EllaismFlag.Name) {
return filepath.Join(path, "ellaism")
}
if ctx.GlobalBool(ClassicFlag.Name) { if ctx.GlobalBool(ClassicFlag.Name) {
return filepath.Join(path, "classic") return filepath.Join(path, "classic")
} }
if ctx.GlobalBool(SocialFlag.Name) { if ctx.GlobalBool(SocialFlag.Name) {
return filepath.Join(path, "social") return filepath.Join(path, "social")
} }
if ctx.GlobalBool(CallistoFlag.Name) {
return filepath.Join(path, "callisto")
}
if ctx.GlobalBool(RinkebyFlag.Name) { if ctx.GlobalBool(RinkebyFlag.Name) {
return filepath.Join(path, "rinkeby") return filepath.Join(path, "rinkeby")
} }
@ -645,7 +645,7 @@ func setNodeUserIdent(ctx *cli.Context, cfg *node.Config) {
// setBootstrapNodes creates a list of bootstrap nodes from the command line // setBootstrapNodes creates a list of bootstrap nodes from the command line
// flags, reverting to pre-configured ones if none have been specified. // flags, reverting to pre-configured ones if none have been specified.
func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) { func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
urls := params.MainnetBootnodes urls := params.CallistoBootnodes
switch { switch {
case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(BootnodesV4Flag.Name): case ctx.GlobalIsSet(BootnodesFlag.Name) || ctx.GlobalIsSet(BootnodesV4Flag.Name):
if ctx.GlobalIsSet(BootnodesV4Flag.Name) { if ctx.GlobalIsSet(BootnodesV4Flag.Name) {
@ -655,12 +655,12 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
} }
case ctx.GlobalBool(TestnetFlag.Name): case ctx.GlobalBool(TestnetFlag.Name):
urls = params.TestnetBootnodes urls = params.TestnetBootnodes
case ctx.GlobalBool(EllaismFlag.Name):
urls = params.EllaismBootnodes
case ctx.GlobalBool(ClassicFlag.Name): case ctx.GlobalBool(ClassicFlag.Name):
urls = params.ClassicBootnodes urls = params.ClassicBootnodes
case ctx.GlobalBool(SocialFlag.Name): case ctx.GlobalBool(SocialFlag.Name):
urls = params.SocialBootnodes urls = params.SocialBootnodes
case ctx.GlobalBool(CallistoFlag.Name):
urls = params.CallistoBootnodes
case ctx.GlobalBool(RinkebyFlag.Name): case ctx.GlobalBool(RinkebyFlag.Name):
urls = params.RinkebyBootnodes urls = params.RinkebyBootnodes
case cfg.BootstrapNodes != nil: case cfg.BootstrapNodes != nil:
@ -946,12 +946,12 @@ func SetNodeConfig(ctx *cli.Context, cfg *node.Config) {
cfg.DataDir = "" // unless explicitly requested, use memory databases cfg.DataDir = "" // unless explicitly requested, use memory databases
case ctx.GlobalBool(TestnetFlag.Name): case ctx.GlobalBool(TestnetFlag.Name):
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "testnet") cfg.DataDir = filepath.Join(node.DefaultDataDir(), "testnet")
case ctx.GlobalBool(EllaismFlag.Name):
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "ellaism")
case ctx.GlobalBool(ClassicFlag.Name): case ctx.GlobalBool(ClassicFlag.Name):
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "classic") cfg.DataDir = filepath.Join(node.DefaultDataDir(), "classic")
case ctx.GlobalBool(SocialFlag.Name): case ctx.GlobalBool(SocialFlag.Name):
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "social") cfg.DataDir = filepath.Join(node.DefaultDataDir(), "social")
case ctx.GlobalBool(CallistoFlag.Name):
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "callisto")
case ctx.GlobalBool(RinkebyFlag.Name): case ctx.GlobalBool(RinkebyFlag.Name):
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "rinkeby") cfg.DataDir = filepath.Join(node.DefaultDataDir(), "rinkeby")
} }
@ -1081,18 +1081,11 @@ func SetShhConfig(ctx *cli.Context, stack *node.Node, cfg *whisper.Config) {
// SetEthConfig applies eth-related command line flags to the config. // SetEthConfig applies eth-related command line flags to the config.
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) { func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
// Avoid conflicting network flags // Avoid conflicting network flags
checkExclusive(ctx, DeveloperFlag, TestnetFlag, RinkebyFlag, EllaismFlag, ClassicFlag, SocialFlag) checkExclusive(ctx, DeveloperFlag, TestnetFlag, RinkebyFlag, ClassicFlag, SocialFlag, CallistoFlag)
checkExclusive(ctx, FastSyncFlag, LightModeFlag, SyncModeFlag) checkExclusive(ctx, FastSyncFlag, LightModeFlag, SyncModeFlag)
checkExclusive(ctx, LightServFlag, LightModeFlag) checkExclusive(ctx, LightServFlag, LightModeFlag)
checkExclusive(ctx, LightServFlag, SyncModeFlag, "light") checkExclusive(ctx, LightServFlag, SyncModeFlag, "light")
if ctx.GlobalIsSet(EllaismFlag.Name) {
log.Warn("-------------------------------------------------------------------")
log.Warn("multi-geth Ellaism support is deprecated, please upgrade to Parity")
log.Warn("(https://github.com/paritytech/parity) before block 2,000,000.")
log.Warn("-------------------------------------------------------------------")
}
ks := stack.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore) ks := stack.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
setEtherbase(ctx, ks, cfg) setEtherbase(ctx, ks, cfg)
setGPO(ctx, &cfg.GPO) setGPO(ctx, &cfg.GPO)
@ -1154,11 +1147,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
cfg.NetworkId = 3 cfg.NetworkId = 3
} }
cfg.Genesis = core.DefaultTestnetGenesisBlock() cfg.Genesis = core.DefaultTestnetGenesisBlock()
case ctx.GlobalBool(EllaismFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 64
}
cfg.Genesis = core.DefaultEllaismGenesisBlock()
case ctx.GlobalBool(ClassicFlag.Name): case ctx.GlobalBool(ClassicFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) { if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 1 cfg.NetworkId = 1
@ -1169,6 +1157,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
cfg.NetworkId = 28 cfg.NetworkId = 28
} }
cfg.Genesis = core.DefaultSocialGenesisBlock() cfg.Genesis = core.DefaultSocialGenesisBlock()
case ctx.GlobalBool(CallistoFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 1
}
cfg.Genesis = core.DefaultCallistoGenesisBlock()
case ctx.GlobalBool(RinkebyFlag.Name): case ctx.GlobalBool(RinkebyFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) { if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 4 cfg.NetworkId = 4
@ -1318,12 +1311,12 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
switch { switch {
case ctx.GlobalBool(TestnetFlag.Name): case ctx.GlobalBool(TestnetFlag.Name):
genesis = core.DefaultTestnetGenesisBlock() genesis = core.DefaultTestnetGenesisBlock()
case ctx.GlobalBool(EllaismFlag.Name):
genesis = core.DefaultEllaismGenesisBlock()
case ctx.GlobalBool(ClassicFlag.Name): case ctx.GlobalBool(ClassicFlag.Name):
genesis = core.DefaultClassicGenesisBlock() genesis = core.DefaultClassicGenesisBlock()
case ctx.GlobalBool(SocialFlag.Name): case ctx.GlobalBool(SocialFlag.Name):
genesis = core.DefaultSocialGenesisBlock() genesis = core.DefaultSocialGenesisBlock()
case ctx.GlobalBool(CallistoFlag.Name):
genesis = core.DefaultCallistoGenesisBlock()
case ctx.GlobalBool(RinkebyFlag.Name): case ctx.GlobalBool(RinkebyFlag.Name):
genesis = core.DefaultRinkebyGenesisBlock() genesis = core.DefaultRinkebyGenesisBlock()
case ctx.GlobalBool(DeveloperFlag.Name): case ctx.GlobalBool(DeveloperFlag.Name):

View file

@ -36,14 +36,19 @@ import (
// Ethash proof-of-work protocol constants. // Ethash proof-of-work protocol constants.
var ( var (
FrontierBlockReward *big.Int = big.NewInt(5e+18) // Block reward in wei for successfully mining a block FrontierBlockReward *big.Int = big.NewInt(5e+18) // Block reward in wei for successfully mining a block
ByzantiumBlockReward *big.Int = big.NewInt(3e+18) // Block reward in wei for successfully mining a block upward from Byzantium ByzantiumBlockReward *big.Int = big.NewInt(3e+18) // Block reward in wei for successfully mining a block upward from Byzantium
SocialBlockReward *big.Int = new(big.Int).Mul(big.NewInt(50), big.NewInt(1e+18)) // Block reward in wei for successfully mining a block upward for Ethereum Social SocialBlockReward *big.Int = new(big.Int).Mul(big.NewInt(50), big.NewInt(1e+18)) // Block reward in wei for successfully mining a block upward for Ethereum Social
maxUncles = 2 // Maximum number of uncles allowed in a single block CLOMinerReward *big.Int = new(big.Int).Mul(big.NewInt(420), big.NewInt(1e+18)) // Block reward in wei for successfully mining a block upward for Callisto Network
allowedFutureBlockTime = 15 * time.Second // Max time from current time allowed for blocks, before they're considered future blocks CLOTreasuryReward *big.Int = new(big.Int).Mul(big.NewInt(120), big.NewInt(1e+18)) // Block reward in wei for successfully mining a block upward for Callisto Network
DisinflationRateQuotient = big.NewInt(4) // Disinflation rate quotient for ECIP1017 CLOStakeReward *big.Int = new(big.Int).Mul(big.NewInt(60), big.NewInt(1e+18)) // Block reward in wei for successfully mining a block upward for Callisto Network
DisinflationRateDivisor = big.NewInt(5) // Disinflation rate divisor for ECIP1017 CLOHF1TreasuryReward *big.Int = new(big.Int).Mul(big.NewInt(60), big.NewInt(1e+18)) // Block reward in wei for successfully mining a block upward for Callisto Network
ExpDiffPeriod = big.NewInt(100000) // Exponential diff period for ECIP1010 CLOHF1StakeReward *big.Int = new(big.Int).Mul(big.NewInt(120), big.NewInt(1e+18)) // Block reward in wei for successfully mining a block upward for Callisto Network
maxUncles = 2 // Maximum number of uncles allowed in a single block
allowedFutureBlockTime = 15 * time.Second // Max time from current time allowed for blocks, before they're considered future blocks
DisinflationRateQuotient = big.NewInt(4) // Disinflation rate quotient for ECIP1017
DisinflationRateDivisor = big.NewInt(5) // Disinflation rate divisor for ECIP1017
ExpDiffPeriod = big.NewInt(100000) // Exponential diff period for ECIP1010
) )
// Various error messages to mark blocks invalid. These should be private to // Various error messages to mark blocks invalid. These should be private to
@ -657,9 +662,20 @@ func (ethash *Ethash) VerifySeal(chain consensus.ChainReader, header *types.Head
return nil return nil
} }
// default accumulateRewards()
var accumulateRewards func(config *params.ChainConfig, state *state.StateDB, header *types.Header, uncles []*types.Header) = defaultAccumulateRewards
// Prepare implements consensus.Engine, initializing the difficulty field of a // Prepare implements consensus.Engine, initializing the difficulty field of a
// header to conform to the ethash protocol. The changes are done inline. // header to conform to the ethash protocol. The changes are done inline.
func (ethash *Ethash) Prepare(chain consensus.ChainReader, header *types.Header) error { func (ethash *Ethash) Prepare(chain consensus.ChainReader, header *types.Header) error {
if chain.GetHeaderByNumber(0).Hash() == params.SocialGenesisHash {
// setup accumulateRewards for Ethereum Social
accumulateRewards = socialAccumulateRewards
}
if chain.GetHeaderByNumber(0).Hash() == params.CallistoGenesisHash {
// setup accumulateRewards for Callisto Network
accumulateRewards = callistoAccumulateRewards
}
parent := chain.GetHeader(header.ParentHash, header.Number.Uint64()-1) parent := chain.GetHeader(header.ParentHash, header.Number.Uint64()-1)
if parent == nil { if parent == nil {
return consensus.ErrUnknownAncestor return consensus.ErrUnknownAncestor
@ -688,15 +704,50 @@ var (
// AccumulateRewards credits the coinbase of the given block with the mining // AccumulateRewards credits the coinbase of the given block with the mining
// reward. The total reward consists of the static block reward and rewards for // reward. The total reward consists of the static block reward and rewards for
// included uncles. The coinbase of each uncle block is also rewarded. // included uncles. The coinbase of each uncle block is also rewarded.
func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header *types.Header, uncles []*types.Header) { func defaultAccumulateRewards(config *params.ChainConfig, state *state.StateDB, header *types.Header, uncles []*types.Header) {
// Select the correct block reward based on chain progression // Select the correct block reward based on chain progression
blockReward := FrontierBlockReward blockReward := FrontierBlockReward
if config.IsByzantium(header.Number) { if config.IsByzantium(header.Number) {
blockReward = ByzantiumBlockReward blockReward = ByzantiumBlockReward
} }
if config.IsSocial(header.Number) { if config.HasECIP1017() {
blockReward = SocialBlockReward // Ensure value 'era' is configured.
eraLen := config.ECIP1017EraRounds
era := GetBlockEra(header.Number, eraLen)
wr := GetBlockWinnerRewardByEra(era, blockReward) // wr "winner reward". 5, 4, 3.2, 2.56, ...
wurs := GetBlockWinnerRewardForUnclesByEra(era, uncles, blockReward) // wurs "winner uncle rewards"
wr.Add(wr, wurs)
state.AddBalance(header.Coinbase, wr) // $$
// Reward uncle miners.
for _, uncle := range uncles {
ur := GetBlockUncleRewardByEra(era, header, uncle, blockReward)
state.AddBalance(uncle.Coinbase, ur) // $$
}
} else {
// Accumulate the rewards for the miner and any included uncles
reward := new(big.Int).Set(blockReward)
r := new(big.Int)
for _, uncle := range uncles {
r.Add(uncle.Number, big8)
r.Sub(r, header.Number)
r.Mul(r, blockReward)
r.Div(r, big8)
state.AddBalance(uncle.Coinbase, r)
r.Div(blockReward, big32)
reward.Add(reward, r)
}
state.AddBalance(header.Coinbase, reward)
} }
}
// socialAccumulateRewards credits the coinbase of the given block with the mining
// reward. The total reward consists of the static block reward and rewards for
// included uncles. The coinbase of each uncle block is also rewarded.
func socialAccumulateRewards(config *params.ChainConfig, state *state.StateDB, header *types.Header, uncles []*types.Header) {
// Select the correct block reward based on chain progression
blockReward := SocialBlockReward
if config.HasECIP1017() { if config.HasECIP1017() {
// Ensure value 'era' is configured. // Ensure value 'era' is configured.
eraLen := config.ECIP1017EraRounds eraLen := config.ECIP1017EraRounds
@ -799,3 +850,37 @@ func GetBlockEra(blockNum, eraLength *big.Int) *big.Int {
return new(big.Int).Sub(d, dremainder) return new(big.Int).Sub(d, dremainder)
} }
// callistoAccumulateRewards()
func callistoAccumulateRewards(config *params.ChainConfig, state *state.StateDB, header *types.Header, uncles []*types.Header) {
// Select the correct block reward based on chain progression
blockReward := CLOMinerReward
clotreasury := CLOTreasuryReward
clostake := CLOStakeReward
clohf1treasury := CLOHF1TreasuryReward
clohf1stake := CLOHF1StakeReward
// Accumulate the rewards for the miner and any included uncles
reward := new(big.Int).Set(blockReward)
r := new(big.Int)
for _, uncle := range uncles {
r.Add(uncle.Number, big8)
r.Sub(r, header.Number)
r.Mul(r, blockReward)
r.Div(r, big8)
state.AddBalance(uncle.Coinbase, r)
r.Div(blockReward, big32)
reward.Add(reward, r)
}
// Activate Callisto hardfork
if config.IsCLOHF1(header.Number) {
state.AddBalance(header.Coinbase, reward)
state.AddBalance(common.HexToAddress("0x74682Fc32007aF0b6118F259cBe7bCCC21641600"), clohf1treasury)
state.AddBalance(common.HexToAddress("0x3c06f218Ce6dD8E2c535a8925A2eDF81674984D9"), clohf1stake)
} else {
state.AddBalance(header.Coinbase, reward)
state.AddBalance(common.HexToAddress("0x74682Fc32007aF0b6118F259cBe7bCCC21641600"), clotreasury)
state.AddBalance(common.HexToAddress("0x3c06f218Ce6dD8E2c535a8925A2eDF81674984D9"), clostake)
}
}

View file

@ -159,8 +159,8 @@ func SetupGenesisBlock(db ethdb.Database, genesis *Genesis) (*params.ChainConfig
stored := rawdb.ReadCanonicalHash(db, 0) stored := rawdb.ReadCanonicalHash(db, 0)
if (stored == common.Hash{}) { if (stored == common.Hash{}) {
if genesis == nil { if genesis == nil {
log.Info("Writing default main-net genesis block") log.Info("Writing default Callisto main-net genesis block")
genesis = DefaultGenesisBlock() genesis = DefaultCallistoGenesisBlock()
} else { } else {
log.Info("Writing custom genesis block") log.Info("Writing custom genesis block")
} }
@ -213,10 +213,10 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
return params.MainnetChainConfig return params.MainnetChainConfig
case ghash == params.TestnetGenesisHash: case ghash == params.TestnetGenesisHash:
return params.TestnetChainConfig return params.TestnetChainConfig
case ghash == params.EllaismGenesisHash:
return params.EllaismChainConfig
case ghash == params.SocialGenesisHash: case ghash == params.SocialGenesisHash:
return params.SocialChainConfig return params.SocialChainConfig
case ghash == params.CallistoGenesisHash:
return params.CallistoChainConfig
default: default:
return params.AllEthashProtocolChanges return params.AllEthashProtocolChanges
} }
@ -313,18 +313,6 @@ func DefaultGenesisBlock() *Genesis {
} }
} }
// EllaismGenesisBlock returns the Ellaism genesis block.
func DefaultEllaismGenesisBlock() *Genesis {
return &Genesis{
Config: params.EllaismChainConfig,
Nonce: 64,
ExtraData: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000"),
GasLimit: 5000,
Difficulty: big.NewInt(1073741824),
Alloc: decodePrealloc(ellaismAllocData),
}
}
// ClassicGenesisBlock returns the Ethereum Classic genesis block. // ClassicGenesisBlock returns the Ethereum Classic genesis block.
func DefaultClassicGenesisBlock() *Genesis { func DefaultClassicGenesisBlock() *Genesis {
return &Genesis{ return &Genesis{
@ -349,6 +337,21 @@ func DefaultSocialGenesisBlock() *Genesis {
} }
} }
// DefaultCallistoGenesisBlock
func DefaultCallistoGenesisBlock() *Genesis {
return &Genesis{
Config: params.CallistoChainConfig,
ExtraData: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000"),
GasLimit: 10400000,
Difficulty: big.NewInt(524288),
Timestamp: 1519622213,
Nonce: 0,
Coinbase: common.HexToAddress("0xc3F70b10CE5EC4aA47ce44Eb0B7900A883cd45Dd"),
Mixhash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
Alloc: decodePrealloc(callistoAllocData),
}
}
// DefaultTestnetGenesisBlock returns the Ropsten network genesis block. // DefaultTestnetGenesisBlock returns the Ropsten network genesis block.
func DefaultTestnetGenesisBlock() *Genesis { func DefaultTestnetGenesisBlock() *Genesis {
return &Genesis{ return &Genesis{

File diff suppressed because one or more lines are too long

View file

@ -31,9 +31,9 @@ import (
) )
func TestDefaultGenesisBlock(t *testing.T) { func TestDefaultGenesisBlock(t *testing.T) {
block := DefaultGenesisBlock().ToBlock(nil) block := DefaultCallistoGenesisBlock().ToBlock(nil)
if block.Hash() != params.MainnetGenesisHash { if block.Hash() != params.CallistoGenesisHash {
t.Errorf("wrong mainnet genesis hash, got %v, want %v", block.Hash(), params.MainnetGenesisHash) t.Errorf("wrong mainnet genesis hash, got %v, want %v", block.Hash(), params.CallistoGenesisHash)
} }
block = DefaultTestnetGenesisBlock().ToBlock(nil) block = DefaultTestnetGenesisBlock().ToBlock(nil)
if block.Hash() != params.TestnetGenesisHash { if block.Hash() != params.TestnetGenesisHash {
@ -73,17 +73,17 @@ func TestSetupGenesis(t *testing.T) {
fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) { fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
return SetupGenesisBlock(db, nil) return SetupGenesisBlock(db, nil)
}, },
wantHash: params.MainnetGenesisHash, wantHash: params.CallistoGenesisHash,
wantConfig: params.MainnetChainConfig, wantConfig: params.CallistoChainConfig,
}, },
{ {
name: "mainnet block in DB, genesis == nil", name: "mainnet block in DB, genesis == nil",
fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) { fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
DefaultGenesisBlock().MustCommit(db) DefaultCallistoGenesisBlock().MustCommit(db)
return SetupGenesisBlock(db, nil) return SetupGenesisBlock(db, nil)
}, },
wantHash: params.MainnetGenesisHash, wantHash: params.CallistoGenesisHash,
wantConfig: params.MainnetChainConfig, wantConfig: params.CallistoChainConfig,
}, },
{ {
name: "custom block in DB, genesis == nil", name: "custom block in DB, genesis == nil",

View file

@ -152,12 +152,6 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) {
config.EthereumNetworkID = 3 config.EthereumNetworkID = 3
} }
} }
if config.EthereumGenesis == EllaismGenesis() {
genesis.Config = params.EllaismChainConfig
if config.EthereumNetworkID == 1 {
config.EthereumNetworkID = 64
}
}
if config.EthereumGenesis == SocialGenesis() { if config.EthereumGenesis == SocialGenesis() {
genesis.Config = params.SocialChainConfig genesis.Config = params.SocialChainConfig
if config.EthereumNetworkID == 1 { if config.EthereumNetworkID == 1 {

View file

@ -32,18 +32,18 @@ func MainnetGenesis() string {
return "" return ""
} }
// EllaismGenesis returns the JSON spec to use for the Ellaism network. // SocialGenesis returns the JSON spec to use for the Ethereum Social network.
func EllaismGenesis() string { func SocialGenesis() string {
enc, err := json.Marshal(core.DefaultEllaismGenesisBlock()) enc, err := json.Marshal(core.DefaultSocialGenesisBlock())
if err != nil { if err != nil {
panic(err) panic(err)
} }
return string(enc) return string(enc)
} }
// SocialGenesis returns the JSON spec to use for the Ethereum Social network. // CallistoGenesis returns the JSON spec to use for the Callisto network.
func SocialGenesis() string { func CallistoGenesis() string {
enc, err := json.Marshal(core.DefaultSocialGenesisBlock()) enc, err := json.Marshal(core.DefaultCallistoGenesisBlock())
if err != nil { if err != nil {
panic(err) panic(err)
} }

View file

@ -57,11 +57,11 @@ func DefaultDataDir() string {
home := homeDir() home := homeDir()
if home != "" { if home != "" {
if runtime.GOOS == "darwin" { if runtime.GOOS == "darwin" {
return filepath.Join(home, "Library", "Ethereum") return filepath.Join(home, "Library", "Callisto")
} else if runtime.GOOS == "windows" { } else if runtime.GOOS == "windows" {
return filepath.Join(home, "AppData", "Roaming", "Ethereum") return filepath.Join(home, "AppData", "Roaming", "Callisto")
} else { } else {
return filepath.Join(home, ".ethereum") return filepath.Join(home, ".callisto")
} }
} }
// As we cannot guess a stable location, return empty and handle later // As we cannot guess a stable location, return empty and handle later

View file

@ -30,20 +30,6 @@ var MainnetBootnodes = []string{
"enode://979b7fa28feeb35a4741660a16076f1943202cb72b6af70d327f053e248bab9ba81760f39d0701ef1d8f89cc1fbd2cacba0710a12cd5314d5e0c9021aa3637f9@5.1.83.226:30303", // DE "enode://979b7fa28feeb35a4741660a16076f1943202cb72b6af70d327f053e248bab9ba81760f39d0701ef1d8f89cc1fbd2cacba0710a12cd5314d5e0c9021aa3637f9@5.1.83.226:30303", // DE
} }
// EllaismBootnodes are the enode URLs of the P2P bootstrap nodes running on
// the Ellaism network.
var EllaismBootnodes = []string{
"enode://0d88e242aa0b01ee306ca43e956174677c96ec8eba4197f4d8be6fd7d4f2e57731e95d533b88229b66eb1a44399d870e99b7a4fe6547c8c80cdf00407a986e14@94.130.237.158:30303",
"enode://4be9e419d3efb0214faf3ef1794a0c33ebbd7633ece734a0a956faa166fefc496b2692a2a485adc66af805e461ba3e12f8d3941ec207e56bb9f3d3626787a705@94.130.237.158:60606",
"enode://834246cc2a7584df29ccdcf3b5366f118a0e291264980376769e809665a02c4caf0d68c43eecf8390dbeaf861823b05583807af0a62542a1f3f717046b958a76@45.77.106.33:30303",
"enode://d8059dcb137cb52b8960ca82613eeba1d121105572decd8f1d3ea22b09070645eeab548d2a3cd2914f206e1331c7870bd2bd5a231ebac6b3d4886ec3b8e627e5@173.212.216.105:30303",
"enode://9215ad77bd081e35013cb42a8ceadff9d8e94a78fcc680dff1752a54e7484badff0904e331c4b40a68be593782e55acfd800f076d22f9d2832e8483733ade149@213.14.82.125:30303",
"enode://5dd35866da95aea15211fb1f98684f6e8c4e355e6aa3cc17585680ed53fa164477b8c52cb6ca4b24ec4d80f3d48ff9212b53feb131d825c7945a3abaaf02d24d@178.79.189.58:60606",
"enode://6c585c18024eb902ca093278af73b04863ac904caabc39ac2920c23532307c572ad92afd828a990c980d272b1f26307f2409cc97aec3ff9fe866732cae49a8c2@144.217.163.224:31337",
"enode://edd90c4cc64528802ad52fd127d80b641ff80fd43fa5292fb111c8bd2914482dffee288fd1b0d26440c6b2c669b10a53cbcd37c895ba0d6194110e100a965b2d@188.166.179.159:30303",
"enode://9d960373335c1cc38ca696dea8f2893e2a071c8f21524f21e8aae22be032acc3b67797b1d21e866f9d832943ae7d9555b8466c6ab34f473d21e547114952df37@213.32.53.183:30303",
}
// ClassicBootnodes are the enode URLs of the P2P bootstrap nodes running on // ClassicBootnodes are the enode URLs of the P2P bootstrap nodes running on
// the Ethereum Classic network. // the Ethereum Classic network.
var ClassicBootnodes = []string{ var ClassicBootnodes = []string{
@ -53,19 +39,33 @@ var ClassicBootnodes = []string{
"enode://42d8f29d1db5f4b2947cd5c3d76c6d0d3697e6b9b3430c3d41e46b4bb77655433aeedc25d4b4ea9d8214b6a43008ba67199374a9b53633301bca0cd20c6928ab@104.155.176.151:30303", "enode://42d8f29d1db5f4b2947cd5c3d76c6d0d3697e6b9b3430c3d41e46b4bb77655433aeedc25d4b4ea9d8214b6a43008ba67199374a9b53633301bca0cd20c6928ab@104.155.176.151:30303",
"enode://814920f1ec9510aa9ea1c8f79d8b6e6a462045f09caa2ae4055b0f34f7416fca6facd3dd45f1cf1673c0209e0503f02776b8ff94020e98b6679a0dc561b4eba0@104.154.136.117:30303", "enode://814920f1ec9510aa9ea1c8f79d8b6e6a462045f09caa2ae4055b0f34f7416fca6facd3dd45f1cf1673c0209e0503f02776b8ff94020e98b6679a0dc561b4eba0@104.154.136.117:30303",
"enode://72e445f4e89c0f476d404bc40478b0df83a5b500d2d2e850e08eb1af0cd464ab86db6160d0fde64bd77d5f0d33507ae19035671b3c74fec126d6e28787669740@104.198.71.200:30303", "enode://72e445f4e89c0f476d404bc40478b0df83a5b500d2d2e850e08eb1af0cd464ab86db6160d0fde64bd77d5f0d33507ae19035671b3c74fec126d6e28787669740@104.198.71.200:30303",
"enode://5cd218959f8263bc3721d7789070806b0adff1a0ed3f95ec886fb469f9362c7507e3b32b256550b9a7964a23a938e8d42d45a0c34b332bfebc54b29081e83b93@35.187.57.94:30303",
"enode://39abab9d2a41f53298c0c9dc6bbca57b0840c3ba9dccf42aa27316addc1b7e56ade32a0a9f7f52d6c5db4fe74d8824bcedfeaecf1a4e533cacb71cf8100a9442@144.76.238.49:30303", "enode://39abab9d2a41f53298c0c9dc6bbca57b0840c3ba9dccf42aa27316addc1b7e56ade32a0a9f7f52d6c5db4fe74d8824bcedfeaecf1a4e533cacb71cf8100a9442@144.76.238.49:30303",
"enode://f50e675a34f471af2438b921914b5f06499c7438f3146f6b8936f1faeb50b8a91d0d0c24fb05a66f05865cd58c24da3e664d0def806172ddd0d4c5bdbf37747e@144.76.238.49:30306", "enode://f50e675a34f471af2438b921914b5f06499c7438f3146f6b8936f1faeb50b8a91d0d0c24fb05a66f05865cd58c24da3e664d0def806172ddd0d4c5bdbf37747e@144.76.238.49:30306",
"enode://6dd3ac8147fa82e46837ec8c3223d69ac24bcdbab04b036a3705c14f3a02e968f7f1adfcdb002aacec2db46e625c04bf8b5a1f85bb2d40a479b3cc9d45a444af@104.237.131.102:30303",
} }
// SocialBootnodes are the enode URLs of the P2P bootstrap nodes running on // SocialBootnodes are the enode URLs of the P2P bootstrap nodes running on
// the Ethereum Social network. // the Ethereum Social network.
var SocialBootnodes = []string{ var SocialBootnodes = []string{
"enode://54d0824a268747046b6cabc7ee3afda48edba319f0d175e9e505aa9d425a1872b8b6f9ebf8f3b0a10dc7611a4c44ddec0fc691e5a5cde23e06fc4e4b3ff9dbef@13.125.185.147:30303", "enode://38a3bdd683008f2b404fbd8e59a4ae7377fb1b796be8aca02861a6864304df7f443ae9669d0072d567eb30ab2183556a3cd832b8f2c99246e9a3d9f64ecdc1af@52.78.243.91:30303",
"enode://7e150d47637177f675e20d663fc2500987f2149332caf23da522d92363be8a7880ef9150a6183e9031288a441e0457239474967a111eafce17e19a4288076ea9@18.219.40.235:30303", "enode://ee31120190438ca3842afccca9d732d8bfca4bbf9b846fd2bb11178194aa49a74d77ff4801d50a7bd9eb3629f8903661d0fb973e7f43b395263530b390002033@13.209.99.197:30303",
"enode://6244c9d9cd288015d7ff165e90f3bb5649e34467e095a47c6d3c56e8fb8c849b3b4db683ff3c7ae8a654bbdc07ef12ee2fd7d72831ac213723281c1b0cc90599@13.250.220.98:30303", "enode://d538165bf6026602ba9ac296b2b56994e03bb917c73b79cbb11df75a45576fa74df494097bdbcda9bf2c0954a47a65b65674780fa1fbde5bcc89a34870d44983@13.125.206.82:30303",
"enode://e39f162b9f4b6ed6f098550f7867c2fb068fc66f362b3db0f45124c43ea18508f5ceef4e0e4de53d301e14a6f1683226aeb931d7401b4e83b5a583153ffdd7fd@52.57.98.157:30303", "enode://67b5de9a4562ba0a01877e3876249c8e551844424773bdbf9713d126b3f144ac7a49d8eb06fc9830871f03b50a7d9b5d98d9d1be5544aef8afcaa10eea2fb9eb@13.125.68.29:30303",
"enode://54b4a117d66dc3aa93358dec1b31d4f38e72e4381b3e28a65ac6f1aaac3b304ebbe41d32cc864fa69a9a6815c34cf9b8965690dc174a5f72af14547b601b7924@222.239.255.71:30303", "enode://2d31dd1f8acd956cf36a1c3f27e374f5b94c55df4206749b03a6d0a50366c8090280c91f71aad00886cbde6ebbfcabeaaa91bd910b16e4fb398b337e9ecfdbd9@13.125.232.71:30303",
"enode://851f14c5cc86cbc0a81acfcbe5dd99ad5c823435357219df736932c5f89ad4318f6973a553857a32d97a71793f5a35c062d46320be282aa0a80b06b9c6b624e4@13.125.232.71:30303", }
// CallistoBootnodes are the enode URLs of the P2P bootstrap nodes running on
// the Callisto network.
var CallistoBootnodes = []string{
"enode://ab0d9fe81f23653c3217303d3a4bc035be908b05f8b12d6f155ab4598d7760cfea1e009e414771279c9ffc3499950283afaabe099a5329c5a6013f57d77de0a6@104.236.96.118:30303",
"enode://9e2d9dc2639e02893aa17c80e6ba8e8803fd3166083b622a841fc852161112720281514436f7605c89041d5efa1738215185c4c4024ff812b0f500c403cc0ab1@206.189.47.198:30303",
"enode://149ba679e8851c3e0d030e0dc0336984b97c83ef649e68ec113dcf266449364cc1ec8ee27950f71b00c2182ef504894fa7bff19f6741978ced67e9e4b6536d2a@206.189.45.31:30303",
"enode://2038f895f0870f76456a879b97a276135418295ff9f6e24b6de11225360adc87d3aa6d90302aafb36a4cd9542eaf0f160ae48439da938d7e3031d838ef11b8e8@13.125.216.165:30303", // clopool.net
"enode://b292d40b86dc73b42b0da20b146957e5a06a4f09b2d77b26d07ca34a0e7b5f06972e1b589722b1b3591c8126b61d40d88a1ee32990451e2baa9df563d34668e4@13.125.242.67:30303", // clopool.net
"enode://ae7b2bfa18c137b8f4e4a3f1485d734b40198531916bcf59637bc09ad6b4e310d1077d9bd8f5aa7d8271b97673e28595e73d81b7b8c9a862c78f11fb8aa4f6a0@13.125.194.99:30303", // clopool.net
"enode://09fdeea69fce23dd021d9db2930e508c1a0741c56a0ae7efceb0203a562838412dd389ff94bc3b5b888eec7a16bd1960734efc551ffbb95ad72b698a9105e5d4@13.209.49.184:30303", // clopool.net
"enode://8285433aecaf42dc9372bff4d44f119cc58db93b5caa169f8763db777112cd55a2d6a18370560cfad8b78196fe8c9f39ec7e30bdba274bc74c11f152028e6980@52.78.148.64:30303", // clopool.net
} }
// TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the // TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the

View file

@ -18,6 +18,7 @@ package params
import ( import (
"fmt" "fmt"
"math"
"math/big" "math/big"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
@ -25,10 +26,10 @@ import (
// Genesis hashes to enforce below configs on. // Genesis hashes to enforce below configs on.
var ( var (
MainnetGenesisHash = common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3") MainnetGenesisHash = common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3")
TestnetGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d") TestnetGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d")
EllaismGenesisHash = common.HexToHash("0x4d7df65052bb21264d6ad2d6fe2d5578a36be12f71bf8d0559b0c15c4dc539b5") SocialGenesisHash = common.HexToHash("0xba8314d5c2ebddaf58eb882b364b27cbfa4d3402dacd32b60986754ac25cfe8d")
SocialGenesisHash = common.HexToHash("0xba8314d5c2ebddaf58eb882b364b27cbfa4d3402dacd32b60986754ac25cfe8d") CallistoGenesisHash = common.HexToHash("0x82270b80fc90beb005505a9ef95039639968a0e81b2904ad30128c93d713d2c4")
) )
var ( var (
@ -44,31 +45,11 @@ var (
EIP158Block: big.NewInt(2675000), EIP158Block: big.NewInt(2675000),
ByzantiumBlock: big.NewInt(4370000), ByzantiumBlock: big.NewInt(4370000),
DisposalBlock: nil, DisposalBlock: nil,
SocialBlock: nil,
ConstantinopleBlock: nil, ConstantinopleBlock: nil,
Ethash: new(EthashConfig), Ethash: new(EthashConfig),
} }
// EllaismChainConfig is the chain parameters to run a node on the Ellaism main network. // ClassicChainConfig is the chain parameters to run a node on the Ethereum Classic main network.
EllaismChainConfig = &ChainConfig{
ChainID: big.NewInt(64),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
EIP150Block: big.NewInt(0),
EIP150Hash: common.HexToHash("0x4d7df65052bb21264d6ad2d6fe2d5578a36be12f71bf8d0559b0c15c4dc539b5"),
EIP155Block: big.NewInt(0),
EIP158Block: nil,
ByzantiumBlock: nil,
DisposalBlock: big.NewInt(0),
SocialBlock: nil,
ConstantinopleBlock: nil,
ECIP1017EraRounds: big.NewInt(10000000),
EIP160Block: big.NewInt(0),
Ethash: new(EthashConfig),
}
// ClassicChainConfig is the chain parameters to run a node on the Ellaism main network.
ClassicChainConfig = &ChainConfig{ ClassicChainConfig = &ChainConfig{
ChainID: big.NewInt(61), ChainID: big.NewInt(61),
HomesteadBlock: big.NewInt(1150000), HomesteadBlock: big.NewInt(1150000),
@ -80,7 +61,6 @@ var (
EIP158Block: nil, EIP158Block: nil,
ByzantiumBlock: nil, ByzantiumBlock: nil,
DisposalBlock: big.NewInt(5900000), DisposalBlock: big.NewInt(5900000),
SocialBlock: nil,
ConstantinopleBlock: nil, ConstantinopleBlock: nil,
ECIP1017EraRounds: big.NewInt(5000000), ECIP1017EraRounds: big.NewInt(5000000),
EIP160Block: big.NewInt(3000000), EIP160Block: big.NewInt(3000000),
@ -101,13 +81,29 @@ var (
EIP158Block: nil, EIP158Block: nil,
ByzantiumBlock: nil, ByzantiumBlock: nil,
DisposalBlock: big.NewInt(0), DisposalBlock: big.NewInt(0),
SocialBlock: big.NewInt(0),
ConstantinopleBlock: nil, ConstantinopleBlock: nil,
ECIP1017EraRounds: big.NewInt(5000000), ECIP1017EraRounds: big.NewInt(5000000),
EIP160Block: big.NewInt(0), EIP160Block: big.NewInt(0),
Ethash: new(EthashConfig), Ethash: new(EthashConfig),
} }
// CallistoChainConfig is the chain parameters to run a node on the Callisto main network.
CallistoChainConfig = &ChainConfig{
ChainID: big.NewInt(820),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: false,
EIP150Block: big.NewInt(0),
EIP150Hash: common.HexToHash("0x82270b80fc90beb005505a9ef95039639968a0e81b2904ad30128c93d713d2c4"),
EIP155Block: big.NewInt(10),
EIP158Block: big.NewInt(10),
ByzantiumBlock: big.NewInt(20),
DisposalBlock: nil,
ConstantinopleBlock: nil,
CLOHF1Block: big.NewInt(math.MaxInt64), // Don't enable yet
Ethash: new(EthashConfig),
}
// TestnetChainConfig contains the chain parameters to run a node on the Ropsten test network. // TestnetChainConfig contains the chain parameters to run a node on the Ropsten test network.
TestnetChainConfig = &ChainConfig{ TestnetChainConfig = &ChainConfig{
ChainID: big.NewInt(3), ChainID: big.NewInt(3),
@ -120,7 +116,6 @@ var (
EIP158Block: big.NewInt(10), EIP158Block: big.NewInt(10),
ByzantiumBlock: big.NewInt(1700000), ByzantiumBlock: big.NewInt(1700000),
DisposalBlock: nil, DisposalBlock: nil,
SocialBlock: nil,
ConstantinopleBlock: nil, ConstantinopleBlock: nil,
Ethash: new(EthashConfig), Ethash: new(EthashConfig),
} }
@ -137,7 +132,6 @@ var (
EIP158Block: big.NewInt(3), EIP158Block: big.NewInt(3),
ByzantiumBlock: big.NewInt(1035301), ByzantiumBlock: big.NewInt(1035301),
DisposalBlock: nil, DisposalBlock: nil,
SocialBlock: nil,
ConstantinopleBlock: nil, ConstantinopleBlock: nil,
Clique: &CliqueConfig{ Clique: &CliqueConfig{
Period: 15, Period: 15,
@ -183,7 +177,6 @@ type ChainConfig struct {
EIP155Block *big.Int `json:"eip155Block,omitempty"` // EIP155 HF block EIP155Block *big.Int `json:"eip155Block,omitempty"` // EIP155 HF block
EIP158Block *big.Int `json:"eip158Block,omitempty"` // EIP158 HF block EIP158Block *big.Int `json:"eip158Block,omitempty"` // EIP158 HF block
DisposalBlock *big.Int `json:"disposalBlock,omitempty"` // Bomb disposal HF block DisposalBlock *big.Int `json:"disposalBlock,omitempty"` // Bomb disposal HF block
SocialBlock *big.Int `json:"socialBlock,omitempty"` // Ethereum Social Reward block
ByzantiumBlock *big.Int `json:"byzantiumBlock,omitempty"` // Byzantium switch block (nil = no fork, 0 = already on byzantium) ByzantiumBlock *big.Int `json:"byzantiumBlock,omitempty"` // Byzantium switch block (nil = no fork, 0 = already on byzantium)
ConstantinopleBlock *big.Int `json:"constantinopleBlock,omitempty"` // Constantinople switch block (nil = no fork, 0 = already activated) ConstantinopleBlock *big.Int `json:"constantinopleBlock,omitempty"` // Constantinople switch block (nil = no fork, 0 = already activated)
@ -194,6 +187,8 @@ type ChainConfig struct {
ECIP1010PauseBlock *big.Int `json:"ecip1010PauseBlock,omitempty"` // ECIP1010 pause HF block ECIP1010PauseBlock *big.Int `json:"ecip1010PauseBlock,omitempty"` // ECIP1010 pause HF block
ECIP1010Length *big.Int `json:"ecip1010Length,omitempty"` // ECIP1010 length ECIP1010Length *big.Int `json:"ecip1010Length,omitempty"` // ECIP1010 length
CLOHF1Block *big.Int `json:"clohf1Block,omitempty"` // Callisto Hardfork 1 block
// Various consensus engines // Various consensus engines
Ethash *EthashConfig `json:"ethash,omitempty"` Ethash *EthashConfig `json:"ethash,omitempty"`
Clique *CliqueConfig `json:"clique,omitempty"` Clique *CliqueConfig `json:"clique,omitempty"`
@ -229,7 +224,7 @@ func (c *ChainConfig) String() string {
default: default:
engine = "unknown" engine = "unknown"
} }
return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Disposal: %v Social: %v ECIP1017: %v EIP160: %v ECIP1010PauseBlock: %v ECIP1010Length: %v Constantinople: %v Engine: %v}", return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Disposal: %v ECIP1017: %v EIP160: %v ECIP1010PauseBlock: %v ECIP1010Length: %v CLOHF1: %v Constantinople: %v Engine: %v}",
c.ChainID, c.ChainID,
c.HomesteadBlock, c.HomesteadBlock,
c.DAOForkBlock, c.DAOForkBlock,
@ -239,11 +234,11 @@ func (c *ChainConfig) String() string {
c.EIP158Block, c.EIP158Block,
c.ByzantiumBlock, c.ByzantiumBlock,
c.DisposalBlock, c.DisposalBlock,
c.SocialBlock,
c.ECIP1017EraRounds, c.ECIP1017EraRounds,
c.EIP160Block, c.EIP160Block,
c.ECIP1010PauseBlock, c.ECIP1010PauseBlock,
c.ECIP1010Length, c.ECIP1010Length,
c.CLOHF1Block,
c.ConstantinopleBlock, c.ConstantinopleBlock,
engine, engine,
) )
@ -302,14 +297,14 @@ func (c *ChainConfig) IsBombDisposal(num *big.Int) bool {
return isForked(c.DisposalBlock, num) return isForked(c.DisposalBlock, num)
} }
func (c *ChainConfig) IsSocial(num *big.Int) bool {
return isForked(c.SocialBlock, num)
}
func (c *ChainConfig) IsECIP1010(num *big.Int) bool { func (c *ChainConfig) IsECIP1010(num *big.Int) bool {
return isForked(c.ECIP1010PauseBlock, num) return isForked(c.ECIP1010PauseBlock, num)
} }
func (c *ChainConfig) IsCLOHF1(num *big.Int) bool {
return isForked(c.CLOHF1Block, num)
}
// GasTable returns the gas table corresponding to the current phase (homestead or homestead reprice). // GasTable returns the gas table corresponding to the current phase (homestead or homestead reprice).
// //
// The returned GasTable's fields shouldn't, under any circumstances, be changed. // The returned GasTable's fields shouldn't, under any circumstances, be changed.