-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sim-merge: activate geth, commit ids as workflow env vars, simple txs…
… scenario, dockerized geth based config for tests (#3460) * activate geth and EL interop sim commits as workflow env vars * simple tx scenario and dockerized geth configs for local run * local dir cleanup
- Loading branch information
Showing
12 changed files
with
269 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash -x | ||
|
||
echo $TTD | ||
echo $DATA_DIR | ||
echo $scriptDir | ||
echo $EL_BINARY_DIR | ||
|
||
env TTD=$TTD envsubst < $scriptDir/genesisPre.tmpl > $DATA_DIR/genesis.json | ||
echo "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" > $DATA_DIR/sk.json | ||
echo "12345678" > $DATA_DIR/password.txt | ||
pubKey="0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" | ||
|
||
$EL_BINARY_DIR/geth --catalyst --datadir $DATA_DIR init $DATA_DIR/genesis.json | ||
$EL_BINARY_DIR/geth --catalyst --datadir $DATA_DIR account import $DATA_DIR/sk.json --password $DATA_DIR/password.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
#!/bin/bash -x | ||
|
||
scriptDir=$(dirname $0) | ||
. $scriptDir/common-setup.sh | ||
|
||
echo $TTD | ||
echo $DATA_DIR | ||
echo $scriptDir | ||
echo $EL_BINARY_DIR | ||
|
||
env TTD=$TTD envsubst < $scriptDir/genesisPost.tmpl > $DATA_DIR/genesis.json | ||
$EL_BINARY_DIR/geth --catalyst --datadir $DATA_DIR init $DATA_DIR/genesis.json | ||
$EL_BINARY_DIR/geth --catalyst --http --ws -http.api "engine,net,eth" --datadir $DATA_DIR | ||
$EL_BINARY_DIR/geth --catalyst --http --ws -http.api "engine,net,eth" --datadir $DATA_DIR --allow-insecure-unlock --unlock $pubKey --password $DATA_DIR/password.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,6 @@ | ||
#!/bin/bash -x | ||
|
||
scriptDir=$(dirname $0) | ||
. $scriptDir/common-setup.sh | ||
|
||
echo $TTD | ||
echo $DATA_DIR | ||
echo $scriptDir | ||
echo $EL_BINARY_DIR | ||
|
||
|
||
env TTD=$TTD envsubst < $scriptDir/genesisPre.tmpl > $DATA_DIR/genesis.json | ||
echo "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" > $DATA_DIR/sk.json | ||
echo "12345678" > $DATA_DIR/password.txt | ||
pubKey="0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" | ||
|
||
$EL_BINARY_DIR/geth --catalyst --datadir $DATA_DIR init $DATA_DIR/genesis.json | ||
$EL_BINARY_DIR/geth --catalyst --datadir $DATA_DIR account import $DATA_DIR/sk.json --password $DATA_DIR/password.txt | ||
$EL_BINARY_DIR/geth --catalyst --http --ws -http.api "engine,net,eth,miner" --datadir $DATA_DIR --allow-insecure-unlock --unlock $pubKey --password $DATA_DIR/password.txt --nodiscover --mine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Build Geth in a stock Go builder container | ||
FROM golang:1.17-alpine as builder | ||
|
||
RUN apk add --no-cache gcc musl-dev linux-headers git | ||
|
||
RUN git clone --depth 1 -b kintsugi-spec https://github.com/MariusVanDerWijden/go-ethereum.git /go-ethereum | ||
RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth | ||
|
||
FROM alpine:latest | ||
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ | ||
|
||
EXPOSE 8545 8546 30303 30303/udp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Geth Docker setup for running the sim merge tests on local machine | ||
|
||
###### Build geth docker image | ||
```bash | ||
cd kintsugi/gethdocker | ||
docker build . --tag geth:kintsugi | ||
``` | ||
|
||
###### Run test scripts | ||
```bash | ||
cd packages/lodestar | ||
EL_BINARY_DIR=geth:kintsugi EL_SCRIPT_DIR=gethdocker EL_PORT=8545 TX_SCENARIOS=simple yarn mocha test/sim/merge-interop.test.ts | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash -x | ||
|
||
echo $TTD | ||
echo $DATA_DIR | ||
echo $EL_BINARY_DIR | ||
|
||
echo $scriptDir | ||
echo $currentDir | ||
|
||
|
||
env TTD=$TTD envsubst < $scriptDir/genesisPre.tmpl > $DATA_DIR/genesis.json | ||
echo "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" > $DATA_DIR/sk.json | ||
echo "12345678" > $DATA_DIR/password.txt | ||
pubKey="0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" | ||
|
||
|
||
docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v $currentDir/$DATA_DIR:/data $EL_BINARY_DIR geth --catalyst --datadir /data init /data/genesis.json | ||
docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v $currentDir/$DATA_DIR:/data $EL_BINARY_DIR geth --catalyst --datadir /data account import /data/sk.json --password /data/password.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"config": | ||
{ | ||
"chainId":1, | ||
"homesteadBlock":0, | ||
"eip150Block":0, | ||
"eip155Block":0, | ||
"eip158Block":0, | ||
"byzantiumBlock":0, | ||
"constantinopleBlock":0, | ||
"petersburgBlock":0, | ||
"istanbulBlock":0, | ||
"muirGlacierBlock":0, | ||
"berlinBlock":0, | ||
"londonBlock":0, | ||
"clique": { | ||
"period": 5, | ||
"epoch": 30000 | ||
}, | ||
"terminalTotalDifficulty":${TTD} | ||
}, | ||
"nonce":"0x42", | ||
"timestamp":"0x0", | ||
"extraData":"0x0000000000000000000000000000000000000000000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", | ||
"gasLimit":"0x1C9C380", | ||
"difficulty":"0x400000000", | ||
"mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"coinbase":"0x0000000000000000000000000000000000000000", | ||
"alloc":{ | ||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b":{"balance":"0x6d6172697573766477000000"} | ||
}, | ||
"number":"0x0", | ||
"gasUsed":"0x0", | ||
"parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"baseFeePerGas":"0x7" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"config": { | ||
"chainId": 1, | ||
"homesteadBlock": 0, | ||
"eip150Block": 0, | ||
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"eip155Block": 0, | ||
"eip158Block": 0, | ||
"byzantiumBlock": 0, | ||
"constantinopleBlock": 0, | ||
"petersburgBlock": 0, | ||
"istanbulBlock": 0, | ||
"muirGlacierBlock": 0, | ||
"berlinBlock": 0, | ||
"londonBlock": 0, | ||
"clique": { | ||
"period": 5, | ||
"epoch": 30000 | ||
}, | ||
"terminalTotalDifficulty": ${TTD} | ||
}, | ||
"nonce": "0x42", | ||
"timestamp": "0x0", | ||
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", | ||
"gasLimit": "0x1c9c380", | ||
"difficulty": "0x0", | ||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"coinbase": "0x0000000000000000000000000000000000000000", | ||
"alloc": { | ||
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {"balance": "0x6d6172697573766477000000"} | ||
}, | ||
"number": "0x0", | ||
"gasUsed": "0x0", | ||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"baseFeePerGas": "0x7" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash -x | ||
|
||
scriptDir=$(dirname $0) | ||
currentDir=$(pwd) | ||
|
||
. $scriptDir/common-setup.sh | ||
|
||
docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) --network host -v $currentDir/$DATA_DIR:/data $EL_BINARY_DIR geth --catalyst --http --ws -http.api "engine,net,eth" --allow-insecure-unlock --unlock $pubKey --password /data/password.txt --datadir /data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash -x | ||
|
||
scriptDir=$(dirname $0) | ||
currentDir=$(pwd) | ||
|
||
. $scriptDir/common-setup.sh | ||
|
||
# EL_BINARY_DIR refers to the local docker image build from kintsugi/gethdocker folder | ||
docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) --network host -v $currentDir/$DATA_DIR:/data $EL_BINARY_DIR geth --catalyst --http --ws -http.api "engine,net,eth,miner" --allow-insecure-unlock --unlock $pubKey --password /data/password.txt --datadir /data --nodiscover --mine |
Oops, something went wrong.