A Serverless Application Model stack that persists the $XRP price to the XRPL every minute as a TrustLine. There are no servers, it is effectively a "smart contract" in Python for the XRPL.
While using the JsonRPCClient; the oracle will see an abundance of JSONDecodeErrors that are coming as a result of the server saying it's too busy.
I was aware of this happening, and was swallowing, notifying and then raising FailedExecutionWillRetry
Got a JSONDecodeError of 'Expecting value: line 1 column 1 (char 0)'. Retrying the transaction by failing this execution.
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/var/lang/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/var/task/contract.py", line 45, in <module>
base_fee = get_fee(xrpl_client)
File "/var/task/xrpl/ledger/main.py", line 54, in get_fee
return asyncio.run(main.get_fee(client))
File "/var/lang/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/var/lang/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/var/task/xrpl/asyncio/ledger/main.py", line 64, in get_fee
response = await client.request_impl(Fee())
File "/var/task/xrpl/asyncio/clients/json_rpc_base.py", line 46, in request_impl
return json_to_response(response.json())
File "/var/task/httpx/_models.py", line 1415, in json
return jsonlib.loads(self.text, **kwargs)
File "/var/lang/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/var/lang/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/var/lang/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
While using the
JsonRPCClient
; the oracle will see an abundance ofJSONDecodeError
s that are coming as a result of the server saying it's too busy.I was aware of this happening, and was swallowing, notifying and then raising
FailedExecutionWillRetry