Compare commits

...

8 Commits

Author SHA1 Message Date
d4c4cc1ed0 Add comments.
Former-commit-id: 46f00e1d485661b6328b8ca6911a81455a346f6a
2023-01-30 11:24:56 -06:00
2e5eee0223 Add comments.
Former-commit-id: a3a60b76959056ba9cc40f0de3a8bd9a2ee2e17e
2023-01-30 11:23:45 -06:00
c0455e3e0b Simplify build.
Former-commit-id: 3a80606d6c20751fa12c911fc965380b49086710
2023-01-30 11:20:23 -06:00
cecc7a1274 EOL
Former-commit-id: 5f09e42422e5c458919925de751be93e028d05ba
2023-01-30 11:09:05 -06:00
97592b0fca Remove unneeded env
Former-commit-id: a3880de4cde7b5fdd43cd953a7c4b198cc445573
2023-01-30 11:08:27 -06:00
da3636bc17 Fix typo
Former-commit-id: 34413ea2607ead60df6905992b29808828d60448
2023-01-28 00:54:48 -06:00
22077dedc8 Remove generated files.
Former-commit-id: d0c506af881fee53f174f6d8380c1e2b36cdc3d6
2023-01-28 00:51:11 -06:00
ce43e3061c Add a pod for generating geth data as quickly as possible.
Former-commit-id: e8bdb205c7faa89c583b0652fac1801d0177a3c1
2023-01-28 00:49:46 -06:00
6 changed files with 122 additions and 2 deletions

View File

@ -0,0 +1,67 @@
version: '3.7'
services:
datanet-eth-bootnode-geth:
hostname: datanet-eth-bootnode-geth
env_file:
- ../config/datanet-eth/datanet-eth.env
environment:
RUN_BOOTNODE: "true"
image: cerc/datanet-eth-geth:local
ports:
- "9898"
- "30303"
datanet-eth-geth-1:
hostname: datanet-eth-geth-1
cap_add:
- SYS_PTRACE
environment:
CERC_REMOTE_DEBUG: "false"
CERC_RUN_STATEDIFF: "false"
CERC_STATEDIFF_DB_NODE_ID: 1
env_file:
- ../config/datanet-eth/datanet-eth.env
image: cerc/datanet-eth-geth:local
healthcheck:
test: ["CMD", "nc", "-v", "localhost", "8545"]
interval: 30s
timeout: 10s
retries: 10
start_period: 3s
depends_on:
- datanet-eth-bootnode-geth
ports:
- "8545"
- "40000"
- "6060"
datanet-eth-geth-2:
hostname: datanet-eth-geth-2
healthcheck:
test: ["CMD", "nc", "-v", "localhost", "8545"]
interval: 30s
timeout: 10s
retries: 10
start_period: 3s
env_file:
- ../config/datanet-eth/datanet-eth.env
image: cerc/datanet-eth-geth:local
depends_on:
- datanet-eth-bootnode-geth
datanet-tx-spammer:
restart: always
image: cerc/tx-spammer:local
environment:
ACCOUNTS_CSV_URL: http://datanet-eth-bootnode-geth:9898/accounts.csv
ETH_HTTP_PATH: http://datanet-eth-geth-1:8545
LOG_LEVEL: info
SPAMMER_COMMAND: autoSend
ETH_CALL_FREQ: 0
ETH_SEND_FREQ: 0
depends_on:
datanet-eth-bootnode-geth:
condition: service_started
datanet-eth-geth-1:
condition: service_healthy

View File

@ -0,0 +1,9 @@
# The password used to access test accounts (eg, via personal_unlockAccount). The password is the same for all accounts.
ACCOUNT_PASSWORD=secret1212
# ENODE of the geth bootnode.
BOOTNODE_KEY="b0ac22adcad37213c7c565810a50f1772291e7b0ce53fb73e7ec2a3c75bc13b5"
ENODE="enode://af22c29c316ad069cf48a09a4ad5cf04a251b411e45098888d114c6dd7f489a13786620d5953738762afa13711d4ffb3b19aa5de772d8af72f851f7e9c5b164a@datanet-eth-bootnode-geth:30303"
# JWT is required by the startup script, but won't be used without lighthouse.
JWT="0x6cdcac3501046a08e186730dd8bd136cfaf0fdc1fc955f6e15ad3068c0ff2af0"

