-
Notifications
You must be signed in to change notification settings - Fork 2
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
Resolve state management bug #55
Conversation
Hi @nrutledge and @AltiMario , I tested with the updated code from the @nrutledge I conducted multiple tests and successfully completed breeding operations several times. Based on my findings, I can summarize the results as follows: Summary:
Issues Identified:
Workarounds: Issue 1: Outdated Kitty Data in DApp
Issue 2: Incorrect DNA Used in Breeding
I believe the above steps will resolve the issues related to the DApp caching old kitty details. Below are some of the screen shots which were taken in during this testing : After Breeding , kew child kitty shows in the "Search kitty": |
@nrutledge and @AltiMario |
@NadigerAmit thank you for investigating and providing additional details. I've made additional changes based on that and have been able to successfully breed kitties on my end. That being said, I was not able to fully reproduce the first issue (outdated kitty data in DApp) that you mentioned. The parent DNA was indeed stale due to unnecessary persistence of what should be transient form data. However, the kitty list was being reloaded and replaced with the response from the server after each load/refresh (despite it also being persisted). The only case where this was not true, was if the server responded with an error / no results. Anyway, none of this should be an issue anymore with the latest changes. |
Hi @nrutledge However, I noticed one minor issue: When attempting to breed using a Mom Kitty with the status "HadBirthRecently" and a Dad Kitty with the status "Tired," the transaction status incorrectly shows "Kitty Breed successfully." While the transaction is indeed sent, it is correctly rejected by the blockchain due to the kitties' statuses, and no new child kitty is created. This behavior is as expected, but the messaging could be clearer. Since the blockchain sends the failed transaction status asynchronously to the web server, which then relays it to the DApp, we have a few options to improve this: Options to Address the Issue: Update the message from "Kitty Breed successfully" to "Kitty Breed transaction sent successfully." Option 2: Moderate Complexity
Option 3: Moderate Complexity
Note: This last option may not be ideal, as there could be many invalid transactions, and having the DApp check all conditions could be resource-intensive and prone to errors due to stale data. The above are just suggestions, There can be other better options also, Please feel free to take your decision. PFA some of the screen shots taken when issues occoure '
|
I didn't follow the whole conversation, but I wanted to let you know that if you use a newer version of Tuxedo, you will get a more specific a descriptive error. I improved this in Off-Narrative-Labs/Tuxedo#214 |
@NadigerAmit @AltiMario I was able to reproduce the breeding issue with the bad parent status and have pushed some additional changes. My initial observations from trying to reproduce the issue:
In response to the above observations, I have made the following changes:
|
@nrutledge All the above counter measures the problem mentioned looks ok to me and it should be ok to follow the test guide without issues. |
Hi @NadigerAmit and @nrutledge I did a test following the instructions from scratch and step by step. The breading issue is fixed but I cannot edit (for the scope of trading) the kitties. Here is the video to show the problem: The only errors in the log are these My local tools: Am I doing something wrong? After removing the wallet db (and restarting the test from scratch), the problem didn't occur anymore. |
This fixes #54 with the following changes: