Skip to content

Commit

Permalink
Merge pull request #99 from valory-xyz/feat/mech
Browse files Browse the repository at this point in the history
Feat/mech
  • Loading branch information
Adamantios authored Nov 22, 2023
2 parents 043aeed + 1106e91 commit b5fb957
Show file tree
Hide file tree
Showing 81 changed files with 4,170 additions and 771 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox,cli]==0.2.12
pip install tomte[tox,cli]==0.2.14
pip install --upgrade setuptools==60.10.0
- 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 acn --exclude-part contract_api --exclude-part http --exclude-part ipfs --exclude-part ledger_api --exclude-part tendermint --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 http_server
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox,cli]==0.2.12
pip install tomte[tox,cli]==0.2.14
pip install --upgrade setuptools==60.10.0
# install Protobuf compiler
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox]==0.2.12
pip install tomte[tox]==0.2.14
pip install --upgrade setuptools==60.10.0
# install Protobuf compiler
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
- if: matrix.os == 'macos-latest'
name: Install dependencies (macos-latest)
run: |
pip install tomte[tox]==0.2.12
pip install tomte[tox]==0.2.14
brew install gcc
# brew install protobuf
# brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
choco install make -y
# to check make was installed
make --version
pip install tomte[tox]==0.2.12
pip install tomte[tox]==0.2.14
# wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-win64.zip
# unzip protoc-24.3-win64.zip -d protoc
# sudo mv protoc/bin/protoc /usr/local/bin/protoc
Expand Down Expand Up @@ -281,7 +281,7 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox]==0.2.12
pip install tomte[tox]==0.2.14
pip install --upgrade setuptools==60.10.0
# install Protobuf compiler
Expand Down
1 change: 1 addition & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# one word per line, to define a file override use ' - filename'
# where filename is relative to this configuration file
IEKit
Mech
TwitterObservation
ScoreAdd
SelectKeeper
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ test:
-rfE packages/valory/skills/llm_abci \
-rfE packages/valory/skills/twitter_write_abci \
-rfE packages/valory/skills/olas_week_abci \
-rfE packages/valory/skills/mech_interact_abci \
--cov=packages.valory.skills.ceramic_read_abci \
--cov=packages.valory.skills.generic_scoring_abci \
--cov=packages.valory.skills.twitter_scoring_abci \
Expand All @@ -101,6 +102,7 @@ test:
--cov=packages.valory.skills.llm_abci \
--cov=packages.valory.skills.twitter_write_abci \
--cov=packages.valory.skills.olas_week_abci \
--cov=packages.valory.skills.mech_interact_abci \
--cov-report=xml --cov-report=term --cov-report=term-missing --cov-config=.coveragerc
find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \;

Expand Down Expand Up @@ -138,6 +140,7 @@ fix-abci-app-specs:
autonomy analyse fsm-specs --update --app-class TwitterWriteAbciApp --package packages/valory/skills/twitter_write_abci/ || (echo "Failed to check twitter_write_abci abci consistency" && exit 1)
autonomy analyse fsm-specs --update --app-class ImpactEvaluatorSkillAbciApp --package packages/valory/skills/impact_evaluator_abci/ || (echo "Failed to check impact_evaluator_abci abci consistency" && exit 1)
autonomy analyse fsm-specs --update --app-class WeekInOlasAbciApp --package packages/valory/skills/olas_week_abci/ || (echo "Failed to check olas_week_abci abci consistency" && exit 1)
autonomy analyse fsm-specs --update --app-class MechInteractAbciApp --package packages/valory/skills/mech_interact_abci/ || (echo "Failed to check mech_interact_abci abci consistency" && exit 1)


