Open dckc opened 4 years ago
Tbh, I am actually not familiar with ocap discipline. Do you have any docs or references about that?
What about the from_seed
method?https://github.com/rchain/pyrchain/blob/98824d5afb41b83428261fcf6d082217d2856219/examples/keys_example.py#L13
yes, from_seed
has no non-determinism; it respects ocap discipline.
capabilities are like unforgeable names in the RChain architecture (cf. Policies as Types cited from rchain dev docs). Python doesn't enforce ocap discipline like rholang does, but the discipline is useful even as a convention.
a pretty good reference is http://erights.org/elib/capability/ode/ode-capabilities.html for application to python: https://www.madmode.com/2019/python-eng.html
p.s. feel free to stand by until I find time to make a PR for this issue.
It uses ambient authority to a source of randomness; I like to stick to ocap discipine, so I'd like to see the source of randomness passed in explicitly as an argument.
https://github.com/rchain/pyrchain/blob/98824d5afb41b83428261fcf6d082217d2856219/examples/keys_example.py#L4