Skip to content

Commit 1e1c7f0

Browse files
authored
Fix sleep timeout (#167)
* Fix sleep timeout Signed-off-by: cyc60 <[email protected]> * Update CI Signed-off-by: cyc60 <[email protected]> * Update CI Signed-off-by: cyc60 <[email protected]> --------- Signed-off-by: cyc60 <[email protected]>
1 parent 008c466 commit 1e1c7f0

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ jobs:
1717
name: Linting
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v2
21-
- uses: actions/setup-python@v2
22-
- uses: pre-commit/action@v2.0.0
20+
- uses: actions/checkout@v3
21+
- uses: actions/setup-python@v4
22+
- uses: pre-commit/action@v3.0.1
2323
test:
2424
name: Testing
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v3
2929

3030
- name: Set up python
31-
uses: actions/setup-python@v2
31+
uses: actions/setup-python@v4
3232
with:
3333
python-version: 3.10.10
3434

3535
# Install poetry
3636
- name: Load cached Poetry installation
37-
uses: actions/cache@v2
37+
uses: actions/cache@v4
3838
with:
3939
path: ~/.local
4040
key: poetry-0
@@ -58,7 +58,7 @@ jobs:
5858
runs-on: ubuntu-latest
5959
steps:
6060
- name: Checkout code
61-
uses: actions/checkout@v2
61+
uses: actions/checkout@v3
6262
- name: Docker meta
6363
id: meta
6464
uses: docker/metadata-action@v3
@@ -78,7 +78,7 @@ jobs:
7878
username: _json_key
7979
password: ${{ secrets.GAR_JSON_KEY }}
8080
- name: Build and push
81-
uses: docker/build-push-action@v2
81+
uses: docker/build-push-action@v5
8282
with:
8383
context: .
8484
push: ${{ github.event_name != 'pull_request' }}

oracle/keeper/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def submit_update(web3_client: Web3, function_call: ContractFunction) -> None:
243243
raise e
244244
logger.exception(e)
245245
if i < ATTEMPTS_WITH_DEFAULT_GAS - 1: # skip last sleep
246-
time.sleep(NETWORK_CONFIG.SECONDS_PER_BLOCK)
246+
time.sleep(NETWORK_CONFIG["SECONDS_PER_BLOCK"])
247247
else:
248248
tx_params = get_high_priority_tx_params(web3_client)
249249
tx_hash = function_call.transact(tx_params)

oracle/networks.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
SYNC_PERIOD=timedelta(days=1),
7676
IS_POA=False,
7777
DEPOSIT_TOKEN_SYMBOL="ETH",
78+
SECONDS_PER_BLOCK=12,
7879
),
7980
HARBOUR_MAINNET: dict(
8081
STAKEWISE_SUBGRAPH_URLS=config(
@@ -135,6 +136,7 @@
135136
SYNC_PERIOD=timedelta(days=1),
136137
IS_POA=False,
137138
DEPOSIT_TOKEN_SYMBOL="ETH",
139+
SECONDS_PER_BLOCK=12,
138140
),
139141
GOERLI: dict(
140142
STAKEWISE_SUBGRAPH_URLS=config(
@@ -192,6 +194,7 @@
192194
SYNC_PERIOD=timedelta(hours=1),
193195
IS_POA=True,
194196
DEPOSIT_TOKEN_SYMBOL="ETH",
197+
SECONDS_PER_BLOCK=12,
195198
),
196199
HARBOUR_GOERLI: dict(
197200
STAKEWISE_SUBGRAPH_URLS=config(
@@ -252,6 +255,7 @@
252255
SYNC_PERIOD=timedelta(days=1),
253256
IS_POA=True,
254257
DEPOSIT_TOKEN_SYMBOL="ETH",
258+
SECONDS_PER_BLOCK=12,
255259
),
256260
GNOSIS_CHAIN: dict(
257261
STAKEWISE_SUBGRAPH_URLS=config(
@@ -311,5 +315,6 @@
311315
SYNC_PERIOD=timedelta(days=1),
312316
IS_POA=True,
313317
DEPOSIT_TOKEN_SYMBOL="GNO",
318+
SECONDS_PER_BLOCK=5,
314319
),
315320
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "oracle"
3-
version = "3.4.0"
3+
version = "3.5.1"
44
description = "StakeWise Oracles are responsible for submitting off-chain data."
55
authors = ["Dmitri Tsumak <[email protected]>"]
66
license = "AGPL-3.0-only"

0 commit comments

Comments
 (0)