-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: register_update() sometimes reports success without affecting the register #2448
Comments
Update: I've tested that updating the other website register for autonomi-demo still works. You can compare the output here after the second update (with 4 entries for type, v1, v2 and v3) with the output in the OP after a single update (with 3 entries, for type, v1 and v2):
I attach the full log for the update immediately prior to the above inspect command: |
Update: I now find that the autonomi-demo website register is no longer updating though the APIs still report success. You can see the Register state is identical to that in the reply immediately above:
I attach the full log for the update immediately prior to the above inspection command. |
I have uploaded a couple of websites with
awe
v0.10.0 to test the autonomi API v0.2.2 (stable-2024.10.4.6). To do so I used a local copy of safe_network in order to gain access to the MerkleRegister, using the same modification which is pending in PR #2426This report shows two examples of registers used to store metadata for two different websites. One for the autonomi-demo website register has been successfully updated, and another which repeatedly fails to update, for the awe-some-sites website.
Creating/publishing a website
When a website is first published I create the register and immediately add two entries (merging each time). The result is that I have one value, and can examine the first and second entries (the history of root values) via the MerkleRegister. You can see this using
awe inspect-register -rak ef727106393e4ce36190827082e0421c99b2fd408a4fd79af7bafee7e1ac1850a4b2491a32ecdf948caa7480cb5f3308c7756ed71f46fbe5d55ac4f2545867ab89afc5c6ce2ec6effc16ed1dfa6b059b
The output shows a single 'root' (1d2d.. which is the second value added) and that the register has two entries: one for the first value added (5ebb.. which is used as a type) and one for the second (1d2d.. which points to the website metatdata for the first version of the website.
The above output is for the website awe-some-sites.
Updating a website
When I do an update to the website I expect the result to be that we still have one root, which will be the most recent website metadata, and three entries. Below you can see the state after publishing and then updating the website autonomi-demo once. Using the command:
awe inspect-register -rak awv://9fc38253483e92cc6c506b62dead383a228a3508ec14fa0b7c05a56ea21fd692a4b2491a32ecdf948caa7480cb5f3308c7756ed71f46fbe5d55ac4f2545867ab89afc5c6ce2ec6effc16ed1dfa6b059b
The output shows that this register has one root (eff7..) and three entries which shows that the subsequent call to
register_update()
has added an entry to the register and updated the root value:The bug
In contrast, every time I try updating the awe-some-sites register, the register remains unchanged. For example, here's the output of a command to do and update for the third time which shows the register (and MerkleRegister) state before the register_update(), after the update, and after a subsequent register_get():
The full log output for the above is in the attached file.
Note: the output of awe register-inspect` for this register always remains the same, as shown under the first heading above, "Creating a website".
Code
The Rust method which produces the above output is in awe_website_versions.rs and is as follows:
The above has some extra debugging statements that are not part of
awe
v0.10.0 and have not been pushed to github.com/happybeing/awe.Full debug output for the failing
register_update()
:testing-awe-some-sites-update-3.txt
The text was updated successfully, but these errors were encountered: