-
Notifications
You must be signed in to change notification settings - Fork 4
feat: switch to zcash-block for decoding #46
Conversation
0911522
to
8233924
Compare
Codecov Report
@@ Coverage Diff @@
## master #46 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 3 3
Lines 65 62 -3
=====================================
- Hits 65 62 -3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, the changes look good. Though I don't think we should change the field names. The reason to have the current names is to match the Go implementation: https://github.com/ipfs/go-ipld-zcash/blob/master/block.go
Hence I would also only return those fields on a tree()
call, so that both implementations are equal.
I've added aliases for I haven't touched |
Thanks!
Good point. Let's keep |
So if you push it, I'm happy to approve it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @rvagg ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fix it up and merge!
9311cb8
to
22bc170
Compare
merged, this would normally justify semver-major bump, can we do that or are we stuck under |
I prefer pushing it as 0.x.0. I forgot again that a "BREAKING CHANGES" commit would've made sense so that the changelog contains that information automatically. Well, I'll now do it manually. |
You could force push in an amendment, it hasn't been long since I merged. Does it just need "BREAKING CHANGES" in the summary text to be picked up by some tool? |
AEgir picks it up in the commit footer and will add it to the changelog on release. https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md#footer This should really be documented in the AEgir README and linked to from there... |
If you want to have it in the commit, the cleanest way if you don't want to do force pushes is reverting the commit, and committing it again with the changed commit message. Reverts don't show up in the changelog (I've done that before). Anyway, I now just created the Changelog entry manually. |
I thought the GitHub release notes pick up the changelog, but they don't. So my recommendation for forgetting to add "BREAKING CHANGES" is to do the revert and re-commit dance. |
I consider force pushes on low traffic repos not a very big evil, there's a vaishingly small chance that anyone outside of us two even have the current HEAD chain. Up to you though. |
There's some renaming of properties going on in here. I've stuck with the Zcash API names so mostly things aren't camelCase, they are lowercase.
Transactions are supported, I've added some basic testing in for that. But since they sit outside of the header and have their own merkleroot hash, if we were doing this properly I imagine we'd have another multicodec for transactions. So let's not bother with that for now.
I haven't implemented a serializer and doubt I'll be able to justify the time investment to do so. How important is
serialize()
support? I've made itthrow
.While doing this, I realised that our choice of a sync
deserialize()
bit me pretty hard. My zcash-block library was async, mainly for multihashing-async, because there's a bunch of hashing that gets done during decode. I had to switch that out for multihashing and unwind all of the async work. That's where the 2.0.0 of zcash-block comes from, 1.0.0 was async.resolves #24