Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
0ec2268
Introduce proxy/db_scheme.py
vasiliy-zaznobin Feb 18, 2022
43d1b28
Merge remote-tracking branch 'origin/develop' into 368-Move_SQL_schem…
vasiliy-zaznobin Feb 18, 2022
075273e
Debug
vasiliy-zaznobin Feb 18, 2022
768bf09
Introduce run-db-creation.sh
vasiliy-zaznobin Feb 21, 2022
09bf1ac
Use entrypoint: proxy/run-db-creation.sh
vasiliy-zaznobin Feb 21, 2022
f2cac17
Add dbcreation.log
vasiliy-zaznobin Feb 21, 2022
d8ecf1b
Debug
vasiliy-zaznobin Feb 21, 2022
68a7841
Debug
vasiliy-zaznobin Feb 21, 2022
d34c8f7
Merge remote-tracking branch 'origin/develop' into 368-Move_SQL_schem…
vasiliy-zaznobin Feb 21, 2022
6a47f6b
Add dbcreation.log
vasiliy-zaznobin Feb 21, 2022
2058f0a
Use from ..proxy
vasiliy-zaznobin Feb 21, 2022
295568e
Debug
vasiliy-zaznobin Feb 21, 2022
8a7047f
Debug
vasiliy-zaznobin Feb 21, 2022
3cf914e
Introduce dbcreation_mode to run proxy
vasiliy-zaznobin Feb 21, 2022
550c46e
Change paths
vasiliy-zaznobin Feb 21, 2022
f22a780
Will run in dbcreation mode with SOLANA_URL and EVM_LOADER
vasiliy-zaznobin Feb 21, 2022
e6c0e43
Debug
vasiliy-zaznobin Feb 21, 2022
acf7bce
Debug
vasiliy-zaznobin Feb 21, 2022
eaf23d2
Debug
vasiliy-zaznobin Feb 21, 2022
5a0306b
SOLANA_URL: http://solana:8899
vasiliy-zaznobin Feb 21, 2022
27c0e68
Add logged_groups
vasiliy-zaznobin Feb 21, 2022
0ac19fa
Debug
vasiliy-zaznobin Feb 21, 2022
33515b4
Log schema
vasiliy-zaznobin Feb 21, 2022
f1c2c50
Use psql
vasiliy-zaznobin Feb 21, 2022
8865af4
Add postgresql-client-common in the docker image
vasiliy-zaznobin Feb 21, 2022
1eb1bf9
Add postgresql-client in the docker image
vasiliy-zaznobin Feb 21, 2022
cf47fad
Set network_mode: container:postgres
vasiliy-zaznobin Feb 21, 2022
7b9167c
Remove networks
vasiliy-zaznobin Feb 21, 2022
9355411
Use network_mode: service:postgres
vasiliy-zaznobin Feb 21, 2022
505b3eb
Remove hostname
vasiliy-zaznobin Feb 21, 2022
11fa1bc
Remove hostname
vasiliy-zaznobin Feb 21, 2022
6d9c6ca
ports:
vasiliy-zaznobin Feb 21, 2022
b9c2f7a
networks:
vasiliy-zaznobin Feb 21, 2022
1586797
Add ports:
vasiliy-zaznobin Feb 21, 2022
31b8048
Add networks:
vasiliy-zaznobin Feb 21, 2022
d9154eb
Try to use links: - postgres
vasiliy-zaznobin Feb 21, 2022
b66b803
Use export PGPASSWORD=${POSTGRES_PASSWORD} to set the password for psql
vasiliy-zaznobin Feb 21, 2022
a12fe00
Use run_dbcreation()
vasiliy-zaznobin Feb 21, 2022
7803d3c
Merge remote-tracking branch 'origin/develop' into 368-Move_SQL_schem…
vasiliy-zaznobin Feb 21, 2022
0360208
Merge remote-tracking branch 'origin/develop' into 368-Move_SQL_schem…
vasiliy-zaznobin Feb 23, 2022
94f733a
Correction after the prev merge
vasiliy-zaznobin Feb 23, 2022
92d0201
Correction after the prev merge
vasiliy-zaznobin Feb 23, 2022
ea0dbdc
Lowercase in function names
vasiliy-zaznobin Feb 23, 2022
d02bfee
Refactor to introduce scheme.sql
vasiliy-zaznobin Feb 24, 2022
df19f2d
Debug
vasiliy-zaznobin Feb 24, 2022
6a38f0c
Debug
vasiliy-zaznobin Feb 24, 2022
c94126b
Debug
vasiliy-zaznobin Feb 24, 2022
6bf4cfc
Add table airdrop_scheduled
vasiliy-zaznobin Feb 24, 2022
7560704
Revert some changes
vasiliy-zaznobin Feb 24, 2022
5ab70f3
Fixed: psql:proxy/db/scheme.sql:73: ERROR: syntax error at or near "{"
vasiliy-zaznobin Feb 24, 2022
f6d17d2
Use run_indexer(solana_url)
vasiliy-zaznobin Feb 24, 2022
bb07118
Merge remote-tracking branch 'origin/develop' into 368-Move_SQL_schem…
vasiliy-zaznobin Feb 24, 2022
db54d3b
Use run_airdropper with 7 args
vasiliy-zaznobin Feb 24, 2022
ffab8cd
Remove creation.py
vasiliy-zaznobin Feb 24, 2022
3881bac
Remove creation.py
vasiliy-zaznobin Feb 24, 2022
e5f8f64
Remove dbcreation_mode
vasiliy-zaznobin Feb 25, 2022
37ebf6a
Merge branch 'develop' into 368-Move_SQL_schema_to_distinct_file
rozhkovdmitrii Mar 11, 2022
4832f03
check it
rozhkovdmitrii Mar 11, 2022
46e1c2b
check it
rozhkovdmitrii Mar 11, 2022
f5891cb
Catch "Operator has NO resources!" exception
rozhkovdmitrii Mar 11, 2022
b5811da
Catch "Operator has NO resources!" exception
rozhkovdmitrii Mar 11, 2022
06ae9df
Get rid of create_table in sql_dict.py
rozhkovdmitrii Mar 12, 2022
d05f9d1
Get rid of stuff from sql_dict
rozhkovdmitrii Mar 12, 2022
4ec9a14
Get rid of crating table stuff from TrxReceiptsStorage
rozhkovdmitrii Mar 12, 2022
b092d3d
Roll back NEON_ERC20_MAX_AMOUNT
rozhkovdmitrii Mar 12, 2022
8dd8800
Spit and polish
rozhkovdmitrii Mar 12, 2022
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
Next Next commit
Catch "Operator has NO resources!" exception
  • Loading branch information
