Skip to content

Commit

Permalink
Merge pull request #262 from valory-xyz/feat/healthcheck
Browse files Browse the repository at this point in the history
Feat/healthcheck
  • Loading branch information
Adamantios authored May 29, 2024
2 parents 97f0968 + 9f169d7 commit 3802029
Show file tree
Hide file tree
Showing 20 changed files with 687 additions and 337 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/common_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Install dependencies
run: pip install tomte[tox,cli]==0.2.14
- name: Check copyright headers
run: tomte check-copyright --author valory --exclude-part abci --exclude-part http_client --exclude-part ipfs --exclude-part ledger --exclude-part p2p_libp2p_client --exclude-part gnosis_safe --exclude-part gnosis_safe_proxy_factory --exclude-part multisend --exclude-part service_registry --exclude-part protocols --exclude-part abstract_abci --exclude-part abstract_round_abci --exclude-part registration_abci --exclude-part reset_pause_abci --exclude-part termination_abci --exclude-part transaction_settlement_abci --exclude-part websocket_client --exclude-part contract_subscription --exclude-part mech --exclude-part mech_interact_abci
run: tomte check-copyright --author valory --exclude-part abci --exclude-part http_client --exclude-part ipfs --exclude-part ledger --exclude-part p2p_libp2p_client --exclude-part gnosis_safe --exclude-part gnosis_safe_proxy_factory --exclude-part multisend --exclude-part service_registry --exclude-part protocols --exclude-part abstract_abci --exclude-part abstract_round_abci --exclude-part registration_abci --exclude-part reset_pause_abci --exclude-part termination_abci --exclude-part transaction_settlement_abci --exclude-part websocket_client --exclude-part contract_subscription --exclude-part mech --exclude-part mech_interact_abci --exclude-part http_server
- name: License compatibility check
run: tox -e liccheck
- name: Check dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ packages/valory/connections/http_client/
packages/valory/connections/ipfs/
packages/valory/connections/ledger/
packages/valory/connections/p2p_libp2p_client/
packages/valory/connections/http_server/

packages/valory/skills/abstract_abci/
packages/valory/skills/abstract_round_abci/
Expand Down
1 change: 1 addition & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ fc7d0697d1543849b07750430843e6b01426cc7a:packages/valory/services/trader_omen_gn
ae28aeb8ad56e1873bfb3996c5d5ad8367709cd1:packages/valory/skills/decision_maker_abci/skill.yaml:generic-api-key:186
ae28aeb8ad56e1873bfb3996c5d5ad8367709cd1:packages/valory/skills/trader_abci/skill.yaml:generic-api-key:154

9d8617ddd58c172f8d9dd32a7b74f22aa3d27dfb:packages/valory/skills/mech_interact_abci/skill.yaml:generic-api-key:151
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ generators: clean-cache fix-abci-app-specs

.PHONY: common-checks-1
common-checks-1:
tomte check-copyright --author valory --exclude-part abci --exclude-part http_client --exclude-part ipfs --exclude-part ledger --exclude-part p2p_libp2p_client --exclude-part gnosis_safe --exclude-part gnosis_safe_proxy_factory --exclude-part multisend --exclude-part service_registry --exclude-part protocols --exclude-part abstract_abci --exclude-part abstract_round_abci --exclude-part registration_abci --exclude-part reset_pause_abci --exclude-part termination_abci --exclude-part transaction_settlement_abci --exclude-part websocket_client --exclude-part contract_subscription --exclude-part mech --exclude-part mech_interact_abci
tomte check-copyright --author valory --exclude-part abci --exclude-part http_client --exclude-part ipfs --exclude-part ledger --exclude-part p2p_libp2p_client --exclude-part gnosis_safe --exclude-part gnosis_safe_proxy_factory --exclude-part multisend --exclude-part service_registry --exclude-part protocols --exclude-part abstract_abci --exclude-part abstract_round_abci --exclude-part registration_abci --exclude-part reset_pause_abci --exclude-part termination_abci --exclude-part transaction_settlement_abci --exclude-part websocket_client --exclude-part contract_subscription --exclude-part mech --exclude-part mech_interact_abci --exclude-part http_server
tomte check-doc-links
tox -p -e check-hash -e check-packages -e check-doc-hashes -e analyse-service

