Skip to content
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

[1.5.4] We need to use the getMapOfAllData method for HistoricalDataStoreServices #5030

Conversation

chimp1984
Copy link
Contributor

The map access to HistoricalDataStoreServices from the p2pDataStorage was incorrect. I has accessed the live map instead of all data. That has led that at addPersistableNetworkPayload the data got rebroadcast as it was assumed the data has not been already received.

How to test it?

  • Add some logs in P2PDataStorage.addPersistableNetworkPayload to see if data gets added and broadcast
  • Change the delay at republishAllFiatAccounts in AccountAgeWitnessService otherwise it takes 20-60 sec. for republishing
  • Create a new fresh regtest seed and new fresh app node.
  • Start the app. Create one fiat payment account. Shut down and copy the AccountAgeWitnessStore which must have 1 entry now and copy it to the resources and rename it to AccountAgeWitnessStore_1.5.0_BTC_REGTEST
  • Restart seed node and app
  • Now you should see repeated logs that the data gets added and broadcast

It is still not clear to me why we did not see much more AccountAgeWitness data but only one in massive numbers...

@chimp1984 chimp1984 changed the title We need to use the getMapOfAllData method for HistoricalDataStoreServices [1.5.4] We need to use the getMapOfAllData method for HistoricalDataStoreServices Dec 31, 2020
@chimp1984
Copy link
Contributor Author

It is still not clear to me why we did not see much more AccountAgeWitness data but only one in massive numbers...

I found out the reason:
AccountAgeWitness has 1 day date tolerance, if its older the addPersistableNetworkPayload returns with false and do not relay the data. This helps us as the data which flooded the network is now > 1 day so it stopped flooding. This is also the reason why not all AccountAgeWitness data from hsitorical data store did flood the network. They got though republished but they got ignored by all peers as the date was too old.

The hash of that data of the problematic item was in the historical data store with an older date, but the user had for some reason not that historical data store or lost the live data so he could not find his AccountAgeWitness with the original date and created a new one with the date of 29.12. The other network peers had that hash in historical data but due the bug fixed in that PR it was not found so it got processed further and relayed again.

@ripcurlx ripcurlx added this to the v1.5.4 milestone Dec 31, 2020
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants