From 7ea0785b7739b3d45462d79f549ece147375aa5b Mon Sep 17 00:00:00 2001 From: Sloan Thompson Date: Thu, 14 May 2020 10:10:41 -0400 Subject: [PATCH 1/4] More gas and friends This is our second trip down the give it more gas aisle. Gas prices continue to be bonkers on mainnet and we need to get the relay up to date. What we're doing here is not sustainable and we'll have to come up with something better very soon. In addition to the gas bump we're manually setting the starting nonce. The relayer piled up some pending tx's before we decided to stop the service to find a quick fix. 150 is the first nonce that is still pending. --- maintainer/maintainer/ethereum/shared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintainer/maintainer/ethereum/shared.py b/maintainer/maintainer/ethereum/shared.py index e583989d..d9c749f0 100644 --- a/maintainer/maintainer/ethereum/shared.py +++ b/maintainer/maintainer/ethereum/shared.py @@ -14,7 +14,7 @@ GWEI = 1000000000 DEFAULT_GAS = 500_000 -DEFAULT_GAS_PRICE = 22 * GWEI +DEFAULT_GAS_PRICE = 65 * GWEI CONNECTION: ethrpc.BaseRPC NONCE: Iterator[int] # yields ints, takes no sends @@ -55,7 +55,7 @@ async def init() -> None: else: global NONCE address = cast(str, c['ETH_ADDRESS']) - n = await CONNECTION.get_nonce(address) + n = 150 NONCE = _nonce(n) logger.info(f'nonce is {n}') From 4b3a4d7263119071bd026223956ab118730e0fc5 Mon Sep 17 00:00:00 2001 From: Sloan Thompson Date: Thu, 14 May 2020 17:31:55 -0400 Subject: [PATCH 2/4] Reduce gas price and restore nonce fetch Things have calmed a bit so we're going to try reducing the gas price. Now that we're caught up we don't need to bulldoze pending nonces, restoring the nonce fetch on boot. --- maintainer/maintainer/ethereum/shared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintainer/maintainer/ethereum/shared.py b/maintainer/maintainer/ethereum/shared.py index d9c749f0..fe8b6650 100644 --- a/maintainer/maintainer/ethereum/shared.py +++ b/maintainer/maintainer/ethereum/shared.py @@ -14,7 +14,7 @@ GWEI = 1000000000 DEFAULT_GAS = 500_000 -DEFAULT_GAS_PRICE = 65 * GWEI +DEFAULT_GAS_PRICE = 30 * GWEI CONNECTION: ethrpc.BaseRPC NONCE: Iterator[int] # yields ints, takes no sends @@ -55,7 +55,7 @@ async def init() -> None: else: global NONCE address = cast(str, c['ETH_ADDRESS']) - n = 150 + n = await CONNECTION.get_nonce(address) NONCE = _nonce(n) logger.info(f'nonce is {n}') From ce6795157dd52e9dd9c7a9023eb0a3ab656b790f Mon Sep 17 00:00:00 2001 From: Sloan Thompson Date: Sun, 17 May 2020 22:56:06 -0400 Subject: [PATCH 3/4] Gas prices up again Gas prices are up and I need to go to bed so going to adjust and set the nonce to kick out the oldest pending tx. We're going on 45 minutes without a success at this point. --- maintainer/maintainer/ethereum/shared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintainer/maintainer/ethereum/shared.py b/maintainer/maintainer/ethereum/shared.py index fe8b6650..10afd4c3 100644 --- a/maintainer/maintainer/ethereum/shared.py +++ b/maintainer/maintainer/ethereum/shared.py @@ -14,7 +14,7 @@ GWEI = 1000000000 DEFAULT_GAS = 500_000 -DEFAULT_GAS_PRICE = 30 * GWEI +DEFAULT_GAS_PRICE = 40 * GWEI CONNECTION: ethrpc.BaseRPC NONCE: Iterator[int] # yields ints, takes no sends @@ -55,7 +55,7 @@ async def init() -> None: else: global NONCE address = cast(str, c['ETH_ADDRESS']) - n = await CONNECTION.get_nonce(address) + n = 660 NONCE = _nonce(n) logger.info(f'nonce is {n}') From dcd377f9c180dd1410c0be80ed636ddedd08e3a6 Mon Sep 17 00:00:00 2001 From: Sloan Thompson Date: Wed, 20 May 2020 12:28:42 -0400 Subject: [PATCH 4/4] Forgot to commit gas reduction from Friday --- maintainer/maintainer/ethereum/shared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintainer/maintainer/ethereum/shared.py b/maintainer/maintainer/ethereum/shared.py index 10afd4c3..91ecd493 100644 --- a/maintainer/maintainer/ethereum/shared.py +++ b/maintainer/maintainer/ethereum/shared.py @@ -14,7 +14,7 @@ GWEI = 1000000000 DEFAULT_GAS = 500_000 -DEFAULT_GAS_PRICE = 40 * GWEI +DEFAULT_GAS_PRICE = 25 * GWEI CONNECTION: ethrpc.BaseRPC NONCE: Iterator[int] # yields ints, takes no sends @@ -55,7 +55,7 @@ async def init() -> None: else: global NONCE address = cast(str, c['ETH_ADDRESS']) - n = 660 + n = await CONNECTION.get_nonce(address) NONCE = _nonce(n) logger.info(f'nonce is {n}')