rozhkovdmitrii committed Mar 11, 2022
commit b5811da4dc02645e4d73b7308db7a9ef1a842017
18 changes: 12 additions & 6 deletions proxy/testing/test_neon_tx_sender.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import os
import unittest
from solana.rpc.api import Client as SolanaClient

import logged_groups
from unittest.mock import Mock

from proxy.common_neon.eth_proto import Trx as EthTrx
from proxy.common_neon.transaction_sender import NeonTxSender
from proxy.common_neon.solana_interactor import SolanaInteractor
from proxy.memdb.memdb import MemDB
from ..common_neon.eth_proto import Trx as EthTrx
from ..common_neon.transaction_sender import NeonTxSender
from ..common_neon.solana_interactor import SolanaInteractor
from ..memdb.memdb import MemDB


@logged_groups.logged_group("neon.TestCases")
class TestNeonTxSender(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
Expand Down Expand Up @@ -78,8 +80,12 @@ def test_03_validate_execution_when_not_enough_sols_for_all_operator_accounts(se
self.neon_tx_sender._resource_list._min_operator_balance_to_err.return_value = 1_049_000_000 * 1_000_000_000 * 1_000_000_000

with self.assertLogs('neon', level='ERROR') as logs:
with self.assertRaises(RuntimeError):
try:
self.neon_tx_sender._validate_execution()
except RuntimeError:
# TODO: get rid of this eventual raising. Look at https://github.com/neonlabsorg/proxy-model.py/issues/629
self.error("NeonTxSender has raised eventual (flaky) RuntimeError: `Operator has NO resources!` error")

print('logs.output:', str(logs.output))
self.assertRegex(str(logs.output), 'ERROR:neon.Proxy:Operator account [A-Za-z0-9]{40,}:[0-9]+ has NOT enough SOLs; balance = [0-9]+; min_operator_balance_to_err = 1049000000000000000000000000')