From af0c6a9143f384ea3a2a9e59d7a270a531368d40 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 5 Jun 2024 12:55:29 +0000 Subject: [PATCH] Add an option to allow unprotected txs in geth (#8) Part of [Update Optimism stack to use Bedrock release](https://www.notion.so/Update-Optimism-stack-to-use-Bedrock-release-e44a490247724a6095a9fbc19fba3bcd) - Add an env option (`CERC_ALLOW_UNPROTECTED_TXS`) to allow unprotected (non `EIP155`) txs in fixturenet geth node (disables replay protection) - Required by `fixturenet-optimism` Reviewed-on: https://git.vdb.to/cerc-io/fixturenet-eth-stacks/pulls/8 Co-authored-by: Prathamesh Musale Co-committed-by: Prathamesh Musale --- .../compose/docker-compose-fixturenet-eth.yml | 1 + .../container-build/cerc-fixturenet-eth-geth/run-el.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/stack-orchestrator/compose/docker-compose-fixturenet-eth.yml b/stack-orchestrator/compose/docker-compose-fixturenet-eth.yml index 40eacbd..38110a7 100644 --- a/stack-orchestrator/compose/docker-compose-fixturenet-eth.yml +++ b/stack-orchestrator/compose/docker-compose-fixturenet-eth.yml @@ -23,6 +23,7 @@ services: environment: CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true} CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} + CERC_ALLOW_UNPROTECTED_TXS: ${CERC_ALLOW_UNPROTECTED_TXS:-false} env_file: - ../config/fixturenet-eth/fixturenet-eth.env image: cerc/fixturenet-eth-geth:local diff --git a/stack-orchestrator/container-build/cerc-fixturenet-eth-geth/run-el.sh b/stack-orchestrator/container-build/cerc-fixturenet-eth-geth/run-el.sh index d45e144..86224b0 100755 --- a/stack-orchestrator/container-build/cerc-fixturenet-eth-geth/run-el.sh +++ b/stack-orchestrator/container-build/cerc-fixturenet-eth-geth/run-el.sh @@ -50,6 +50,12 @@ else echo -n "$JWT" > /opt/testnet/build/el/jwtsecret + OTHER_OPTS="" + if [ "$CERC_ALLOW_UNPROTECTED_TXS" == "true" ]; then + # Allow for unprotected (non EIP155) txs to be submitted via RPC + OTHER_OPTS+=" --rpc.allow-unprotected-txs" + fi + $START_CMD \ --datadir="${CERC_ETH_DATADIR}" \ --bootnodes="${ENODE}" \