Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0 #31

Merged
merged 112 commits into from
Oct 3, 2024
Merged

1.0 #31

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
310f0ca
SKALE-4455 Add watchdog classes
DmytroNazarenko Sep 29, 2021
eaf55aa
SKALE-4455 Add routes to WatchdogServer
DmytroNazarenko Sep 29, 2021
2f720b6
SKALE-4455 Move server to separate class
DmytroNazarenko Sep 30, 2021
0fcb414
SKALE-4455 Move server to separate class
DmytroNazarenko Sep 30, 2021
79d15a2
SKALE-4455 Add watchdog wrapper WatchdogClient
DmytroNazarenko Sep 30, 2021
c8ae390
SKALE-4455 Add get_schain_status
DmytroNazarenko Sep 30, 2021
ee92783
SKALE-4455 Add watchdog check class
DmytroNazarenko Oct 11, 2021
56a6a88
SKALE-4455 Add requirements, wrap watchdog checks
DmytroNazarenko Oct 11, 2021
6f07e6a
SKALE-4455 Add watchdog checks
DmytroNazarenko Oct 11, 2021
4ad3d8c
SKALE-4455 Add ssl & endpoint checks
DmytroNazarenko Oct 11, 2021
9956463
SKALE-4455 Restructure watchdog checks
DmytroNazarenko Oct 12, 2021
2d74fb5
SKALE-4455 Add node checks
DmytroNazarenko Oct 13, 2021
48c9c96
SKALE-4455 Add checks to NodeChecks
DmytroNazarenko Oct 13, 2021
8d95dca
SKALE-4455 Update logs check
DmytroNazarenko Oct 13, 2021
5478d37
SKALE-4455 Update check wrapper, add base check
DmytroNazarenko Oct 13, 2021
2c8b72c
SKALE-4455 Update get method in BaseChecks
DmytroNazarenko Oct 13, 2021
4e7b638
SKALE-4455 Handle check statuses in decorator
DmytroNazarenko Oct 13, 2021
1c76191
SKALE-4455 Add types to return values
DmytroNazarenko Oct 13, 2021
fe9f138
SKALE-4455 Retrieve types in separate file
DmytroNazarenko Oct 15, 2021
0269462
SKALE-4455 Change WatchdogChecks signature
DmytroNazarenko Oct 15, 2021
ba3ade6
SKALE-4455 Add linter
DmytroNazarenko Oct 15, 2021
bd7fc23
SKALE-4455 Add info method to checks
DmytroNazarenko Oct 15, 2021
e72da8b
SKALE-4455 Make info() classmethod
DmytroNazarenko Oct 15, 2021
131c5d6
SKALE-4455 create Response dataclass
DmytroNazarenko Oct 15, 2021
22e7eee
SKALE-4455 Move is_status_ok to Response
DmytroNazarenko Oct 15, 2021
fee5e3d
SKALE-4455 Add licence headers
DmytroNazarenko Oct 15, 2021
5de0bbd
SKALE-4455 Add setup.py
DmytroNazarenko Oct 15, 2021
3c21f25
SKALE-4455 Add publish workflow
DmytroNazarenko Oct 15, 2021
9a8241c
SKALE-4455 Update publish.yml
DmytroNazarenko Oct 15, 2021
acbe295
SKALE-4455 Add test workflow
DmytroNazarenko Oct 15, 2021
bf55ba1
SKALE-4455 Fix lint
DmytroNazarenko Oct 15, 2021
76d2cc7
SKALE-4455 Update es credentials
DmytroNazarenko Oct 15, 2021
4940413
SKALE-4455 Disable warnings
DmytroNazarenko Oct 15, 2021
32e38bd
SKALE-4455 Add multithreading
DmytroNazarenko Oct 15, 2021
b896a78
SKALE-4455 Update README
DmytroNazarenko Oct 15, 2021
dbd9b8a
SKALE-4455 Restructure package
DmytroNazarenko Oct 15, 2021
c727c85
SKALE-4455 Add requirements.yaml to package
DmytroNazarenko Oct 18, 2021
faaf115
SKALE-4455 Move requirements.yaml to skale_checks
DmytroNazarenko Oct 18, 2021
799a692
SKALE-4455 Add lru_cache to Watchdog
DmytroNazarenko Oct 18, 2021
a0190c3
SKALE-4455 Rename WatchdogBase
DmytroNazarenko Oct 18, 2021
c1d3a3c
SKALE-4455 Optimize validator balance, refactor WatchdogConnector class
DmytroNazarenko Oct 18, 2021
3d56ec9
SKALE-4455 Update get_active_nodes_count
DmytroNazarenko Oct 18, 2021
0c9af77
SKALE-4455 Update get_active_nodes_count
DmytroNazarenko Oct 18, 2021
fabf1dc
Merge pull request #1 from skalenetwork/feature/SKALE-4455-node-checks
DmytroNazarenko Oct 18, 2021
a2e62f7
Add twine, update to 1.0 version
DmytroNazarenko Oct 18, 2021
b8f2baa
Merge pull request #2 from skalenetwork/enhancement/bump-version-1.0
DmytroNazarenko Oct 18, 2021
2155863
Update publish.yml
DmytroNazarenko Oct 18, 2021
b0aee99
Merge pull request #3 from skalenetwork/enhancement/release-1.0
DmytroNazarenko Oct 18, 2021
b044bef
Update README.md
DmytroNazarenko Oct 22, 2021
a74bfe8
SKALE-4530 Rename balance checks
alexgex Nov 4, 2021
acf0251
SKALE-4530 Rename node balance method
alexgex Nov 4, 2021
7ef7955
Merge pull request #4 from skalenetwork/enhancement/SKALE-4530-rename…
DmytroNazarenko Nov 4, 2021
b0993c1
Fix web3.py multithreading issue
alexgex Nov 19, 2021
32f2df8
Fix reload web3.py
DmytroNazarenko Nov 22, 2021
675c4a4
Use executor append
DmytroNazarenko Nov 22, 2021
59fe027
Use list comperhension
DmytroNazarenko Nov 22, 2021
49c26a4
Update requirements
DmytroNazarenko Nov 23, 2021
e390ed0
Add logs additional args
DmytroNazarenko Nov 23, 2021
a758ffd
SKALE-4530 Decrease workers number to 3 (equals to skale-api workers …
alexgex Nov 29, 2021
bff18e4
Fix status value
alexgex Nov 29, 2021
9b76d8c
Merge pull request #5 from skalenetwork/hotfix/fix-web3py-multithread…
DmytroNazarenko Nov 29, 2021
fdbbe7f
Fix version check
DmytroNazarenko Nov 30, 2021
cce08ad
Merge pull request #6 from skalenetwork/bug/fix-versions-check
DmytroNazarenko Nov 30, 2021
cd727bc
Update testnet version requirements
alexgex Dec 8, 2021
8fbec70
Merge pull request #7 from skalenetwork/hotfix/update-testnet-require…
DmytroNazarenko Dec 8, 2021
b8cfaeb
Update mainnet version requirements
alexgex Dec 16, 2021
fcfc80f
Merge pull request #8 from skalenetwork/hotfix/update-mainnet-require…
DmytroNazarenko Dec 16, 2021
2752316
SKALE-4876 Add optional requirements file path
alexgex Jan 13, 2022
ba6f746
SKALE-4876 Check if requirements file exists
alexgex Jan 13, 2022
aaef633
SKALE-4876 Replace weeks by days in checking SSL cert expiration period
alexgex Jan 13, 2022
0cc49e2
SKALE-4876 Stop checking requirements file existence
alexgex Jan 13, 2022
ab72517
SKALE-4876 Change 'ssl_gap_days' value to 5
alexgex Jan 13, 2022
ef9a2f7
SKALE-4876 Improve variables ans constants naming
alexgex Jan 13, 2022
481a589
SKALE-4876 Apply flake8
alexgex Jan 13, 2022
83778c6
Merge pull request #9 from skalenetwork/enhancement/SKALE-4876-add-op…
alexgex Jan 13, 2022
f62391e
SKALE-5013 Add exclude flag
DmytroNazarenko Mar 22, 2022
22b6657
SKALE-5013 Add retries flag
DmytroNazarenko Mar 22, 2022
1c1e695
Merge pull request #10 from skalenetwork/enhancement/SKALE-5013-retry…
DmytroNazarenko Mar 23, 2022
61352ba
Update skale.py
DmytroNazarenko Apr 4, 2022
74c9ba2
Update setup.py
DmytroNazarenko Apr 4, 2022
5b7b2b0
Merge pull request #11 from skalenetwork/enhancement/bump-skale-py
DmytroNazarenko Apr 4, 2022
dbc2823
Add delays for retries
DmytroNazarenko Apr 12, 2022
d10b7cf
Merge pull request #12 from skalenetwork/enhancement/add-delays
alexgex Apr 13, 2022
2121a6a
Add internal ports check
badrogger May 4, 2022
3a9cd03
Fix internal ports check
badrogger May 4, 2022
f6a112e
Remove redundant funtion
badrogger May 6, 2022
cdc8faa
Merge pull request #13 from skalenetwork/add-ports-checks
May 6, 2022
d7a12f2
Add OS version check
alexgex Apr 21, 2023
ed65b7c
Add OS name and version
alexgex Apr 21, 2023
ea6b856
Temporarily add Ubuntu 18.04 version
alexgex Apr 21, 2023
9fdbf40
Merge pull request #16 from skalenetwork/add-os-version-check
DmytroNazarenko Apr 21, 2023
d022eda
Update sgx check
DmytroNazarenko Jul 26, 2023
b8bc5eb
Merge pull request #17 from skalenetwork/enhancement/sgx-check
alexgex Jul 26, 2023
fb51265
Add OSError handling to internal_ports check
alexgex Aug 21, 2023
b4da41a
Merge pull request #19 from skalenetwork/Improve-internal_ports-check…
alexgex Aug 21, 2023
c696ea1
Update skale.py version to 6.1dev4
alexgex Jan 3, 2024
4e30462
Update skale.py version to 6.2dev0
alexgex Jan 4, 2024
b47a29d
Merge pull request #21 from skalenetwork/update-skale-py-to-v6.1dev4
alexgex Jan 4, 2024
73e3aa8
Rename web3 methods using snake casing
alexgex Jan 4, 2024
dd46022
Merge pull request #22 from skalenetwork/rename-web3-methods
alexgex Jan 4, 2024
b26a420
Update skale.py to 6.2b0
badrogger Apr 5, 2024
5d40c77
Switch to python3.11
badrogger Apr 5, 2024
36b28f8
Merge pull request #23 from skalenetwork/update-skale.py
badrogger Apr 5, 2024
86628f5
Add 'finishedAt' field to containers data
alexgex Apr 22, 2024
375d21b
Merge pull request #24 from skalenetwork/add-container-finish-time
alexgex Apr 22, 2024
c61a905
Add intro
DmytroNazarenko Sep 11, 2024
6c2a9f5
Update to the new SGX check response
alexgex Sep 27, 2024
b29837d
Merge pull request #27 from skalenetwork/improve-sgx-check
alexgex Sep 27, 2024
a84057a
Update calculate_version.sh
DmytroNazarenko Oct 3, 2024
4c9b698
Update publish.yml
DmytroNazarenko Oct 3, 2024
9dfbe27
Merge pull request #29 from skalenetwork/update-branch-naming
DmytroNazarenko Oct 3, 2024
65e17bc
Merge pull request #30 from skalenetwork/develop
DmytroNazarenko Oct 3, 2024
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
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 100
exclude = .git,__pycache__,build,dist,venv
54 changes: 54 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and publish
on:
pull_request:
types: [closed]
branches:
- main
- develop
- beta

jobs:
build:
runs-on: ubuntu-latest
if: github.event.pull_request.merged
strategy:
matrix:
python-version: [3.11]
env:
PIP_USERNAME: ${{ secrets.PIP_USERNAME }}
PIP_PASSWORD: ${{ secrets.PIP_PASSWORD }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -e .[dev]
pip install wheel
- name: Build library
run: |
export BRANCH=${GITHUB_REF##*/}
echo "Branch $BRANCH"
export VERSION=$(bash ./scripts/calculate_version.sh)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Version $VERSION"
bash ./scripts/build.sh
- name: Publish to pip
run: |
bash ./scripts/publish.sh
- name: Checkout code
uses: actions/checkout@master
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
draft: false
prerelease: true
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: Install python dependencies
run: |
pip install -e .[dev]
- name: Lint with flake8
run: |
flake8 .
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

# Idea
.idea/
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,54 @@
# skale-checks
Python package for node and schain checks

## Requirements

* Python 3.7+ compatible

## Installation

```bash
pip install skale-checks
```

## Node checks

Get checks for node on the network, including contract checks and watchdog checks.

```python
from skale_checks.checks.node import NodeChecks

node_checks = NodeChecks(skale,
node_id,
network='mainnet',
es_credentials=(ES_ENDPOINT, ES_LOGIN, ES_PASSWORD),
timeout=10)
results = node_checks.get()
```

* `skale` - instance of skale
* `node_id` - id od the node to check
* `network` - `mainnet` | `testnet`, `mainnet` by default, **optional**
* `es_credentials` - tuple of elasticsearch endpoint, login and password, **optional**
* `timeout` - watchdog checks timeout, 10 by default, **optional**

## Watchdog checks

Get checks from specific watchdog. Collect all checks from remote node instance

```python
from skale_checks.checks.watchdog import WatchdogChecks

wd_checks = WatchdogChecks(ip,
network='testnet',
domain_name=None,
web3=None,
timeout=None)
results = wd_checks.get()
```

* `ip` - node ip with watchdog
* `network` - `mainnet` | `testnet`, `mainnet` by default, **optional**
* `domain_name` - node domain name (for ssl check), **optional**
* `web3` - Web3 instance (for endpoint check), **optional**
* `timeout` - connection timeout for watchdog, **optional**
Loading
Loading