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

Refactor/splitting testnet #225

Merged
merged 20 commits into from Aug 20, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -60,7 +60,7 @@ steps:

services:
- name: kosu-geth
image: gcr.io/kosu-io/kosu-geth:0.1.1
image: gcr.io/kosu-io/kosu-test-geth:latest
pull: always
ports:
- 8545

Large diffs are not rendered by default.

@@ -3,6 +3,7 @@ services:
kosu:
build:
context: .
dockerfile: kosu.Dockerfile
ports:
- 8545:8545
- 8546:8546
@@ -0,0 +1,73 @@
{
"config": {
"chainId": 6175,
"homesteadBlock": 1,
"eip150Block": 2,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 3,
"eip158Block": 3,
"byzantiumBlock": 4,
"constantinopleBlock": 5,
"clique": {
"period": 0,
"epoch": 30000
}
},
"nonce": "0x0",
"timestamp": "0x5cda3873",
"extraData": "0x000000000000000000000000000000000000000000000000000000000000000054e60bccc86a7bad4bc68e36a8fde0f369ae849e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x800000",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"54E60Bccc86A7Bad4BC68E36a8fde0F369aE849E": {
"balance": "0x20000000000000000000000000000000000000"
},
"1d28a7dab71b6db9c98685c1ab42fc17b7a1c8b5": {
"balance": "0x2000000000000000000000000"
},
"50f6868fab37acb8f8dadea6f4cb3c4fb963f0e6": {
"balance": "0x2000000000000000000000000"
},
"6cf611f360411b5671f13bd977b08684934d58a9": {
"balance": "0x2000000000000000000000000"
},
"d42a4446d5850737376b0e63a2c14427f00b4af3": {
"balance": "0x2000000000000000000000000"
},
"d83fb89fd79a844597a2a6a0eac90055bc2bc6ca": {
"balance": "0x2000000000000000000000000"
},
"96ad1a6fd863048f60d4c4545011529a3362af8a": {
"balance": "0x2000000000000000000000000"
},
"c0c1cfd67e8af5e02ed01331c2dfec097e6401eb": {
"balance": "0x2000000000000000000000000"
},
"96b1f8872935251d50e890516081013ec9e761b2": {
"balance": "0x2000000000000000000000000"
},
"2ee235eaacc8da24de980e138da45791c84ed6e6": {
"balance": "0x2000000000000000000000000"
},
"AA554D0c5ff879387Fc234dE5D22EC02983baA27": {
"balance": "0x2000000000000000000000000"
},
"7ed8E5d7884FF0Be732479a475ACB82f229C9e35": {
"balance": "0x2000000000000000000000000"
},
"C521f483F607eB5EA4d6b2dfdBD540134753a865": {
"balance": "0x2000000000000000000000000"
},
"8b366a3d4e46aC5406F12766Ad33E6482Ce4F081": {
"balance": "0x2000000000000000000000000"
},
"5409ed021d9299bf6814279a6a1411a7e866a631": {
"balance": "0x2000000000000000000000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
File renamed without changes.
@@ -0,0 +1,16 @@
FROM ethereum/client-go:v1.8.27

COPY genesis-kosu-test.json accounts passwords ./
RUN mkdir keystore/
COPY keystore/* keystore/

RUN geth init genesis-kosu-test.json --datadir .

ENTRYPOINT geth \
--datadir . \
--networkid 6175 \
--unlock="`cat accounts`" \
--password=./passwords \
--etherbase "0x54E60Bccc86A7Bad4BC68E36a8fde0F369aE849E" --mine \
--rpc --rpcaddr '0.0.0.0' --rpccorsdomain '*' --rpcvhosts '*' --rpcapi 'personal,db,eth,net,web3,txpool,miner,debug' \
--ws --wsaddr '0.0.0.0' --wsapi 'personal,db,eth,net,web3,txpool,miner,debug' --wsorigins '*'
@@ -1,10 +1,10 @@
FROM ethereum/client-go:v1.8.27

COPY genesis.json accounts passwords ./
COPY genesis-kosu.json accounts passwords ./
RUN mkdir keystore/
COPY keystore/* keystore/

RUN geth init genesis.json --datadir .
RUN geth init genesis-kosu.json --datadir .

ENTRYPOINT geth \
--datadir . \
@@ -7,8 +7,10 @@
"geth:clean": "geth removedb --datadir .",
"geth:init": "yarn geth:clean && geth init genesis.json --datadir .",
"geth:start:old": "geth --datadir . --networkid 6174 --rpc --rpcaddr '0.0.0.0' --unlock=\"`cat accounts`\" --password=./passwords --etherbase \"0x54E60Bccc86A7Bad4BC68E36a8fde0F369aE849E\" --mine --rpccorsdomain '*' --rpcapi 'personal,db,eth,net,web3,txpool,miner,debug' console",
"geth:start": "docker-compose up --force-recreate --build",
"build:geth": "scripts/build-and-push-geth-image.sh ${npm_package_config_image_host} kosu-geth ${npm_package_version}"
"kosu:start": "docker-compose up --force-recreate --build",
"build:kosu": "scripts/build-and-push-geth-image.sh kosu.Dockerfile ${npm_package_config_image_host} kosu-geth ${npm_package_version}",
"build:kosu-test": "scripts/build-and-push-geth-image.sh kosu-test.Dockerfile ${npm_package_config_image_host} kosu-test-geth ${npm_package_version}",
"build_and_push": "yarn build:kosu && yarn build:kosu-test"
},
"config": {
"image_host": "gcr.io/kosu-io"
@@ -1,18 +1,19 @@
#!/usr/bin/env bash

# image name passed in as args (including registry host)
IMAGE_HOST=$1
IMAGE_NAME=$2
IMAGE_VERSION=$3
DOCKER_FILE=$1
IMAGE_HOST=$2
IMAGE_NAME=$3
IMAGE_VERSION=$4

GCP_BUCKET_URI=$4
GCP_BUCKET_URI=$5

# full label of geth image to be built
IMAGE_LABEL_VERSION="$IMAGE_HOST/$IMAGE_NAME:$IMAGE_VERSION"
IMAGE_LABEL_LATEST="$IMAGE_HOST/$IMAGE_NAME:latest"

# build kosu-geth image, tag as latest and push both to GCR
docker build -t $IMAGE_LABEL_VERSION .
docker build -t $IMAGE_LABEL_VERSION . -f $DOCKER_FILE
docker tag $IMAGE_LABEL_VERSION $IMAGE_LABEL_LATEST
docker push $IMAGE_LABEL_VERSION
docker push $IMAGE_LABEL_LATEST
@@ -17,15 +17,15 @@ Below are the deployed addresses for the core Kosu protocol contract system on t

| Contract Name | Last Deploy Date | Deployed Address |
| ------------------------------------------------------------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [OrderGateway](./contracts/external/OrderGateway.sol) | 07/31/19 | [0x8c8c650a4b794623402357df8956278f5333e002](https://ropsten.etherscan.io/address/0x8c8c650a4b794623402357df8956278f5333e002) |
| [AuthorizedAddresses](./contracts/access_control/AuthorizedAddresses.sol) | 07/31/19 | [0x5281e5d8123e59857d99a78cbce96c021024ce46](https://ropsten.etherscan.io/address/0x5281e5d8123e59857d99a78cbce96c021024ce46) |
| [EventEmitter](./contracts/event/EventEmitter.sol) | 07/31/19 | [0x5e0aa07df76d4903766edf29ac2597ded90a9cda](https://ropsten.etherscan.io/address/0x5e0aa07df76d4903766edf29ac2597ded90a9cda) |
| [KosuToken](./contracts/lib/KosuToken.sol) | 07/31/19 | [0x99970336c078b5bebff7877d0b918937abe78633](https://ropsten.etherscan.io/address/0x99970336c078b5bebff7877d0b918937abe78633) |
| [Treasury](./contracts/treasury/Treasury.sol) | 07/31/19 | [0x83bf1084c42f2e310a60406a1d8b0e518d26f497](https://ropsten.etherscan.io/address/0x83bf1084c42f2e310a60406a1d8b0e518d26f497) |
| [Voting](./contracts/voting/Voting.sol) | 07/31/19 | [0xd91175d24d25fc3a63a8fad9ae49a6ef381d37e3](https://ropsten.etherscan.io/address/0xd91175d24d25fc3a63a8fad9ae49a6ef381d37e3) |
| [PosterRegistry](./contracts/poster/PosterRegistry.sol) | 07/31/19 | [0x339c8245af6a1bb23cb525a8c3b03639760ec006](https://ropsten.etherscan.io/address/0x339c8245af6a1bb23cb525a8c3b03639760ec006) |
| [ValidatorRegistry](./contracts/validator/ValidatorRegistry.sol) | 07/31/19 | [0x91a737e36a2cfd57f770971c7be9d33d4e790ed3](https://ropsten.etherscan.io/address/0x91a737e36a2cfd57f770971c7be9d33d4e790ed3) |
| [ZeroExV2SubContract](./contracts/sub-contracts/ZeroExV2SubContract.sol) | 07/31/19 | [0xe853c58ad71d10ae85cb65bfce7707f11e358e8b](https://ropsten.etherscan.io/address/0xe853c58ad71d10ae85cb65bfce7707f11e358e8b) |
| [OrderGateway](./contracts/external/OrderGateway.sol) | 08/19/19 | [0x6923508ce23c055bc6dac56cd4fbe81991f3224c](https://ropsten.etherscan.io/address/0x6923508ce23c055bc6dac56cd4fbe81991f3224c) |
| [AuthorizedAddresses](./contracts/access_control/AuthorizedAddresses.sol) | 08/19/19 | [0xe2476a0ffd3724f96bae24368922a512945997cf](https://ropsten.etherscan.io/address/0xe2476a0ffd3724f96bae24368922a512945997cf) |
| [EventEmitter](./contracts/event/EventEmitter.sol) | 08/19/19 | [0x16cb1e2b3d22a784c26d2e06788bf54153344de6](https://ropsten.etherscan.io/address/0x16cb1e2b3d22a784c26d2e06788bf54153344de6) |
| [KosuToken](./contracts/lib/KosuToken.sol) | 08/19/19 | [0xb47fd095e6387d78a0b72283e1aba18578506b51](https://ropsten.etherscan.io/address/0xb47fd095e6387d78a0b72283e1aba18578506b51) |
| [Treasury](./contracts/treasury/Treasury.sol) | 08/19/19 | [0xb5416eace99f62f03d67f213978045e414237bea](https://ropsten.etherscan.io/address/0xb5416eace99f62f03d67f213978045e414237bea) |
| [Voting](./contracts/voting/Voting.sol) | 08/19/19 | [0x09b9fa1250b9aa7fe7908eb4639c8fb7c43e3bcc](https://ropsten.etherscan.io/address/0x09b9fa1250b9aa7fe7908eb4639c8fb7c43e3bcc) |
| [PosterRegistry](./contracts/poster/PosterRegistry.sol) | 08/19/19 | [0xf293d08f3f642dd3aef8f219824cf8f553e347a3](https://ropsten.etherscan.io/address/0xf293d08f3f642dd3aef8f219824cf8f553e347a3) |
| [ValidatorRegistry](./contracts/validator/ValidatorRegistry.sol) | 08/19/19 | [0x6a1a5cb26e208e37f2a2c53fcc6e635857a348d6](https://ropsten.etherscan.io/address/0x6a1a5cb26e208e37f2a2c53fcc6e635857a348d6) |
| [ZeroExV2SubContract](./contracts/sub-contracts/ZeroExV2SubContract.sol) | 08/19/19 | [0xf2f7a7bb8984db3751333c895455f12825f2f9df](https://ropsten.etherscan.io/address/0xf2f7a7bb8984db3751333c895455f12825f2f9df) |

### Kosu Dev PoA

@@ -34,12 +34,12 @@ Below are the deployed addresses for the core Kosu protocol contract system on t

| Contract Name | Last Deploy Date | Deployed Address |
| ------------------------------------------------------------------------- | ---------------- | ------------------------------------------ |
| [OrderGateway](./contracts/external/OrderGateway.sol) | 07/31/19 | 0xb8fda6341f80cbae987ab5cd00dce502097e3152 |
| [AuthorizedAddresses](./contracts/access_control/AuthorizedAddresses.sol) | 07/31/19 | 0xe473109cb41c773fd2fe01e83c6e51356f9585d6 |
| [EventEmitter](./contracts/event/EventEmitter.sol) | 07/31/19 | 0x2f3afeff0914f33769cdfbf3fcf870c33b26c311 |
| [KosuToken](./contracts/lib/KosuToken.sol) | 07/31/19 | 0xcc868306d6188b2b12757a7c3926042b4d3c4e29 |
| [Treasury](./contracts/treasury/Treasury.sol) | 07/31/19 | 0x46572f9082dd2429c2c138fa9483a67d4f29d423 |
| [Voting](./contracts/voting/Voting.sol) | 07/31/19 | 0x5d60c93d8b48682cd387c8be7e9461b67ecfbea1 |
| [PosterRegistry](./contracts/poster/PosterRegistry.sol) | 07/31/19 | 0x7e6534b8205713246e91a14b462d2dbcac3ede17 |
| [ValidatorRegistry](./contracts/validator/ValidatorRegistry.sol) | 07/31/19 | 0x301bb008f2a8a3cae9918743fe43428551392773 |
| [ZeroExV2SubContract](./contracts/sub-contracts/ZeroExV2SubContract.sol) | 07/31/19 | 0x0265e7d1b094787cb13174e18a1cefc41279a6c9 |
| [OrderGateway](./contracts/external/OrderGateway.sol) | 08/19/19 | 0xb8fda6341f80cbae987ab5cd00dce502097e3152 |
| [AuthorizedAddresses](./contracts/access_control/AuthorizedAddresses.sol) | 08/19/19 | 0xe473109cb41c773fd2fe01e83c6e51356f9585d6 |
| [EventEmitter](./contracts/event/EventEmitter.sol) | 08/19/19 | 0x2f3afeff0914f33769cdfbf3fcf870c33b26c311 |
| [KosuToken](./contracts/lib/KosuToken.sol) | 08/19/19 | 0xcc868306d6188b2b12757a7c3926042b4d3c4e29 |
| [Treasury](./contracts/treasury/Treasury.sol) | 08/19/19 | 0x46572f9082dd2429c2c138fa9483a67d4f29d423 |
| [Voting](./contracts/voting/Voting.sol) | 08/19/19 | 0x5d60c93d8b48682cd387c8be7e9461b67ecfbea1 |
| [PosterRegistry](./contracts/poster/PosterRegistry.sol) | 08/19/19 | 0x7e6534b8205713246e91a14b462d2dbcac3ede17 |
| [ValidatorRegistry](./contracts/validator/ValidatorRegistry.sol) | 08/19/19 | 0x301bb008f2a8a3cae9918743fe43428551392773 |
| [ZeroExV2SubContract](./contracts/sub-contracts/ZeroExV2SubContract.sol) | 08/19/19 | 0x0265e7d1b094787cb13174e18a1cefc41279a6c9 |
@@ -45,7 +45,7 @@ if (args["test-mnemonic"] || !mnemonic) {

const networkId = await web3.eth.net.getId();

if (networkId === 6174) {
if ([6174, 6175].includes(networkId)) {
// @ts-ignore
await new BlockchainLifecycle(new Web3Wrapper(new Web3.providers.HttpProvider(args["rpc-url"]))).startAsync();
if ((await web3.eth.getTransactionCount(normalizedFromAddress)) > 0) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.