diff --git a/OPTIMISM_README.md b/OPTIMISM_README.md new file mode 100644 index 0000000000..dea8e6d449 --- /dev/null +++ b/OPTIMISM_README.md @@ -0,0 +1,21 @@ +Running the Optimism Execution Manager Node: + +1. Build geth + + $ go build + +2. Initialize the node + + $ ./build/bin/geth init etc/optimism.json + +3. Import the signers private key (ask in Slack for the private key file): + + $ ./build/bin/geth account import private_key.hex + +4. Deploy the Execution Manager (in [packages/ovm](https://github.com/op-optimism/optimistic-rollup/tree/master/packages/ovm)) + + $ yarn run deploy:execution-manager local + +5. Run geth + + $ EXECUTION_MANAGER_ADDRESS=0xEB1Be3E5Ff32bd47D9589f3f1E73B1788F36639c ./build/bin/geth --datadir data --syncmode 'full' --rpc --rpcaddr 'localhost' --rpcapi 'eth,net' --networkid 12 --allow-insecure-unlock --gasprice '1' -unlock '0xAb521188aA30ccc4a88Ec9ea6BC55541b72eD1d3' --mine diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 4a5a7549b6..60e42b870c 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -20,6 +20,7 @@ import ( "bytes" "errors" "math/big" + "os" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" @@ -33,7 +34,7 @@ var ( tt255 = math.BigPow(2, 255) OvmSLOADMethodId = hashSha3([]byte("ovmSLOAD()"))[0:4] OvmSSTOREMethodId = hashSha3([]byte("ovmSSTORE()"))[0:4] - OvmContractAddress = common.FromHex("EB1Be3E5Ff32bd47D9589f3f1E73B1788F36639c") + OvmContractAddress = common.FromHex(os.Getenv("EXECUTION_MANAGER_ADDRESS")) errWriteProtection = errors.New("evm: write protection") errReturnDataOutOfBounds = errors.New("evm: return data out of bounds") errExecutionReverted = errors.New("evm: execution reverted")