.PHONY: all-linters
Expand Down
24 changes: 13 additions & 11 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ certifi = "==2021.10.8"
cryptography = "==39.0.0"
dag-cbor = "==0.3.2"
grpcio = "==1.53.0"
jsonschema = ">=4.16.0,<=4.19.0"
jsonschema = "<4.4.0,>=4.3.0"
jsonpatch = "==1.32"
hypothesis = "==6.21.6"
multiformats = "==0.2.1"
Expand All @@ -27,22 +27,24 @@ pytest = "==7.2.1"
pytest-asyncio = "==0.20.3"
pytest-cov = "==4.0.0"
pytest-randomly = "==3.12.0"
openapi-core = "==0.13.4"
openapi-spec-validator = "==0.2.8"
open-aea = "==1.41.0.post1"
open-aea-ledger-ethereum = "==1.41.0.post1"
open-aea-ledger-cosmos = "==1.41.0.post1"
open-aea-cli-ipfs = "==1.41.0.post1"
open-aea-test-autonomy = "==0.13.4"
open-autonomy = {version = "==0.13.4", extras = [ "all"]}
tomte = {version = "==0.2.12", extras = ["cli", "tests"]}
requests = "==2.28.2"
openapi-core = "==0.15.0"
openapi-spec-validator = "<0.5.0,>=0.4.0"
open-aea = "==1.42"
open-aea-ledger-ethereum = "==1.42"
open-aea-ledger-cosmos = "==1.42"
open-aea-cli-ipfs = "==1.42"
open-aea-test-autonomy = "==0.13.6"
open-autonomy = {version = "==0.13.6", extras = [ "all"]}
tomte = {version = "==0.2.14", extras = ["cli", "tests"]}
requests = "==2.28.1"
openai = "==0.27.2"
bases = "==0.2.1"
typing_validation = "==1.0.0.post2"
typing_extensions = "==4.5.0"
tweepy = "==4.14.0"
twitter_text_parser = "==3.0.0"
py-multibase = "==1.0.3"
py-multicodec = "==0.2.1"
protobuf = "<4.25.0,>=4.21.6"

[requires]
Expand Down
8 changes: 5 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ In order to run a local demo service based on the IEKit:
mkdir your_workspace && cd your_workspace
touch Pipfile && pipenv --python 3.10 && pipenv shell

pipenv install open-autonomy[all]==0.13.2
pipenv install open-autonomy[all]==0.13.6
autonomy init --remote --ipfs --reset --author=your_name
```

2. Fetch the IEKit.

```bash
autonomy fetch valory/impact_evaluator:0.1.0:bafybeiakudcsg45dvnxwjvz4sbqnxf5caooq33gg2p3klgv5bfumypk57a --service
autonomy fetch valory/impact_evaluator:0.1.0:bafybeicvfsemgxzd4ae3btk46yeijkrqzlamapg6onjl7ujlnluivpgbi4 --service
```

3. Build the Docker image of the service agents
Expand Down Expand Up @@ -74,14 +74,15 @@ In order to run a local demo service based on the IEKit:

2. Create a Ceramic Decentralized Identity (DID) using [Glaze](https://github.com/ceramicstudio/js-glaze).

3. Using the DID created in the previous step, create two empty Ceramic streams. You can follow [this tutorial](https://developers.ceramic.network/reference/stream-programs/tile-document/). The service will optionally read generic scores from the first one and will write scores to the second one.
3. Using the DID created in the previous step, create two empty Ceramic streams. The service will optionally read generic scores from the first one and will write scores to the second one.

4. Create an API key for [Infura](https://www.infura.io/) or your preferred provider.

5. Create an `.env` file with the required environment variables, modifying its values to your needs.

```bash
ETHEREUM_LEDGER_RPC=https://goerli.infura.io/v3/<infura_api_key>
ETHEREUM_LEDGER_CHAIN_ID=1
DYNAMIC_CONTRIBUTION_CONTRACT_ADDRESS=0x7C3B976434faE9986050B26089649D9f63314BD8
EARLIEST_BLOCK_TO_MONITOR=16097553
CERAMIC_DID_SEED=<ceramic_seed_did>
Expand All @@ -99,6 +100,7 @@ In order to run a local demo service based on the IEKit:
RESET_PAUSE_DURATION=30
ALL_PARTICIPANTS='["0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65","0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc","0x976EA74026E726554dB657fA54763abd0C3a0aa9","0x14dC79964da2C08b23698B3D3cc7Ca32193d9955"]'
POINTS_TO_IMAGE_HASHES='{"0":"bafybeiabtdl53v2a3irrgrg7eujzffjallpymli763wvhv6gceurfmcemm","100":"bafybeid46w6yzbehir7ackcnsyuasdkun5aq7jnckt4sknvmiewpph776q","50000":"bafybeigbxlwzljbxnlwteupmt6c6k7k2m4bbhunvxxa53dc7niuedilnr4","100000":"bafybeiawxpq4mqckbau3mjwzd3ic2o7ywlhp6zqo7jnaft26zeqm3xsjjy","150000":"bafybeie6k53dupf7rf6622rzfxu3dmlv36hytqrmzs5yrilxwcrlhrml2m"}'
USE_ACN=false
```

and export them:
Expand Down
62 changes: 32 additions & 30 deletions packages/packages.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{
"dev": {
"agent/valory/impact_evaluator/0.1.0": "bafybeibzsx4dhgr757r2nn4j7fbtbssqhvortyw4wr2qtntccjktqm54hq",
"contract/valory/dynamic_contribution/0.1.0": "bafybeibcx2ds2bcrgunbijnnyhionjmvjh2gfoqp6h2utdukwqo45zd3re",
"service/valory/impact_evaluator/0.1.0": "bafybeiakudcsg45dvnxwjvz4sbqnxf5caooq33gg2p3klgv5bfumypk57a",
"skill/valory/dynamic_nft_abci/0.1.0": "bafybeibj7qumdbsd7pubut2kmtcpzaxz2ey4v3virs4mldrzmttkt6wo2m",
"skill/valory/twitter_scoring_abci/0.1.0": "bafybeidomknnbxkuxeywcej3jpr7fhaohouejtjrb7ya7ve3ntnlcfxxbi",
"skill/valory/ceramic_read_abci/0.1.0": "bafybeiall2unkqofaq7khuphm7aekbp7r42ett5hu5zv3pkbedhyzmathu",
"skill/valory/ceramic_write_abci/0.1.0": "bafybeif73tpmbaslwpijsqmrdzb3e5veegaan46tei2fiknnrn2eilhggy",
"skill/valory/impact_evaluator_abci/0.1.0": "bafybeig2s346rktli4a7lh44ffgekizztpo3bwv26l4y2ltzk4d6silv34",
"skill/valory/generic_scoring_abci/0.1.0": "bafybeiclx5ackxojolldx5vug2p5hn3jnu5whqyhpth22gcrd67o322cha",
"agent/valory/impact_evaluator/0.1.0": "bafybeidvjesrs2j7qfs3qy5ehnhxdgc6v4gi2zu52xvvbxpxrxuaq2t2hq",
"contract/valory/dynamic_contribution/0.1.0": "bafybeier3msdnx2mwn5g77y7zqlxz47f6ksozyzpmnx34pcgt52jq6wpim",
"service/valory/impact_evaluator/0.1.0": "bafybeicvfsemgxzd4ae3btk46yeijkrqzlamapg6onjl7ujlnluivpgbi4",
"skill/valory/dynamic_nft_abci/0.1.0": "bafybeigbqomn5weffi5ns4vkfde6gghnx7wjvpmuawrsfbmdhtgoxrkxb4",
"skill/valory/twitter_scoring_abci/0.1.0": "bafybeieojsiu2r4g37d542xlm7tbrvjk2isekcvzzzxg3joriwqgllvh44",
"skill/valory/ceramic_read_abci/0.1.0": "bafybeie7t7jk2hq2cjticbfujosfld3dlnbafxdv7owhxnnj4zmtaujpwa",
"skill/valory/ceramic_write_abci/0.1.0": "bafybeihj37dsm2n6uxf4kh5r7mc734aatfaok24ylk3g2s2bkah54scsiq",
"skill/valory/impact_evaluator_abci/0.1.0": "bafybeig4eojlp62qbjls2ym2m6kescynvjslfcw526rlbzl7h6bzscaf5y",
"skill/valory/generic_scoring_abci/0.1.0": "bafybeidwhspcx4634xwtdnz6xlxhonbyo57d5fvpa4wihfqrfopdcgr6ve",
"protocol/valory/twitter/0.1.0": "bafybeig7dugazhljpb4qtu4zfnoimttvivopiq574rogjz3qggf5eysnk4",
"protocol/valory/llm/1.0.0": "bafybeihj2orqapokafg7co3wlogwgf6cckaaj2bz3nuv4rm3opkoyhrlp4",
"connection/valory/twitter/0.1.0": "bafybeies2hfmhirfw6vkg5jvdi6wxqddrtyroh5qvzqvduvhv3zlets564",
"connection/valory/openai/0.1.0": "bafybeigiib2l2vji4ehr7jm43bwpzhxe4u2ih4ybwy5zwmkpyjmj3k7u3e",
"skill/valory/twitter_write_abci/0.1.0": "bafybeifzxtqnumlm65f764hwx3zbpzpwesniizprj67cacvlaytiwnz4qy",
"skill/valory/llm_abci/0.1.0": "bafybeiap5ar62aj3vzforji33k5wkxngoumdgztutk2i5y3w7avkwx55ua",
"skill/valory/decision_making_abci/0.1.0": "bafybeifxsrfk7jkoacfk654jjpmwaabkwt4t42tuda4rpdyfbsf5rp4mdy",
"service/valory/impact_evaluator_local/0.1.0": "bafybeies5ry3rjodpi2eivzuqx4nyisxhuyvukeudstd7lfotjznt5h4rm",
"skill/valory/olas_week_abci/0.1.0": "bafybeievtrydq4tbscb2vwcrrbe6ilzj2j5isusmv4fy2hdsowce2nncjy"
"connection/valory/twitter/0.1.0": "bafybeigwywkh4ep72pu6yqr4v3qkahj6buo6f4ng5hhgkkgr5fvcv6ztey",
"connection/valory/openai/0.1.0": "bafybeiepsxac7e2tq3mcfkgcx62zt6oiaeic5wwcs4mnv733l762kn62du",
"skill/valory/twitter_write_abci/0.1.0": "bafybeibir25q4i5b3ncslpeifr2zozdxj4xslzvz7o5xhwt6ocszg5pgvm",
"skill/valory/llm_abci/0.1.0": "bafybeibhihrpovqozjofkyfywm2w6hduo2vzwhhfw4a37vkvx32djxdavy",
"skill/valory/decision_making_abci/0.1.0": "bafybeicgesosljwclm7hecqyba663fizzr4m64qivwa6lgzp57dnhuzxby",
"service/valory/impact_evaluator_local/0.1.0": "bafybeicwg4fnbtjzws2dveep5n4bj3hbesox42xpsmp2susrg6xpmp7u5u",
"skill/valory/olas_week_abci/0.1.0": "bafybeic3mwcdh746cxfcwnfwaaxaz6szibqfg6cmvcmyyrktzz35rpwk5m",
"skill/valory/mech_interact_abci/0.1.0": "bafybeifodymmh33fxpulj3mundj33gxq3psbgt3ndkyvyvs5xtaveoiuwa",
"contract/valory/mech/0.1.0": "bafybeiaofbjmqtd725dkowk6x5zbnczdlmyqttdxxzkdyqnjuvrdveb2qu"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii",
Expand All @@ -28,21 +30,21 @@
"protocol/valory/acn/1.1.0": "bafybeic2pxzfc3voxl2ejhcqyf2ehm4wm5gxvgx7bliloiqi2uppmq6weu",
"protocol/valory/ipfs/0.1.0": "bafybeiedxeismnx3k5ty4mvvhlqideixlhqmi5mtcki4lxqfa7uqh7p33u",
"protocol/valory/tendermint/0.1.0": "bafybeig6g6twajlwssfbfp5rlnu5mwzuu5kgak5cs4fich7rlkx6whesnu",
"skill/valory/abstract_abci/0.1.0": "bafybeifmfv4bgt5vzvgawlocksacqeadzg72zs4usvgjaf245hbbptpiki",
"skill/valory/reset_pause_abci/0.1.0": "bafybeiflxcl2dtzayyzzddc4f2astzxunyp66meutornanrgeemicdea5q",
"skill/valory/registration_abci/0.1.0": "bafybeib2whqixp5265d53sa6szkz7woet4awuqr4dekb2hokpgps5codme",
"skill/valory/abstract_round_abci/0.1.0": "bafybeigrqhygo2hl2owisj5rqyh3acdvee773ajije64snlzalcgtaac7q",
"contract/valory/service_registry/0.1.0": "bafybeic4bgql6x5jotp43ddazybmyb7macifjzudavqll3547ayhawttpi",
"connection/valory/abci/0.1.0": "bafybeigzgupmh6kwwx4jbqkw7qri5vr6vz53xbi4uksulh6oiovdplmviu",
"connection/valory/http_client/0.23.0": "bafybeifgeqgryx6b3s6eseyzyezygmeitcpt3tkor2eiycozoi6clgdrny",
"connection/valory/ipfs/0.1.0": "bafybeigfmqvlzbp67fttccpl4hsu3zaztbxv6vd7ikzra2hfppfkalgpji",
"connection/valory/ledger/0.19.0": "bafybeigdckv3e6bz6kfloz4ucqrsufft6k4jp6bwkbbcvh4fxvgbmzq3dm",
"skill/valory/abstract_abci/0.1.0": "bafybeiazmtcljyffmxzbiiq7aw6dhsgcbahpwixbtjeqoqfrcqw3ypzrf4",
"skill/valory/reset_pause_abci/0.1.0": "bafybeiencz2uytz6fqj5wg7mcunevxjh4xg5gd6pqcgkshgqywhcimweyi",
"skill/valory/registration_abci/0.1.0": "bafybeif4tgr7zqzguknrjzxr4h766fxp7vr4tod25xii4jzzwsbvyzdzkq",
"skill/valory/abstract_round_abci/0.1.0": "bafybeidau7loztcfy3mxvoqrv7otbpciemd2wf3lsxyjraq4dcvuvib25e",
"contract/valory/service_registry/0.1.0": "bafybeicwp7b4wrxcko66cfylhnaiwzdupo75ixlcol73ww6vxapx33gtpi",
"connection/valory/abci/0.1.0": "bafybeigrdfpjvfoly6bx2pz2cikdp5ppvmlkhsjvn5p6mgotfaz6m2jtzq",
"connection/valory/http_client/0.23.0": "bafybeiddrfvomrmgvh5yuv2coq7ci72wcdf663stayi3m5aawnj4srggce",
"connection/valory/ipfs/0.1.0": "bafybeihx7wb5hngjobw2salzqqryrhxvmxfuw7o2npjyqd2talmh2flqeq",
"connection/valory/ledger/0.19.0": "bafybeia47rr37ianvwsh77tjjpv3nwif5sywhhy2fbdshnz4a2icwln76a",
"connection/valory/p2p_libp2p_client/0.1.0": "bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq",
"connection/valory/http_server/0.22.0": "bafybeie3d6tj2kzewced4nnttxdvr7njue2ortvawmwdt67gwf4tcuosom",
"connection/valory/http_server/0.22.0": "bafybeiesafy2af2wakqvsal4hz6ldycb73j5w62szhwy25iyhlf2wgyg44",
"contract/valory/gnosis_safe_proxy_factory/0.1.0": "bafybeid2dujvxf2aiys65jfbobu7r3p6jgsg3hvjuwtzuwlh2g5elkqg2y",
"contract/valory/multisend/0.1.0": "bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y",
"skill/valory/transaction_settlement_abci/0.1.0": "bafybeigxkdujugzvve2dszkwr5kgfx4uhz2epofo4lorbcnthmzfjegwzi",
"skill/valory/termination_abci/0.1.0": "bafybeifazwrksp756h7z42qqfcgi6lya6wmhbx46l7ghlaooe45gqnju7q",
"contract/valory/gnosis_safe_proxy_factory/0.1.0": "bafybeigejiv4fkksyjwmr6doo23kfpicfbktuwspbamasyvjusfdyjtrxy",
"contract/valory/gnosis_safe/0.1.0": "bafybeifmsjpgbifvk7y462rhfczvjvpigkdniavghhg5utza3hbnffioq4"
"skill/valory/termination_abci/0.1.0": "bafybeigainmpy37gb33ogbrpggjbkuasodhthh5oz4vbzjdfjozerpf224",
"contract/valory/gnosis_safe/0.1.0": "bafybeifpl2gaym4osfvqnmpewjr5hx2fbmwf6nomhkr5w2wkdosbynx53a",
"skill/valory/transaction_settlement_abci/0.1.0": "bafybeigk3debp6dswutqsuls2lqfvyj4ghe6kwjc2zfinnsvj6hujynxtq"
}
}
Loading

0 comments on commit b5fb957

Please sign in to comment.