Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
#265 config defined timeout
  • Loading branch information
otselnik committed Nov 4, 2021
commit dec348345800a71f069e42e93cf2a2c19072bf99
3 changes: 2 additions & 1 deletion proxy/indexer/solana_receipts_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
solana_url = os.environ.get("SOLANA_URL", "https://api.devnet.solana.com")
evm_loader_id = os.environ.get("EVM_LOADER", "eeLSJgWzzxrqKv1UxtRVVH8FX3qCQWUs9QuAjJpETGU")
PARALLEL_REQUESTS = int(os.environ.get("PARALLEL_REQUESTS", "2"))
CANCEL_TIMEOUT = int(os.environ.get("CANCEL_TIMEOUT", "60"))


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -508,7 +509,7 @@ def process_receipts(self):
if trx_struct.got_result:
self.submit_transaction(trx_struct)
elif trx_struct.storage:
if abs(trx_struct.slot - self.current_slot) > 16:
if abs(trx_struct.slot - self.current_slot) > CANCEL_TIMEOUT:
self.blocked_storages[trx_struct.storage] = (trx_struct.eth_trx, trx_struct.blocked_accounts)
else:
logger.error(trx_struct)
Expand Down
4 changes: 4 additions & 0 deletions proxy/run-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if [ "$CONFIG" == "ci" ]; then
[[ -z "$USE_COMBINED_START_CONTINUE" ]] && export USE_COMBINED_START_CONTINUE="YES"
[[ -z "$CONTINUE_COUNT_FACTOR" ]] && export CONTINUE_COUNT_FACTOR="3"
[[ -z "$MINIMAL_GAS_PRICE" ]] && export MINIMAL_GAS_PRICE=0
[[ -z "$CANCEL_TIMEOUT" ]] && export CANCEL_TIMEOUT=10
elif [ "$CONFIG" == "local" ]; then
[[ -z "$SOLANA_URL" ]] && export SOLANA_URL="http://localhost:8899"
[[ -z "$EVM_LOADER" ]] && export EVM_LOADER=deploy
Expand All @@ -26,6 +27,7 @@ elif [ "$CONFIG" == "local" ]; then
[[ -z "$EXTRA_GAS" ]] && export EXTRA_GAS=0
[[ -z "$NEON_CLI_TIMEOUT" ]] && export NEON_CLI_TIMEOUT="0.9"
[[ -z "$MINIMAL_GAS_PRICE" ]] && export MINIMAL_GAS_PRICE=0
[[ -z "$CANCEL_TIMEOUT" ]] && export CANCEL_TIMEOUT=10
elif [ "$CONFIG" == "devnet" ]; then
[[ -z "$SOLANA_URL" ]] && export SOLANA_URL="https://api.devnet.solana.com"
[[ -z "$EVM_LOADER" ]] && export EVM_LOADER=eeLSJgWzzxrqKv1UxtRVVH8FX3qCQWUs9QuAjJpETGU
Expand All @@ -36,6 +38,7 @@ elif [ "$CONFIG" == "devnet" ]; then
[[ -z "$EXTRA_GAS" ]] && export EXTRA_GAS=90000
[[ -z "$NEON_CLI_TIMEOUT" ]] && export NEON_CLI_TIMEOUT="10"
[[ -z "$MINIMAL_GAS_PRICE" ]] && export MINIMAL_GAS_PRICE=1
[[ -z "$CANCEL_TIMEOUT" ]] && export CANCEL_TIMEOUT=60
elif [ "$CONFIG" == "testnet" ]; then
[[ -z "$SOLANA_URL" ]] && export SOLANA_URL="https://api.testnet.solana.com"
[[ -z "$EVM_LOADER" ]] && export EVM_LOADER=eeLSJgWzzxrqKv1UxtRVVH8FX3qCQWUs9QuAjJpETGU
Expand All @@ -46,6 +49,7 @@ elif [ "$CONFIG" == "testnet" ]; then
[[ -z "$EXTRA_GAS" ]] && export EXTRA_GAS=90000
[[ -z "$NEON_CLI_TIMEOUT" ]] && export NEON_CLI_TIMEOUT="15"
[[ -z "$MINIMAL_GAS_PRICE" ]] && export MINIMAL_GAS_PRICE="1"
[[ -z "$CANCEL_TIMEOUT" ]] && export CANCEL_TIMEOUT=60
elif [ "$CONFIG" != "custom" ]; then
exit 1
fi
Expand Down