Add blake3 support
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- cryptography
Research direction
Start with Multihash.Type.lookup and Multihash.deserialize, then follow the failure through Cid.cast, Cid.decode, and MerkleNode.fromJSON. Verify the AddArgs example using blake3 no longer raises the unknown multihash type exception and that the resulting CID is accepted.
Written by the indexing model from the issue text.
Description
var args = AddArgs.Builder.newInstance().setCidVersion(1).setHash("blake3").build();
ipfs.add(namedStreamable, args);
causes:
Invalid cid bytes: 01551e20623a5460d841b6d1c13d080e85500e0043fd4ba4a8ba9c1aa9b4f6e0d212276c
io.ipfs.cid.Cid$CidEncodingException:
at io.ipfs.cid.Cid.cast(Cid.java:188)
at io.ipfs.cid.Cid.decode(Cid.java:168)
at io.ipfs.api.MerkleNode.<init>(MerkleNode.java:27)
at io.ipfs.api.MerkleNode.fromJSON(MerkleNode.java:85)
at io.ipfs.api.IPFS.lambda$add$1(IPFS.java:161)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at io.ipfs.api.IPFS.add(IPFS.java:162)
at io.ipfs.api.IPFS.add(IPFS.java:148)
at dev.enola.cas.IPFSBlobStore.store(IPFSBlobStore.java:53)
at dev.enola.cas.IPFSBlobStoreTest.storeHello(IPFSBlobStoreTest.java:61)
Caused by: java.lang.IllegalStateException: Unknown Multihash type: 0x1e
at io.ipfs.multihash.Multihash$Type.lookup(Multihash.java:147)
at io.ipfs.multihash.Multihash.deserialize(Multihash.java:208)
at io.ipfs.cid.Cid.cast(Cid.java:182)
I'll raise a PR once my other older pending PRs have been reviewed and merged... 😆
- Dominant language
- Java
- Stars
- 53
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from multiformats/java-multihash
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
multiformats/java-multihash#24 · 9 comments · 1 reaction ·
All issues in multiformats/java-multihash
Similar issues
-
Bug Java Platform: Java
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-java#6138 · 1 comment ·
-
bug needs triage p2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/rocketmq-dashboard#4654 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100