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
zuse: add blake3 #6802
zuse: add blake3 #6802
Conversation
327f0d7
to
b7a6fa2
Compare
You can achieve your desired cuteness. Write a barcen core with a +blake3 arm that returns a gate, then tisgal the blake3 arm. +blake3 then refers to a gate whose context is the barcen core contains the other arms, accessible as +compress:blake3.
```hoon
=< blake3
|%
++ blake3
|=(* !!)
++ compress
|=(* !!)
--
```
…On Thu, Sep 28 2023 at 11:05 AM, Luke Champine < ***@***.*** > wrote:
***@***.**** commented on this pull request.
In pkg/arvo/sys/zuse.hoon (
#6802 (comment) ) :
> + ++ parent-output
+ |= [l=output r=output]
+ ^-
output
+ %+ set-flag f-parent
+ [cv (rep 8 ~[(compress l)
(compress r)]) 0 64 flags]
+ ::
+ ++ chunk-output
+ |=
[counter=@ chunk=byts]
+ ^- output
+ %+ set-flag
f-chunkend
+ %+ roll (split-byts 9 chunk)
+ |= [[i=@
byts] prev=output]
+ ?: =(0 i) [cv dat counter wid (con flags
f-chunkstart)]
+ [(rep 8 ~[(compress prev)]) dat counter wid flags]
+ ::
+ ++ compress
cool. ^? breaks the door, so I had to change the keyed API, but it seems to
work now.
—
Reply to this email directly, view it on GitHub (
#6802 (comment) ) , or unsubscribe
(
https://github.com/notifications/unsubscribe-auth/AAGVR5ODOUC64OAIJ6RB3RDX4WG2VANCNFSM6AAAAAA5DOZJE4
).
You are receiving this because you are subscribed to this thread. Message
ID: <urbit/urbit/pull/6802/review/1649103728 @ github. com>
|
Ah, email comments can't do markdown. Here's better formatting: |% :: zuse or lull
:: ...
++ blake3
=< run
|%
++ run
|=(* !!)
++ compress
|=(* !!)
--
:: ...
-- |
14645b7
to
7823964
Compare
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.
These changes look good. A few nits:
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.
These all look right. The jet declaration hints need to be tweaked to be hierarchical, and adding an assertion will make the relevant jet simpler.
This PR should target next/kelvin/411
.
Instead of directly targeting |
See urbit/urbit#6802 and urbit/urcrypt#8 Depends on #524
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.
this will do
BLAKE3 is the faster, cleaner, more powerful successor to BLAKE2. In particular, it is a tree hash -- the digest is a Merkle root -- which means it can be used for verified streaming.