You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon calling get_all_sources for a future entry, the output is correct if the expiry timestamp is set to 0, but this function returns an empty array in case where the expiry is not null
Expected behaviour
This function should return the expected list of sources even when an expiry is provided.
The text was updated successfully, but these errors were encountered:
To begin with, crash tests were initiated using the test_update_oracle function from the sdk. The test tried to update the oracle contract on a fork mainnet, and tried to call get_data for a list of spot assets. As expected, we had an error which is 'No publisher for source. Since the mapping for oracle_list_of_publishers_for_sources_storagechanged, the signature associated to this storage slot changed too. Since the new signature has been generated after the update, no publishers information can be retrieved at this point.
IMPACT: After the update, get_data will return the error: No publisher for source until publishers publish their next prices. Once they publish their next price, the oracle_list_of_publishers_for_sources_storagewill be updated.
REMEDIATION: Adjust with the publishers to publish as soon as the update goes through to avoid downtime.
However, this solution is not enough, because oracle_data_entry_storage storage slot signature is not changed, so upon publishing data, the latest stored entry timestamp will be !=0, thus we will not make the necessary changes on oracle_list_of_publishers_for_sources_storage (cf: https://github.com/astraly-labs/pragma-oracle/blob/main/src/oracle/oracle.cairo#L1160)
Actual behavior
get_all_sources
for a future entry, the output is correct if the expiry timestamp is set to 0, but this function returns an empty array in case where the expiry is not nullExpected behaviour
The text was updated successfully, but these errors were encountered: