Inconsitency between `broadcast_transaction` and `verify_authority`
I have a rather simple transaction with a comment
that is serialized in python (correctly) and uses the correct chain id and is signed with the correct private key.
Yet the python library (hive-python) failed to broadcast with the exception:
{
'code': 3030000,
'name': 'tx_missing_posting_auth',
'message': 'missing required posting authority',
'stack': [...]
}
What is interesting is that the python lib raises the exception from this code:
try:
if not self.hived.verify_authority(self.json()):
raise InsufficientAuthorityError
except Exception as e:
# There is an issue with some appbase builds which makes
# `verify_authority` unusable. TODO: remove this case #212
if 'Bad Cast:Invalid cast from string_type to Array' in str(e):
log.error("Ignoring verify_authority failure. See #212.")
else:
print("failing on {}".format(e))
raise e
In particular, the verify_authority
(an RPC call to api.hive.blog) throws this exception.
When commenting the block out and still broadcasting the transaction, what I get is another error that makes more sense:
{
'code': 10,
'name': 'assert_exception',
'message': 'Assert Exception',
'stack': [
{
'context': {
'level': 'error',
'file': 'hive_operations.cpp',
'line': 93,
'method': 'validate',
'hostname': '',
'timestamp': '2022-01-11T12:07:59'
},
'format': 'body.size() > 0: Body is empty',
'data': {}
},
...
}
The transaction:
{
'ref_block_num': 16508,
'ref_block_prefix': 2456192850,
'expiration': '2022-01-11T12:09:34',
'operations': [
{
'type': 'comment_operation',
'value': {
'parent_author': '',
'parent_permlink': 'streemian',
'author': 'streemian',
'permlink': 'test',
'title': 'test',
'body': 'test',
'json_metadata': '{"tags": ["streemian", "blockchain", "curation"]}'
}
}
],
'extensions': [],
'signatures': [
'1f5852da2d8a40e9ffaf44473b4fe3b304f5ceb535097e61ad13bb8f34cf65858d71a4483f8ed04a54cb0aff856767854d947ba988246
eb05ca30b74180b41387f'
]
}