From 72e1242544c879ca22708ddaf653a297810d30d4 Mon Sep 17 00:00:00 2001 From: Kirill Fedoseev Date: Mon, 7 Feb 2022 20:20:03 +0400 Subject: [PATCH] Refine configuration --- oracle/docker-compose-helpers.yml | 6 ++++++ .../src/events/processAMBCollectedSignaturesMEV/index.js | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/oracle/docker-compose-helpers.yml b/oracle/docker-compose-helpers.yml index 096d7669..8ea5f126 100644 --- a/oracle/docker-compose-helpers.yml +++ b/oracle/docker-compose-helpers.yml @@ -34,6 +34,9 @@ services: ORACLE_MEV_FOREIGN_FLAT_MINER_FEE: '1500000000000000' # 0.0015 eth = 300k gas * 5 gwei ORACLE_MEV_FOREIGN_MAX_PRIORITY_FEE_PER_GAS: '0' # 0 gwei ORACLE_MEV_FOREIGN_MAX_FEE_PER_GAS: '1000000000000' # 1000 gwei + ORACLE_FOREIGN_RPC_POLLING_INTERVAL: '15000' # CollectedSignatures event polling interval + ORACLE_HOME_START_BLOCK: 'TBD' + ORACLE_HOME_SKIP_MANUAL_LANE: 'true' restart: unless-stopped entrypoint: yarn mev:watcher:collected-signatures mevSender: @@ -44,6 +47,7 @@ services: environment: NODE_ENV: production ORACLE_VALIDATOR_ADDRESS: ${ORACLE_VALIDATOR_ADDRESS} + ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY: ${ORACLE_VALIDATOR_ADDRESS_PRIVATE_KEY} ORACLE_MEV_FOREIGN_HELPER_CONTRACT_ADDRESS: 'TBD' ORACLE_MEV_FOREIGN_MIN_GAS_PRICE: '50000000000' # 50 gwei ORACLE_MEV_FOREIGN_FLAT_MINER_FEE: '1500000000000000' # 0.0015 eth = 300k gas * 5 gwei @@ -51,5 +55,7 @@ services: ORACLE_MEV_FOREIGN_MAX_FEE_PER_GAS: '1000000000000' # 1000 gwei ORACLE_MEV_FOREIGN_FLASHBOTS_RPC_URL: 'https://relay-goerli.flashbots.net' ORACLE_MEV_FOREIGN_FLASHBOTS_AUTH_SIGNING_KEY: 82db7175932f4e6c8e45283b78b54fd5f195149378ec90d95b8fd0ec8bdadf1d + ORACLE_MEV_FOREIGN_BUNDLES_BLOCK_RANGE: '5' + ORACLE_FOREIGN_RPC_POLLING_INTERVAL: '70000' # time between sending different batches of MEV bundles (~= 5 blocks * 14 seconds) restart: unless-stopped entrypoint: yarn mev:sender:foreign diff --git a/oracle/src/events/processAMBCollectedSignaturesMEV/index.js b/oracle/src/events/processAMBCollectedSignaturesMEV/index.js index 79ca1edc..9415f6eb 100644 --- a/oracle/src/events/processAMBCollectedSignaturesMEV/index.js +++ b/oracle/src/events/processAMBCollectedSignaturesMEV/index.js @@ -13,6 +13,7 @@ const { MAX_CONCURRENT_EVENTS, EXTRA_GAS_ABSOLUTE } = require('../../utils/const const limit = promiseLimit(MAX_CONCURRENT_EVENTS) const { ORACLE_HOME_TO_FOREIGN_ALLOWANCE_LIST, ORACLE_HOME_TO_FOREIGN_BLOCK_LIST } = process.env +const ORACLE_HOME_SKIP_MANUAL_LANE = process.env.ORACLE_HOME_SKIP_MANUAL_LANE === 'true' function processCollectedSignaturesBuilder(config) { const { home, foreign, mevForeign } = config @@ -65,6 +66,14 @@ function processCollectedSignaturesBuilder(config) { } } + if (ORACLE_HOME_SKIP_MANUAL_LANE && parsedMessage.decodedDataType.manualLane) { + logger.info( + { dataType: parsedMessage.dataType }, + 'Validator skips a message. Message was forwarded to the manual lane by the extension' + ) + return + } + logger.debug({ NumberOfCollectedSignatures }, 'Number of signatures to get') const requiredSignatures = []