Skip to content

Commit f09ab67

Browse files
authored
Merge pull request #318 from lidofinance/develop
Develop
2 parents 978ebd4 + bd046fb commit f09ab67

File tree

24 files changed

+1994
-1921
lines changed

24 files changed

+1994
-1921
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
* @lidofinance/lido-valset-oracles
12
.github @lidofinance/review-gh-workflows

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Integration tests with pytest
3333
if: success() || failure()
3434
run: |
35-
poetry run pytest tests -m integration
35+
poetry run pytest tests -m integration -v -s --log-cli-level=INFO --tb=short
3636
env:
3737
WEB3_RPC_ENDPOINTS: ${{ secrets.WEB3_RPC_ENDPOINT }}
3838
TESTNET_WEB3_RPC_ENDPOINTS: 'https://ethereum-holesky-rpc.publicnode.com'

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends -qq \
44
gcc=4:12.2.0-3 \
55
libffi-dev=3.4.4-1 \
66
g++=4:12.2.0-3 \
7-
curl=7.88.1-10+deb12u8 \
7+
curl=7.88.1-10+deb12u14 \
88
&& apt-get clean \
99
&& rm -rf /var/lib/apt/lists/*
1010

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Unvetting is the proces of decreasing approved depositable signing keys.
6767

6868
| Variable | Default | Description |
6969
|-----------------------------------|---------------|--------------------------------------------------------------------------------------------------------------------------|
70+
| BLOCKS_BETWEEN_EXECUTION | 1 | Number of blocks in the interval of bot execution |
7071
| MIN_PRIORITY_FEE | 50 mwei | Min priority fee that will be used in tx |
7172
| MAX_PRIORITY_FEE | 10 gwei | Max priority fee that will be used in tx |
7273
| MAX_GAS_FEE | 100 gwei | Bot will wait for a lower price. Treshold for gas_fee |

poetry.lock

Lines changed: 1579 additions & 1667 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ include = [
1111
package-mode = false
1212

1313
[tool.poetry.dependencies]
14-
python = ">=3.10,<3.13"
14+
python = ">=3.12,<4.0"
1515
numpy = "1.26.4"
16-
prometheus-client = "0.20.0"
17-
web3-multi-provider = "^0.6.0"
16+
prometheus-client = "0.21.1"
17+
web3-multi-provider = { version = "^2.2.0", extras = ["metrics"] }
1818
schema = "^0.7.5"
1919
websocket-client = "^1.4.1"
2020
confluent-kafka = "^2.2.0"
21-
web3 = "^6.10.0"
21+
web3 = "^7.0.0"
2222

2323
[tool.poetry.group.dev.dependencies]
2424
ruff = "^0.4.4"

src/blockchain/deposit_strategy/deposit_transaction_sender.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from eth_account.account import VRS
77
from eth_typing import Hash32
88
from transport.msg_types.deposit import DepositMessage
9+
from utils.bytes import from_hex_string_to_bytes
910
from web3.contract.contract import ContractFunction
1011

1112
logger = logging.getLogger(__name__)
@@ -37,8 +38,8 @@ def prepare_and_send(
3738

3839
def _prepare_general_tx(self, quorum: list[DepositMessage]):
3940
block_number = quorum[0]['blockNumber']
40-
block_hash = Hash32(bytes.fromhex(quorum[0]['blockHash'][2:]))
41-
deposit_root = Hash32(bytes.fromhex(quorum[0]['depositRoot'][2:]))
41+
block_hash = Hash32(from_hex_string_to_bytes(quorum[0]['blockHash']))
42+
deposit_root = Hash32(from_hex_string_to_bytes(quorum[0]['depositRoot']))
4243
staking_module_id = quorum[0]['stakingModuleId']
4344
staking_module_nonce = quorum[0]['nonce']
4445
payload = b''

src/blockchain/web3_extentions/middleware.py

Lines changed: 0 additions & 82 deletions
This file was deleted.

src/blockchain/web3_extentions/private_relay.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _build_mev_send_bundle_params(self, tx: SignedTransaction, timeout_in_blocks
8282
"""
8383
return [
8484
{
85-
'tx': tx.rawTransaction.hex(),
85+
'tx': tx.raw_transaction.hex(),
8686
'maxBlockNumber': hex(self.w3.eth.get_block('pending')['number'] + timeout_in_blocks),
8787
'preferences': {
8888
'builders': [

src/blockchain/web3_extentions/transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def relay_send(self, signed_tx: SignedTransaction, timeout_in_blocks: int) -> bo
118118

119119
def classic_send(self, signed_tx: SignedTransaction, timeout_in_blocks: int) -> bool:
120120
try:
121-
tx_hash = self.w3.eth.send_raw_transaction(signed_tx.rawTransaction)
121+
tx_hash = self.w3.eth.send_raw_transaction(signed_tx.raw_transaction)
122122
except Exception as error:
123123
logger.error({'msg': 'Transaction reverted.', 'value': str(error)})
124124
return False

0 commit comments

Comments
 (0)