Expand Down
11 changes: 6 additions & 5 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"contract/valory/transfer_nft_condition/0.1.0": "bafybeicgpoag2lymofz3vnen76q7gtig5hzimn32o57php4uerr6t25em4",
"contract/valory/relayer/0.1.0": "bafybeiaabvxim4blp5fxb6qjlzjivtvkme3fk24h5jte7w6vr6rsx72j6u",
"skill/valory/market_manager_abci/0.1.0": "bafybeidygkw7mwhbk3ry3au5c5265vms5eti375v5jthd4be5dfnnoache",
"skill/valory/decision_maker_abci/0.1.0": "bafybeih55udteiz7jilx34n5zpqnata5eqznupdt5tdghk4strrvifexfe",
"skill/valory/trader_abci/0.1.0": "bafybeibwjzitxodjzk3pt26tdusie63imnkipydimbxp5jrbcu4lrqremi",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeic6jsc64vhhopsrgrycq2rqoqrndfexxant5mlnkj4dxvv7lmulfa",
"skill/valory/decision_maker_abci/0.1.0": "bafybeifujiftvyib3uzzxumjotufnicjye3ksgirynividdrwsbmpzxdx4",
"skill/valory/trader_abci/0.1.0": "bafybeihov4yb2nwzicztd3u3s2omx6aac2llerwm7patqctkwyodht7see",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiha5puirahfuauskvvmf5qurpatcmy7d35wlcbnzsdcalej3u2paq",
"skill/valory/staking_abci/0.1.0": "bafybeicsydq6fdansf7qrmrygzchl3h6rtkdw5rmx2jyrwecj4laj5nehy",
"skill/valory/check_stop_trading_abci/0.1.0": "bafybeidyc5fvw5wosbc3anxxxog5b67cfmvrsrltjh3cfllye3bb43r3z4",
"agent/valory/trader/0.1.0": "bafybeidmupyuaen4vomcg67sskvp4xipq46rvbu77ri75oaozuzj7iklpm",
"service/valory/trader/0.1.0": "bafybeicl7yrzs4vf7y36bz4wpp6brkoh3uuyydddb7dnigvlx32jliughq"
"agent/valory/trader/0.1.0": "bafybeiclw3cbhvxtkgyp3eny3mh6a6owwa7idmlumqms74b6evnsfdecqu",
"service/valory/trader/0.1.0": "bafybeieiueooboziej3xj5mtm2h3ms64aum6sjr3nygzavt2fdisgb3wie"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi",
Expand All @@ -41,6 +41,7 @@
"connection/valory/ledger/0.19.0": "bafybeic3ft7l7ca3qgnderm4xupsfmyoihgi27ukotnz7b5hdczla2enya",
"connection/valory/p2p_libp2p_client/0.1.0": "bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e",
"connection/valory/ipfs/0.1.0": "bafybeihndk6hohj3yncgrye5pw7b7w2kztj3avby5u5mfk2fpjh7hqphii",
"connection/valory/http_server/0.22.0": "bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m",
"skill/valory/abstract_abci/0.1.0": "bafybeihat4giyc4bz6zopvahcj4iw53356pbtwfn7p4d5yflwly2qhahum",
"skill/valory/reset_pause_abci/0.1.0": "bafybeidw4mbx3os3hmv7ley7b3g3gja7ydpitr7mxbjpwzxin2mzyt5yam",
"skill/valory/registration_abci/0.1.0": "bafybeiek7zcsxbucjwzgqfftafhfrocvc7q4yxllh2q44jeemsjxg3rcfm",
Expand Down
16 changes: 12 additions & 4 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ connections:
- valory/ipfs:0.1.0:bafybeihndk6hohj3yncgrye5pw7b7w2kztj3avby5u5mfk2fpjh7hqphii
- valory/ledger:0.19.0:bafybeic3ft7l7ca3qgnderm4xupsfmyoihgi27ukotnz7b5hdczla2enya
- valory/p2p_libp2p_client:0.1.0:bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e
- valory/http_server:0.22.0:bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m
contracts:
- valory/gnosis_safe:0.1.0:bafybeibq77mgzhyb23blf2eqmia3kc6io5karedfzhntvpcebeqdzrgyqa
- valory/gnosis_safe_proxy_factory:0.1.0:bafybeib6podeifufgmawvicm3xyz3uaplbcrsptjzz4unpseh7qtcpar74
Expand Down Expand Up @@ -44,10 +45,10 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeidw4mbx3os3hmv7ley7b3g3gja7ydpitr7mxbjpwzxin2mzyt5yam
- valory/termination_abci:0.1.0:bafybeihq6qtbwt6i53ayqym63vhjexkcppy26gguzhhjqywfmiuqghvv44
- valory/transaction_settlement_abci:0.1.0:bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeic6jsc64vhhopsrgrycq2rqoqrndfexxant5mlnkj4dxvv7lmulfa
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiha5puirahfuauskvvmf5qurpatcmy7d35wlcbnzsdcalej3u2paq
- valory/market_manager_abci:0.1.0:bafybeidygkw7mwhbk3ry3au5c5265vms5eti375v5jthd4be5dfnnoache
- valory/decision_maker_abci:0.1.0:bafybeih55udteiz7jilx34n5zpqnata5eqznupdt5tdghk4strrvifexfe
- valory/trader_abci:0.1.0:bafybeibwjzitxodjzk3pt26tdusie63imnkipydimbxp5jrbcu4lrqremi
- valory/decision_maker_abci:0.1.0:bafybeifujiftvyib3uzzxumjotufnicjye3ksgirynividdrwsbmpzxdx4
- valory/trader_abci:0.1.0:bafybeihov4yb2nwzicztd3u3s2omx6aac2llerwm7patqctkwyodht7see
- valory/staking_abci:0.1.0:bafybeicsydq6fdansf7qrmrygzchl3h6rtkdw5rmx2jyrwecj4laj5nehy
- valory/check_stop_trading_abci:0.1.0:bafybeidyc5fvw5wosbc3anxxxog5b67cfmvrsrltjh3cfllye3bb43r3z4
- valory/mech_interact_abci:0.1.0:bafybeigkvcluq2kejpxdcb54iwqtvwhov5elg3cv4v2yomwjxyu5u7g7hi
Expand Down Expand Up @@ -159,7 +160,7 @@ models:
multisend_batch_size: ${int:1}
drand_public_key: ${str:868f005eb8e6e4ca0a47c8a77ceaa5309a47978a7c71bc5cce96366b5d7a569937c529eeda66c7293784a9402801af31}
service_registry_address: ${str:null}
agent_registry_address: ${str:null}
agent_registry_address: ${str:0xE49CB081e8d96920C38aA7AB90cb0294ab4Bc8EA}
share_tm_config_on_startup: ${bool:false}
sleep_time: ${int:10}
tendermint_p2p_url: ${str:localhost:26656}
Expand Down Expand Up @@ -224,6 +225,7 @@ models:
contract_timeout: ${float:300.0}
file_hash_to_strategies_json: ${list:[["bafybeihufqu2ra7vud4h6g2nwahx7mvdido7ff6prwnib2tdlc4np7dw24",["bet_amount_per_threshold"]],["bafybeif55cu7cf6znyma7kxus4wxa2doarhau2xmndo57iegshxorivwmq",["kelly_criterion"]]]}
strategies_kwargs: ${list:[["bet_kelly_fraction",0.5],["floor_balance",500000000000000000],["bet_amount_per_threshold",{"0.0":0,"0.1":0,"0.2":0,"0.3":0,"0.4":0,"0.5":0,"0.6":60000000000000000,"0.7":90000000000000000,"0.8":100000000000000000,"0.9":1000000000000000000,"1.0":10000000000000000000}]]}
service_endpoint: ${str:https://trader.staging.autonolas.tech/}
benchmarking_mode:
args:
enabled: ${bool:false}
Expand Down Expand Up @@ -272,3 +274,9 @@ config:
chain_id: ${int:100}
poa_chain: ${bool:false}
default_gas_price_strategy: ${str:eip1559}
---
public_id: valory/http_server:0.22.0:bafybeicblltx7ha3ulthg7bzfccuqqyjmihhrvfeztlgrlcoxhr7kf6nbq
type: connection
config:
host: ${str:0.0.0.0}
target_skill_id: valory/trader_abci:0.1.0
18 changes: 16 additions & 2 deletions packages/valory/services/trader/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ license: Apache-2.0
fingerprint:
README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq
fingerprint_ignore_patterns: []
agent: valory/trader:0.1.0:bafybeidmupyuaen4vomcg67sskvp4xipq46rvbu77ri75oaozuzj7iklpm
agent: valory/trader:0.1.0:bafybeiclw3cbhvxtkgyp3eny3mh6a6owwa7idmlumqms74b6evnsfdecqu
number_of_agents: 4
deployment: {}
deployment:
agent:
ports:
0:
8000: 8000
---
public_id: valory/trader_abci:0.1.0
type: skill
Expand Down Expand Up @@ -130,6 +134,7 @@ type: skill
"0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"], ["nft_amount", "100"], ["payment_token",
"0x0000000000000000000000000000000000000000"], ["order_address", "0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"],
["price", "1000000000000000000"]]}
service_endpoint: ${SERVICE_ENDPOINT:str:https://trader.staging.autonolas.tech/}
benchmark_tool: &id004
args:
log_dir: ${LOG_DIR:str:/benchmarks}
Expand Down Expand Up @@ -249,6 +254,7 @@ type: skill
"0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"], ["nft_amount", "100"], ["payment_token",
"0x0000000000000000000000000000000000000000"], ["order_address", "0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"],
["price", "1000000000000000000"]]}
service_endpoint: ${SERVICE_ENDPOINT:str:https://trader.staging.autonolas.tech/}
benchmark_tool: *id004
2:
models:
Expand Down Expand Up @@ -348,6 +354,7 @@ type: skill
"0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"], ["nft_amount", "100"], ["payment_token",
"0x0000000000000000000000000000000000000000"], ["order_address", "0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"],
["price", "1000000000000000000"]]}
service_endpoint: ${SERVICE_ENDPOINT:str:https://trader.staging.autonolas.tech/}
benchmark_tool: *id004
3:
models:
Expand Down Expand Up @@ -447,6 +454,7 @@ type: skill
"0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"], ["nft_amount", "100"], ["payment_token",
"0x0000000000000000000000000000000000000000"], ["order_address", "0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"],
["price", "1000000000000000000"]]}
service_endpoint: ${SERVICE_ENDPOINT:str:https://trader.staging.autonolas.tech/}
benchmark_tool: *id004
---
public_id: valory/ledger:0.19.0
Expand Down Expand Up @@ -499,3 +507,9 @@ cert_requests:
public_key: ${ACN_NODE_PUBLIC_KEY:str:02d3a830c9d6ea1ae91936951430dee11f4662f33118b02190693be835359a9d77}
save_path: .certs/acn_cosmos_11000.txt
is_abstract: false
---
public_id: valory/http_server:0.22.0:bafybeicblltx7ha3ulthg7bzfccuqqyjmihhrvfeztlgrlcoxhr7kf6nbq
type: connection
config:
host: ${HTTP_SERVER_HOST:str:0.0.0.0}
target_skill_id: valory/trader_abci:0.1.0
4 changes: 2 additions & 2 deletions packages/valory/skills/decision_maker_abci/behaviours/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def _build_multisend_data(
expected_performative = ContractApiMessage.Performative.RAW_TRANSACTION
if response_msg.performative != expected_performative:
self.context.logger.error(
f"Couldn't compile the multisend tx. "
"Couldn't compile the multisend tx. " # type: ignore
f"Expected response performative {expected_performative.value}, " # type: ignore
f"received {response_msg.performative.value}: {response_msg}"
)
Expand Down Expand Up @@ -552,7 +552,7 @@ def _build_multisend_safe_tx_hash(self) -> WaitableConditionType:

if response_msg.performative != ContractApiMessage.Performative.STATE:
self.context.logger.error(
"Couldn't get safe tx hash. Expected response performative "
"Couldn't get safe tx hash. Expected response performative " # type: ignore
f"{ContractApiMessage.Performative.STATE.value}, " # type: ignore
f"received {response_msg.performative.value}: {response_msg}."
)
Expand Down
Loading

0 comments on commit 3802029

Please sign in to comment.