graph-store: move over to +sham from +mug

This commit is contained in:
Logan Allen 2020-07-22 13:32:47 -07:00
parent c06eb4d8c0
commit 0a2e721d7f
3 changed files with 7 additions and 16 deletions

View File

@ -177,7 +177,7 @@
=* p post.node
=/ =validated-portion:store
[parent-hash author.p time-sent.p contents.p]
=/ =hash:store (mug validated-portion)
=/ =hash:store `@ux`(sham validated-portion)
?~ hash.p node
~| "hash of post does not match calculated hash"
?> =(hash u.hash.p)
@ -413,7 +413,7 @@
/(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/[u.mark]
==
%+ roll (tap:orm graph)
|= [[=atom:store =node:store] out=?]
|= [[=atom =node:store] out=?]
?& out
=(%& -:(mule |.((vale:dais [atom post.node]))))
?- -.children.node
@ -450,8 +450,8 @@
[%x %graph-subset @ @ @ @ ~]
=/ =ship (slav %p i.t.t.path)
=/ =term i.t.t.t.path
=/ start=(unit atom:store) (rush i.t.t.t.t.path dem:ag)
=/ end=(unit atom:store) (rush i.t.t.t.t.t.path dem:ag)
=/ start=(unit atom) (rush i.t.t.t.t.path dem:ag)
=/ end=(unit atom) (rush i.t.t.t.t.t.path dem:ag)
=/ graph=(unit marked-graph:store)
(~(get by graphs) [ship term])
?~ graph ~
@ -490,8 +490,8 @@
[%x %node-children-subset @ @ @ @ @ *]
=/ =ship (slav %p i.t.t.path)
=/ =term i.t.t.t.path
=/ start=(unit atom:store) (rush i.t.t.t.t.path dem:ag)
=/ end=(unit atom:store) (rush i.t.t.t.t.t.path dem:ag)
=/ start=(unit atom) (rush i.t.t.t.t.path dem:ag)
=/ end=(unit atom) (rush i.t.t.t.t.t.path dem:ag)
=/ =index:store
(turn t.t.t.t.t.t.path |=(=cord (slav %ud cord)))
=/ node=(unit node:store) (get-node ship term index)

View File

@ -12,14 +12,6 @@
our
life
::
:: sha256 noun hash
::
++ sha256-mug
|= yux/* ^- @ux ^- @
?@ yux
(shax yux)
(shax (jam yux))
::
++ is-signature-valid
|= [=signature =hash now=time]
^- ?

View File

@ -1,10 +1,9 @@
/- *resource
|%
+$ atom @u
+$ index (list atom)
+$ uid [=resource =index]
::
:: mug hash of +validated-portion
:: +sham (half sha-256) hash of +validated-portion
+$ hash @ux
::
+$ signature [p=@ux q=ship r=life]