-
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
Different results for blocks between masternode and block service #18
Comments
@Endogen http://119.29.130.37:3535 is a demo of block service. Blocks data come from https://testnet-master-1.lamden.io. So... it's not a problem. |
Just replace that block service with any other and you get the same result. |
take a look. |
If different block services deliver different things then we still have an issue: And case 2) is also still an issue |
It's just inconsistent. The block service here gives me data for this block: However another block service i can't expose (from the Rubix project) shows for the same block:
|
So it seems the situation is even worse. We can't rely on block services having the same data. That's an issue since projects need to run their own block service and can't use a centralized one. If the block service has functionality included to correct missing blocks then it doesn't work. If it doesn't have that functionality then it needs to get it. |
These two reasons may lead to this issue. I am not sure which version of blockservice the server |
Not having the newest version could definitely be the issue here, yes. How can i check which version i have? |
Blockservices are not synced to each other. It's completely possible for one to not have digested a block another happened to get. They are seperate services run by the person or app that needs a block service. In your example one block service didn't get a block, for some reason. That reason could be as simple as a network hic-up on the blockservice's end or the masternode went down and there was some network error. Who knows. The short term fix for the blockservice owner is to run a repair. It's your blockservice and you need to maintain it, especially if you want to best uptime for your app. There needs to be a more holistic fix for missing blocks. Where the blockservice can figure that out and proactively repair. That's something we should look into. |
What's the thing about getting blocks like this:
Is it possible to get rid of that? The masternode doesn't deliver that, yet there are blocks in the block service with that content. |
Yes, the blockservice is supposed to run some repair every once and a while. It doesn't seem to be working all that great as even the Wallet blockservice (which is the newest code) seems to also have missing blocks. I will proactively go run a repair on the Wallet blockservice manually from time to time. @Dapiguabc can you look into the best was to approach this? If you want to Jam on it on Monday we can. |
https://masternode-01.lamden.io/blocks?num=507274 That is a block that doesn't infact exist on the blockchain. I think the data is appropriate. |
These are all blocks that don't exist - everything else exists:
|
But then deliver this data:
and not - http://165.22.47.195:3535/blocks/70704
|
You know that. But the blockservice doesn't necessarily know that. If it queries a block and gets a network error or some other response due to a masternode issue then it needs to store something. In this case it stores that the block doest not exist and then will follow up later. |
Ahh ok. So that is what the block service delivers you if it couldn't get that block for some reason. OK got it. |
Yeah, repairing that info is really what is needed. Benji mentioned some logic to be months ago that I think might work. I'll follow up with him. |
For querying block data (which is the most important one since it's the raw dataset) there are cases in which the block service delivers different data than the masternode.
Case 1)
For example for block 700923
Masternode - https://masternode-01.lamden.io/blocks?num=700923
Block Service - http://119.29.130.37:3535/blocks/700923
Case 2)
It seems that some block services are not always returning an error if a block doesn't exist - which makes it hard to automatically detect that a block doesn't exist
For example for block 844646
Masternode - https://masternode-01.lamden.io/blocks?num=844646
Block Service for Nebula Finance:
In the case of this specific block service, there are cases where it delivers an error (for example block 651711) and cases where it delivers a
"block-does-not-exist"
. It seems that the cases where it delivers an error are not errors at all (at least the masternode can deliver the block) and in the case of"block-does-not-exist"
it looks like the block really is non-existant.The expected behavior would be that block service and masternode agree on the state of all blocks and hold the same data and if a block doesn't exist, then there should be an error and not a hash with value
block-does-not-exist
because now we need to actually check the value ofhash
to know if a block exists or not.In any case, the conclusion is that if you use the block service then it is not guaranteed that you know the correct global state which is disastrous.
The text was updated successfully, but these errors were encountered: