From b992771d0a60a2949d9036aab42dbf28d39f2a35 Mon Sep 17 00:00:00 2001 From: cyc60 Date: Wed, 23 Apr 2025 14:29:44 +0300 Subject: [PATCH 1/3] Fix sleep timeout Signed-off-by: cyc60 --- oracle/keeper/utils.py | 2 +- oracle/networks.py | 5 +++++ pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/oracle/keeper/utils.py b/oracle/keeper/utils.py index 68ca4e9..93af359 100644 --- a/oracle/keeper/utils.py +++ b/oracle/keeper/utils.py @@ -243,7 +243,7 @@ def submit_update(web3_client: Web3, function_call: ContractFunction) -> None: raise e logger.exception(e) if i < ATTEMPTS_WITH_DEFAULT_GAS - 1: # skip last sleep - time.sleep(NETWORK_CONFIG.SECONDS_PER_BLOCK) + time.sleep(NETWORK_CONFIG["SECONDS_PER_BLOCK"]) else: tx_params = get_high_priority_tx_params(web3_client) tx_hash = function_call.transact(tx_params) diff --git a/oracle/networks.py b/oracle/networks.py index 17153dc..041478c 100644 --- a/oracle/networks.py +++ b/oracle/networks.py @@ -75,6 +75,7 @@ SYNC_PERIOD=timedelta(days=1), IS_POA=False, DEPOSIT_TOKEN_SYMBOL="ETH", + SECONDS_PER_BLOCK=12, ), HARBOUR_MAINNET: dict( STAKEWISE_SUBGRAPH_URLS=config( @@ -135,6 +136,7 @@ SYNC_PERIOD=timedelta(days=1), IS_POA=False, DEPOSIT_TOKEN_SYMBOL="ETH", + SECONDS_PER_BLOCK=12, ), GOERLI: dict( STAKEWISE_SUBGRAPH_URLS=config( @@ -192,6 +194,7 @@ SYNC_PERIOD=timedelta(hours=1), IS_POA=True, DEPOSIT_TOKEN_SYMBOL="ETH", + SECONDS_PER_BLOCK=12, ), HARBOUR_GOERLI: dict( STAKEWISE_SUBGRAPH_URLS=config( @@ -252,6 +255,7 @@ SYNC_PERIOD=timedelta(days=1), IS_POA=True, DEPOSIT_TOKEN_SYMBOL="ETH", + SECONDS_PER_BLOCK=12, ), GNOSIS_CHAIN: dict( STAKEWISE_SUBGRAPH_URLS=config( @@ -311,5 +315,6 @@ SYNC_PERIOD=timedelta(days=1), IS_POA=True, DEPOSIT_TOKEN_SYMBOL="GNO", + SECONDS_PER_BLOCK=5, ), } diff --git a/pyproject.toml b/pyproject.toml index 2cd5d48..f34452d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "oracle" -version = "3.4.0" +version = "3.5.1" description = "StakeWise Oracles are responsible for submitting off-chain data." authors = ["Dmitri Tsumak "] license = "AGPL-3.0-only" From 0723d7d0c2e72902686cdf5c07d5b8a7413840b6 Mon Sep 17 00:00:00 2001 From: cyc60 Date: Wed, 23 Apr 2025 14:30:40 +0300 Subject: [PATCH 2/3] Update CI Signed-off-by: cyc60 --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d5c4ae3..a0bfa6b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,7 +34,7 @@ jobs: # Install poetry - name: Load cached Poetry installation - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.local key: poetry-0 From 2a9522307dd66d005a19f868934ed6018d7ef778 Mon Sep 17 00:00:00 2001 From: cyc60 Date: Wed, 23 Apr 2025 14:33:30 +0300 Subject: [PATCH 3/3] Update CI Signed-off-by: cyc60 --- .github/workflows/ci.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a0bfa6b..2ab04ec 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,18 +17,18 @@ jobs: name: Linting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.0 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: pre-commit/action@v3.0.1 test: name: Testing runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.10.10 @@ -58,7 +58,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Docker meta id: meta uses: docker/metadata-action@v3 @@ -78,7 +78,7 @@ jobs: username: _json_key password: ${{ secrets.GAR_JSON_KEY }} - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . push: ${{ github.event_name != 'pull_request' }}