View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
#
#Build cerc/datanet-eth-geth
set -e
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# Make sure the "build" directory is empty.
rm -rf $SCRIPT_DIR/build
# Copy the fixture-net scripts and config.
cp -rp $SCRIPT_DIR/../cerc-fixturenet-eth-geth $SCRIPT_DIR/build
# Then remove terminal_total_difficulty and replace it with capped_maximum_difficulty.
# This has two effects:
# (1) Disables the Merge (so all we need is geth, not lighthouse).
# (2) Maintains a fast block rate, since the difficulty will never exceed the capped value.
sed -i '' 's/^terminal_total_difficulty:.*$/capped_maximum_difficulty: 1/' $SCRIPT_DIR/build/genesis/el/el-config.yaml
# Build the image.
docker build -t cerc/datanet-eth-geth:local ${SCRIPT_DIR}/build
# Clean up the "build" directory.
rm -rf $SCRIPT_DIR/build

View File

@ -21,9 +21,11 @@ istanbul_block=`cat $tmp_dir/genesis-config.yaml | grep istanbul_block | awk '{
berlin_block=`cat $tmp_dir/genesis-config.yaml | grep berlin_block | awk '{ print $2 }'`
london_block=`cat $tmp_dir/genesis-config.yaml | grep london_block | awk '{ print $2 }'`
merge_fork_block=`cat $tmp_dir/genesis-config.yaml | grep merge_fork_block | awk '{ print $2 }'`
capped_maximum_difficulty=`cat $tmp_dir/genesis-config.yaml | grep capped_maximum_difficulty | awk '{ print $2 }'`
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv
python3 /apps/el-gen/genesis_geth.py $tmp_dir/genesis-config.yaml | \
jq ".config.terminalTotalDifficulty=$ttd" | \
jq ".config.homesteadBlock=$homestead_block" | \
jq ".config.eip150Block=$eip150_block" | \
jq ".config.eip155Block=$eip155_block" | \
@ -35,4 +37,19 @@ python3 /apps/el-gen/genesis_geth.py $tmp_dir/genesis-config.yaml | \
jq ".config.berlinBlock=$berlin_block" | \
jq ".config.londonBlock=$london_block" | \
jq ".config.mergeForkBlock=$merge_fork_block" > ../build/el/geth.json
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv
if [ -n "$ttd" ]; then
cat ../build/el/geth.json | jq ".config.terminalTotalDifficulty=$ttd" > ../build/el/geth.json.jq
mv ../build/el/geth.json.jq ../build/el/geth.json
else
cat ../build/el/geth.json | jq "del(.config.terminalTotalDifficulty)" > ../build/el/geth.json.jq
mv ../build/el/geth.json.jq ../build/el/geth.json
fi
if [ -n "$capped_maximum_difficulty" ]; then
cat ../build/el/geth.json | jq ".config.cappedMaximumDifficulty=$capped_maximum_difficulty" > ../build/el/geth.json.jq
mv ../build/el/geth.json.jq ../build/el/geth.json
else
cat ../build/el/geth.json | jq "del(.config.cappedMaximumDifficulty)" > ../build/el/geth.json.jq
mv ../build/el/geth.json.jq ../build/el/geth.json
fi

View File

@ -11,6 +11,7 @@ cerc/ipld-eth-beacon-indexer
cerc/ipld-eth-server
cerc/laconicd
cerc/laconic-registry-cli
cerc/datanet-eth-geth
cerc/fixturenet-eth-geth
cerc/fixturenet-eth-lighthouse
cerc/watcher-mobymask

View File

@ -8,6 +8,7 @@ ipld-eth-server
lighthouse
laconicd
fixturenet-laconicd
datanet-eth
fixturenet-eth
fixturenet-eth-metrics
watcher-mobymask