diff --git a/dex/testing/eth/create-node.sh b/dex/testing/eth/create-node.sh index 90b115815f..ff19d5d43e 100755 --- a/dex/testing/eth/create-node.sh +++ b/dex/testing/eth/create-node.sh @@ -84,17 +84,11 @@ ListenAddr = ":${NODE_PORT}" NetRestrict = [ "127.0.0.1/8", "::1/128" ] EOF -MINING_ARG="" - -# Add etherbase if mining. -if [ "${CHAIN_ADDRESS}" != "_" ]; then -MINING_ARG="--miner.etherbase 0x${CHAIN_ADDRESS}" cat >> "${NODE_DIR}/eth.conf" <&1 | tee ${NODE_DIR}/${NAME}.log" C-m - -else - # Start the eth node listening restricted to localhost and our custom - # configuration file. - tmux send-keys -t "$TMUX_WIN_ID" "${NODES_ROOT}/harness-ctl/${NAME} --allow-insecure-unlock --rpc.enabledeprecatedpersonal " \ - "--config ${NODE_DIR}/eth.conf ${MINING_ARG} --verbosity 5 ${HTTP_OPT} 2>&1 | tee " \ - "${NODE_DIR}/${NAME}.log" C-m -fi + "--password ${GROUP_DIR}/password --verbosity 5 --vmdebug --http --http.port " \ + "${HTTP_PORT} --ws --ws.port ${WS_PORT} --ws.api ${WS_MODULES} --allow-insecure-unlock " \ + "--rpc.enabledeprecatedpersonal --dev 2>&1 | tee ${NODE_DIR}/${NAME}.log" C-m diff --git a/dex/testing/eth/harness.sh b/dex/testing/eth/harness.sh index 1f1ee3e2f0..7ccf348aad 100755 --- a/dex/testing/eth/harness.sh +++ b/dex/testing/eth/harness.sh @@ -24,19 +24,6 @@ ALPHA_HTTP_PORT="38556" ALPHA_WS_PORT="38557" ALPHA_WS_MODULES="eth" -BETA_ADDRESS="4f8ef3892b65ed7fc356ff473a2ef2ae5ec27a06" -BETA_ADDRESS_JSON_FILE_NAME="UTC--2021-01-27T08-20-58.179642501Z--4f8ef3892b65ed7fc356ff473a2ef2ae5ec27a06" -BETA_ADDRESS_JSON='{"address":"4f8ef3892b65ed7fc356ff473a2ef2ae5ec27a06","crypto":{"cipher":"aes-128-ctr","ciphertext":"c5672bb829df9e209ca8ce18dbdd1fed69c603d639e06ab09127b672a609c121","cipherparams":{"iv":"24460eb2934c8b61cee3ad0aa7b843c0"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"1f85da881994ca7b4a23f0698da70500a4b79f97a4450b83b129ebf3b4c28f50"},"mac":"1ecea707f1bffa1f6f944cb47e83118d8179e8a5005b83c88610b7e8692a1197"},"id":"56633762-6fb1-4cbf-8396-3a2e4661f7d4","version":3}' -BETA_NODE_KEY="0f3f23a0f14202da009bd59a96457098acea901986629e54d5be1eea32fc404a" -BETA_ENODE="b1d3e358ee5c9b268e911f2cab47bc12d0e65c80a6d2b453fece34facc9ac3caed14aa3bc7578166bb08c5bc9719e5a2267ae14e0b42da393f4d86f6d5829061" -BETA_NODE_PORT="30305" -BETA_AUTHRPC_PORT="8553" -BETA_HTTP_PORT="38558" -BETA_WS_PORT="38559" -BETA_WS_MODULES="eth,txpool" - -# TODO: Light nodes broken as of geth 1.13.4-stable. Enable them when possible. - # TESTING_ADDRESS is used by the client's internal node. TESTING_ADDRESS="946dfaB1AD7caCFeF77dE70ea68819a30acD4577" SIMNET_TOKEN_ADDRESS="946dfaB1AD7caCFeF77dE70ea68819a30acD4577" @@ -56,7 +43,6 @@ if [ -d "${NODES_ROOT}" ]; then fi mkdir -p "${NODES_ROOT}/alpha" -mkdir -p "${NODES_ROOT}/beta" mkdir -p "${NODES_ROOT}/harness-ctl" echo "Writing ctl scripts" @@ -64,54 +50,10 @@ echo "Writing ctl scripts" # Control Scripts ################################################################################ -# Write genesis json. ".*Block" fields represent block height where certain -# protocols take effect. "clique" is our proof of authority scheme. One block -# can be mined per second with a signature belonging to the address in -# "extradata". The addresses in the "alloc" field are allocated "balance". -# Values are in wei. 1*10^18 wei is equal to one eth. Addresses are allocated -# 11,000 eth. The addresses belong to alpha and beta nodes and two others are -# used in tests. -cat > "${NODES_ROOT}/genesis.json" < "${NODES_ROOT}/harness-ctl/send.js" < "${NODES_ROOT}/harness-ctl/deploy.js" < "${NODES_ROOT}/harness-ctl/reorg" < "${NODES_ROOT}/harness-ctl/quit" < "${NODES_ROOT}/harness-ctl/loadTestToken.js" < "${NODES_ROOT}/harness-ctl/loadTestToken.js" < 1 ? web3.eth.accounts[1] : web3.eth.accounts[0] - personal.unlockAccount(web3.eth.defaultAccount, '${PASSWORD}') function transfer (tokenAddr, decimals, addr, val) { addr = addr.startsWith('0x') ? addr : '0x'+addr @@ -395,7 +239,6 @@ EOF cd "${NODES_ROOT}/harness-ctl" -mine_pending_txs TEST_BLOCK10_HASH=$("${NODES_ROOT}/harness-ctl/alpha" "attach --exec eth.getHeaderByNumber(10).hash" | sed 's/"//g') echo "ETH block 10 hash to use in tests is ${TEST_BLOCK10_HASH}. Saving to ${NODES_ROOT}/test_block10_hash.txt"