-
Notifications
You must be signed in to change notification settings - Fork 3
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
Added public ips on a farm are not always synced with the chain #157
Comments
Update:
What I have found so far is that during an old tfchain migration, a state cleaning was performed to remove some bad IPs from the chain. This might have resulted in having more IPs than what we currently have in the chain (since the cleaning didn't emit any events). However, the OP mentioned that there are fewer IPs in the Graphql, indicating that there might be a different issue at play. |
@Omarabdul3ziz yes there is another issue but not with deleting, note what i was saying in my previous comment. There is indeed a two issues in play here, and the one you described is due to previous chain migration where we added a validation and removed invalid IPs info from chain state without propagating this to our processor via tracked events. a gateway always have to be public and to be on the same subnet as the IP address. In your case, these IPs shows in graphql and not exists in chain due to being invalid. |
Update:
Farm 52 was created in block 1313143 with an empty set of IPs The same farm was updated about 15 times in the same batch extrinsic with different IP addresses each time. The processor received all farm updated events. Because they were propagated from the same externsic and included in the same block, it processes the events in an incorrect order resulting in an outdated set of IPs to persist in processor db. I expect the processor to process them based on their index within the block, but seems this is not in check. |
Update: |
Update: It would be very helpful if you could reproduce the issue and share the steps with us. For now, what i can do a migration to remove the invalid IPs from GraphQL. |
@AhmedHanafy725 Which network? |
devnet |
@AhmedHanafy725 There is a validation on the processor to not allow saving duplicate IPs and all these IPs you tried to add were stored on other farms previously, so it wasn't added to your farm. you verify this using:
It appears that the validation was intended to prevent the addition of the same public IP address to different farms. However, this should have been implemented at the chain level to prevent such an occurrence. How should we approach this? do we need to alter this validation? |
Update: |
Update: a PR that handling this case #157 (comment) is ready fore review |
env: devnet
farm: 52
also, farm 4432 has the same issue
The text was updated successfully, but these errors were encountered: