run_service.sh fails when RPC responds with an error (non-expected JSON output)
Closed this issue · 1 comments
jmoreira-valory commented
-----------------------------------------
Checking Autonolas Protocol service state
-----------------------------------------
Your currently minted on-chain service (id 63) mismatches the fetched trader service (v0.9.1):
- Local service hash (v0.9.1): bafybeidru4qhpp7wgx2qqkg74rvp7fytvl45bj2iosalwava4j3hhsedjy
- On-chain service hash (id 63): bafybeid3r54ylrhu7vhrhzqb3vaqrecvpeuksgnfkjryhpt6ofsqqsa2ve
This is most likely caused due to an update of the trader service code.
The script will proceed now to update the on-chain service.
The operator and agent addresses need to have enough funds so that the process is not interrupted.
Checking balance of operator's address (minimum required 0.0500 DAI):
- Address: 0x3786f91c4dF868B34F7aBB81282B5366B3b20680
- Balance: 0.0987 DAI
OK.
Checking balance of agent instance's address (minimum required 0.0500 DAI):
- Address: 0x4C89CEF0d33018b2e45E31926c61fd63de6cBf80
- Balance: 0.1906 DAI
OK.
------------------------------
Updating on-chain service 63
------------------------------
PLEASE, DO NOT INTERRUPT THIS PROCESS.
Cancelling the on-chain service update prematurely could lead to an inconsistent state of the Safe or the on-chain service state, which may require manual intervention to resolve.
[Agent instance] Swapping Safe owner...
- Starting swap_safe_owner.py script...
- Safe address: 0xCC986773cF2078A2a9945f1a1DcfA43EE306b351
- Current owner: 0x4C89CEF0d33018b2e45E31926c61fd63de6cBf80
- New owner: 0x3786f91c4dF868B34F7aBB81282B5366B3b20680
- Loading contracts...
- Building Safe.swapOwner transaction...
- Signing Safe.swapOwner transaction...
- Safe.swapOwner transaction sent. Transaction hash: 0x05c846ff0b4d399ca24655655696457ea27e6378f859f4b3a1e790434c814a06
- Waiting for transaction receipt...
- Safe.swapOwner transaction successfully mined.
- Safe owner successfully swapped from 0x4C89CEF0d33018b2e45E31926c61fd63de6cBf80 to 0x3786f91c4dF868B34F7aBB81282B5366B3b20680
[Service owner] Terminating on-chain service 63...
Finished updating on-chain service 63.
Ensuring on-chain service 63 is in DEPLOYED state...
Checking balance of operator's address (minimum required 0.0250 DAI):
- Address: 0x3786f91c4dF868B34F7aBB81282B5366B3b20680
- Balance: 0.1085 DAI
OK.
Something went wrong while deploying on-chain service. The service's state is TERMINATED_BONDED.
Please check the output of the script and the on-chain registry for more information.
Followed by:
/trader-quickstart$ ./run_service.sh
---------------
Trader runner
---------------
This script will assist you in setting up and running the Trader service (https://github.com/valory-xyz/trader).
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/davidminarsch/.pyenv/versions/3.10.4/lib/python3.10/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/Users/davidminarsch/.pyenv/versions/3.10.4/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/Users/davidminarsch/.pyenv/versions/3.10.4/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Users/davidminarsch/.pyenv/versions/3.10.4/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
jmoreira-valory commented
Addressed in #89