--- Day changed Mon Oct 15 2018 14:14 < andytoshi> sgeisler_: heya, welcome to blockstream :) 14:15 < andytoshi> oops, sorry, i meant to PM that. but i guess it's public now 14:48 < stevenroose> andytoshi: woaaa I think I only just understood the full extend of the power of scriptless scripts with the zero-knowledge proof stuff that you mentioned in the Scaling workshop :O 14:49 < stevenroose> You can basically make any contract by doing very expensive proofs only between the parties involved while the blockchain just sees a regular spend. 14:52 < andytoshi> yep :) 14:53 < andytoshi> for two parties anyway. for multiple i think you've gotta do some lightning-path-like thing where you hook up a bunch of pairs 16:50 < stevenroose> andytoshi: quick general Rust question: if you want to define a trait over some of your types. Those types need to have &mut self to implement those methods, but consider that that is not necessarily the case for all implementations. Should the trait def then contain &mut self, or should the trait have self and the impl be on &mut MyType? 16:51 < andytoshi> really depends on the specific case 16:51 < stevenroose> Actually it's not even self 16:52 < andytoshi> usually it's conceptually clear from the trait method whether it ought to mutate its self 16:52 < stevenroose> I have two protocol impls and they share a Transport. The transport has write_chunk and read_chunk. 16:53 < stevenroose> so the protocol either takes &mut T (T: Transport) 16:53 < stevenroose> or T (T: Transport) and impl Transport for &mut SomeTransportThing 16:59 < andytoshi> i suspect they should both take &mut unless you expect implementors to do their own synchronization 16:59 < andytoshi> actually i would just copy the API from io::Read 16:59 < andytoshi> and io::Write 18:58 < andytoshi> i got miri working on rust-bitcoin :). it doesn't support ffi but i ran all the hash and script/opcode tests through it, which covers all our use of unsafe 18:58 < andytoshi> it did not detect any UB 18:59 < andytoshi> unfortunately it requires a very hackily patched miri, see https://github.com/solson/miri/issues/479 so we can't do it in CI