Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into refactor/rpc-interval
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/packages.json
#	packages/valory/agents/trader/aea-config.yaml
#	packages/valory/services/trader/service.yaml
#	packages/valory/skills/decision_maker_abci/skill.yaml
#	packages/valory/skills/trader_abci/skill.yaml
#	packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml
#	poetry.lock
  • Loading branch information
Adamantios committed May 29, 2024
2 parents 30f2f8b + 3802029 commit 76b5a19
Show file tree
Hide file tree
Showing 20 changed files with 554 additions and 90 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": "bafybeihnict3irtvnyxtkwyg6wphe44wz3dogijiha45xrkcrh5ktq2lsi",
"contract/valory/relayer/0.1.0": "bafybeiaabvxim4blp5fxb6qjlzjivtvkme3fk24h5jte7w6vr6rsx72j6u",
"skill/valory/market_manager_abci/0.1.0": "bafybeicbvxvjkoksbknujaid5hx7krjlgm6barcjcwo33tdccanrcp674a",
"skill/valory/decision_maker_abci/0.1.0": "bafybeiaxfuorncn6upx657gpaj5fbcput7c2bur7m7bbupnzdsrgah4eau",
"skill/valory/trader_abci/0.1.0": "bafybeib3vemqm7z4q533g7kg4uotnzweuolfxmnbyep3m3bs4glyj3acmm",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeib4xfyeewec2x3b5267anyxryux63q3i67spovckqdjjlmikpfrni",
"skill/valory/decision_maker_abci/0.1.0": "bafybeicqu2z4npcj2gj5mk5z7wgddgmaswpzvz7tlpxqd3ohagvo3nxyam",
"skill/valory/trader_abci/0.1.0": "bafybeigkad7k3hakpvuqj7thmyr2lq2efwvlmqw3lgvksua7gm722lhv5m",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeifckmb7jntzaxffih4zljjjoap6z2s24w3775a3wpudt36pb2in7u",
"skill/valory/staking_abci/0.1.0": "bafybeigo7bicej5t2rbki37cmcwkzgwpcnopokn7ijhylmkihsbqw47xr4",
"skill/valory/check_stop_trading_abci/0.1.0": "bafybeickfeuqlpmryegnfvfu2duk2v4ycowwloohu3xxrafd5md6xl5swi",
"agent/valory/trader/0.1.0": "bafybeiagrxyszagakaon5keyhnrhxej56kfm45b3skcd5a7r2pszr3gtce",
"service/valory/trader/0.1.0": "bafybeihyytxumawhbwlcedwz6jzyg6m2fzc6l7oiwvhdwrxmehcxu2zsce"
"agent/valory/trader/0.1.0": "bafybeiconooi2wspjkju6qfxhzia627i6vnrx7v7yjwyzvus2m57d26sry",
"service/valory/trader/0.1.0": "bafybeic2jxicqdvpijfp43tf5inejeqm6hgbbouvdj56237sllhvp6gsja"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi",
Expand All @@ -41,6 +41,7 @@
"connection/valory/ledger/0.19.0": "bafybeig7woeog4srdby75hpjkmx4rhpkzncbf4h2pm5r6varsp26pf2uhu",
"connection/valory/p2p_libp2p_client/0.1.0": "bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e",
"connection/valory/ipfs/0.1.0": "bafybeieaq56usnosbwdslmo6i2yvttwpsm6djvawsowq3jt6bkjwhw3tl4",
"connection/valory/http_server/0.22.0": "bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m",
"skill/valory/abstract_abci/0.1.0": "bafybeieh4ei3qdelmacnm7vwq57phoewgumr3udvxt6pybmuggwc3yk65q",
"skill/valory/reset_pause_abci/0.1.0": "bafybeiameewywqigpupy3u2iwnkfczeiiucue74x2l5lbge74rmw6bgaie",
"skill/valory/registration_abci/0.1.0": "bafybeieu7vq3pyns4t5ty6u3sbmpkd7yznpg3rmqifoz3jhy7pmqyg3w6q",
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:bafybeieaq56usnosbwdslmo6i2yvttwpsm6djvawsowq3jt6bkjwhw3tl4
- valory/ledger:0.19.0:bafybeig7woeog4srdby75hpjkmx4rhpkzncbf4h2pm5r6varsp26pf2uhu
- valory/p2p_libp2p_client:0.1.0:bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e
- valory/http_server:0.22.0:bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m
contracts:
- valory/gnosis_safe:0.1.0:bafybeidcb25wneezfd2iaiqa7ygxlimwwacvycahhenvpw7tdvwdigllzm
- valory/gnosis_safe_proxy_factory:0.1.0:bafybeidwwhkqin3zchbjl7ro6n3tj5kwbfhfvmrdpuxn7owy3b4ktrluba
Expand Down Expand Up @@ -44,10 +45,10 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeiameewywqigpupy3u2iwnkfczeiiucue74x2l5lbge74rmw6bgaie
- valory/termination_abci:0.1.0:bafybeif2zim2de356eo3sipkmoev5emwadpqqzk3huwqarywh4tmqt3vzq
- valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeib4xfyeewec2x3b5267anyxryux63q3i67spovckqdjjlmikpfrni
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeifckmb7jntzaxffih4zljjjoap6z2s24w3775a3wpudt36pb2in7u
- valory/market_manager_abci:0.1.0:bafybeicbvxvjkoksbknujaid5hx7krjlgm6barcjcwo33tdccanrcp674a
- valory/decision_maker_abci:0.1.0:bafybeiaxfuorncn6upx657gpaj5fbcput7c2bur7m7bbupnzdsrgah4eau
- valory/trader_abci:0.1.0:bafybeib3vemqm7z4q533g7kg4uotnzweuolfxmnbyep3m3bs4glyj3acmm
- valory/decision_maker_abci:0.1.0:bafybeicqu2z4npcj2gj5mk5z7wgddgmaswpzvz7tlpxqd3ohagvo3nxyam
- valory/trader_abci:0.1.0:bafybeigkad7k3hakpvuqj7thmyr2lq2efwvlmqw3lgvksua7gm722lhv5m
- valory/staking_abci:0.1.0:bafybeigo7bicej5t2rbki37cmcwkzgwpcnopokn7ijhylmkihsbqw47xr4
- valory/check_stop_trading_abci:0.1.0:bafybeickfeuqlpmryegnfvfu2duk2v4ycowwloohu3xxrafd5md6xl5swi
- valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e
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 @@ -225,6 +226,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/}
rpc_sleep_time: ${int:10}
mech_interaction_sleep_time: ${int:10}
benchmarking_mode:
Expand Down Expand Up @@ -275,3 +277,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:bafybeiagrxyszagakaon5keyhnrhxej56kfm45b3skcd5a7r2pszr3gtce
agent: valory/trader:0.1.0:bafybeiconooi2wspjkju6qfxhzia627i6vnrx7v7yjwyzvus2m57d26sry
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 @@ -131,6 +135,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/}
rpc_sleep_time: ${RPC_SLEEP_TIME:int:10}
mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10}
benchmark_tool: &id004
Expand Down Expand Up @@ -253,6 +258,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/}
rpc_sleep_time: ${RPC_SLEEP_TIME:int:10}
mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10}
benchmark_tool: *id004
Expand Down Expand Up @@ -355,6 +361,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/}
rpc_sleep_time: ${RPC_SLEEP_TIME:int:10}
mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10}
benchmark_tool: *id004
Expand Down Expand Up @@ -457,6 +464,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/}
rpc_sleep_time: ${RPC_SLEEP_TIME:int:10}
mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10}
benchmark_tool: *id004
Expand Down Expand Up @@ -511,3 +519,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 76b5a19

Please sign in to comment.