The expiration of a transaction should be expressed in UTC format
In clive/models.py:38
, there is HiveDateTime.now()
call but should be HiveDateTime.utcnow()
The following error response is returned by hive (pasted for a future reverse lookup):
{'jsonrpc': '2.0', 'error': {'code': -32000, 'message': 'transaction expiration exception:', 'data': {'code': 4030100, 'name': 'transaction_expiration_exception', 'message': 'transaction expiration exception', 'stack': [{'context': {'level': 'error', 'file': 'database.cpp', 'line': 4866, 'method': 'validate_transaction', 'hostname': '', 'timestamp': '2023-05-29T09:14:58'}, 'format': '', 'data': {'trx.expiration': '2023-05-29T11:44:57', 'now': '2023-05-29T09:14:57', 'max_til_exp': 3600}}, {'context': {'level': 'warn', 'file': 'database.cpp', 'line': 5008, 'method': '_apply_transaction', 'hostname': '', 'timestamp': '2023-05-29T09:14:58'}, 'format': '', 'data': {'full_transaction->get_transaction()': {'ref_block_num': 1, 'ref_block_prefix': 2649893707, 'expiration': '2023-05-29T11:44:57', 'operations': [{'type': 'transfer_operation', 'value': {'from': 'initminer', 'to': 'null', 'amount': {'amount': '1000', 'precision': 3, 'nai': '@@000000021'}, 'memo': ''}}], 'extensions': [], 'signatures': ['201e438d0adc957cbb74923dd7a73b2a37c641f7ac48053ba29bb9c13a2e6cf4bb60ecc3d03136fa3496e85a5000a45793b2e0694aa067753d107f5ddc5c06075d']}}}, {'context': {'level': 'warn', 'file': 'database.cpp', 'line': 1317, 'method': 'push_transaction', 'hostname': '', 'timestamp': '2023-05-29T09:14:58'}, 'format': '', 'data': {'trx': {'ref_block_num': 1, 'ref_block_prefix': 2649893707, 'expiration': '2023-05-29T11:44:57', 'operations': [{'type': 'transfer_operation', 'value': {'from': 'initminer', 'to': 'null', 'amount': {'amount': '1000', 'precision': 3, 'nai': '@@000000021'}, 'memo': ''}}], 'extensions': [], 'signatures': ['201e438d0adc957cbb74923dd7a73b2a37c641f7ac48053ba29bb9c13a2e6cf4bb60ecc3d03136fa3496e85a5000a45793b2e0694aa067753d107f5ddc5c06075d']}}}, {'context': {'level': 'warn', 'file': 'chain_plugin.cpp', 'line': 1264, 'method': 'determine_encoding_and_accept_transaction', 'hostname': '', 'timestamp': '2023-05-29T09:14:58'}, 'format': '', 'data': {}}]}}, 'id': 0}
Take look at the 'trx.expiration': '2023-05-29T11:44:57'
and 'now': '2023-05-29T09:14:57'
Edited by Mateusz Żebrak