-
Notifications
You must be signed in to change notification settings - Fork 292
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
Move and refactor the PutBlock
method
#196
Comments
relevant comment about the original API defined in #170 #178 (comment) While |
this code will also have to be moved and consolidated with |
PutBlock
method to a different packagePutBlock
method
I'm linking this comment to remind myself to also include the suggested change into the refactor/move of |
Another self reminder, wrap this error |
More notes:
|
I think we can now close this issue now that #334 is merged. Any other opinions? |
I think we can close this once PutBlock starts to return DAHeader |
So we just need to fill the DAH of the passed in |
Ideally, I would change the interface to receive just types.Data bc that's the only thing used in PutBlock.
Yeah, not to fill and recompute it twice
Idk yet |
@evan-forbes, @liamsi is it closed? |
Yes, thanks @Wondertan 🙏🏼 I'm sure we can further improve the package structure a bit (similar to changes you started in #427) but the suggestions made here are already implemented. |
The
PutBlock
method was introduced as a method toBlock
in #178. HavingPutBlock
where it is now adds network dependencies to thetypes
package, which is undesirable. The original thinking in doing so was so that erasured data could be cached instead of recomputed. While caching the erasured data is still a good idea, it was not implemented in #178 and does not necessarily requirePutBlock
being a method toBlock
.We should probably make
PutBlock
a function and move it to a different package. This will require a general refactor, which includes exporting the utility function shared byPutBlock
andfillDataAvailabilityHeader
.As for where to move it, per a suggestion by @liamsi, I think we should move
PutBlock
and it's related code tolazyledger-core/p2p/ipld
.ref: #178 (comment)
The text was updated successfully, but these errors were encountered: