You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This draft PR is starting the process of using only the header hash instead of BlockID, along with a few necessary changes that also closer adhere to the spec. As expected, everything is breaking, but I think I'm ~1/2 done to getting it to compile.
@liamsi I wasn't quite sure what to do with this block retrieving logic in the store package. I'm guessing that we're replacing a portion of this with RetrieveBlockData, but what about the rest?
I'm guessing that we're replacing a portion of this with RetrieveBlockData, but what about the rest?
Yeah, you are right. Most places like these and others will be replaced by RetrieveBlockData. That was the main reason @marbar3778's store PR #218 (#182) was blocked (as RetrieveBlockData didn't exist when he started it). After Marko finishes that PR the tendermint store won't even store the parts requested in the portion you've linked.
That said, for some nodes calling RetrieveBlock will be very similar to the portion you've linked: they will request shares (instead of Parts) from their local ipld store (because e.g. they already downloaded it during consensus), for other nodes it means requesting the block from the network. The latter might not always be feasible (as the latency might be too large) or not desired in all circumstances. There is no general answer to this: we will have to look and understand each such place and decide to either remove it, replace it with only returning the header (where possible), or, Header+state transition relevant Txs (not Messages), or, actually call RetrieveBlockData (and potentially request it from the network).
In some cases it might be worth to rethink the current logic, e.g. for some RPC endpoints (see #195).
To move forward quickly we can simply replace all such occurrences with RetrieveBlockData and revisit each place in a separate PR (or all places together in one PR).
In some cases it might be worth to rethink the current logic, e.g. for some RPC endpoints (see #195).
To move forward quickly we can simply replace all such occurrences with RetrieveBlockData and revisit each place in a separate PR (or all places together in one PR).
@liamsi I think I can split this into a separate PR, will we need #218 to do this properly?
I don't think so. Without #218 it would just mean that we are storing the block data twice: once in the IPFS data store and another time in the tendermint store.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This draft PR is starting the process of using only the header hash instead of BlockID, along with a few necessary changes that also closer adhere to the spec. As expected, everything is breaking, but I think I'm ~1/2 done to getting it to compile.
Closes: #184