chia-blockchain
chia-blockchain copied to clipboard
[Bug] need root information in get_keys_values, get_keys, get_value
What happened?
It is not clear how a datalayer subsciber would be able to tell that the data they have is out of date. get_keys_values
, ket_keys
and get_value
should return at least the root associated with the data it returns, and preferably also a flag inidicating whether that data is current based on the most recent root on chain.
Version
1.6.0 dogfood
What platform are you using?
Linux
What ui mode are you using?
CLI
Relevant log output
No response
https://github.com/Chia-Network/chia-blockchain/pull/13306
to these calls we can add the root_hash
parameter now. if the root_hash
misses, it should throw exceptions:
chia data get_keys_values --id=f3e0af1285b7c19bce99b091e23abe0ce8ba4649d42b197bd382d9bfd2c88b49 --root_hash=0000000000000000000000000000000000000000000000000000000000000001
Exception from 'data': {'error': "Can't find keys and values for 0000000000000000000000000000000000000000000000000000000000000001", 'success': False}
chia data get_keys --id=f3e0af1285b7c19bce99b091e23abe0ce8ba4649d42b197bd382d9bfd2c88b49 --root_hash=0000000000000000000000000000000000000000000000000000000000000001
Exception from 'data': {'error': "Can't find keys for 0000000000000000000000000000000000000000000000000000000000000001", 'success': False}
chia data get_value --id=f3e0af1285b7c19bce99b091e23abe0ce8ba4649d42b197bd382d9bfd2c88b49 --root_hash=0000000000000000000000000000000000000000000000000000000000000001 --key=0000
Exception from 'data': {'error': 'Key not found: 0000', 'success': False}
This issue has not been updated in 14 days and is now flagged as stale. If this issue is still affecting you and in need of further review, please comment on it with an update to keep it from auto closing in 7 days.
I believe this is resolved in 1.6.2 with the changes in #13306 and the new get_sync_status
from #13440