--- Log opened Wed Apr 21 00:00:32 2021 06:06 < andytoshi> is there such a thing as a "channel mixer"? are there papers/blogs about this? 06:07 < belcher> iv never heard of the phrase channel mixer 07:32 <+JoinMarketRelay> [hackint/mojo_] I couldn't find any reference either. 07:32 <+JoinMarketRelay> [hackint/mojo_] I Have came across few questions from the `contract` module. Feel free to answer at your suitability. 07:33 <+JoinMarketRelay> [hackint/mojo_] 1. Why di we only have 2 bytes Locktime here? https://github.com/mojoX911/teleport-transactions/blob/f6878d7a47e9f05b5453c610b5edd97d0a0b3de5/src/contracts.rs#L111-L113 07:34 < belcher> mojo_ the locktime there is a block height 07:35 < belcher> and its a OP_CSV, so the locktime is a relative lock time 07:36 < belcher> at most the contract would have a locktime of a few days or a week maybe, which comfortably fits into two bytes (65536 is about 455 days, over a year) 07:36 < belcher> 65536 blocks* is about 455 days 07:36 <+JoinMarketRelay> [hackint/mojo_] Ya, but doesn't OP_CSV consumes a 32bit item from stack and compares it with the nSequence field? 07:37 < belcher> no, i think it consumes any number on the stack which can be different lengths 07:37 < belcher> i forgot exactly but i think it takes a varint 07:38 < belcher> i remember trying it with 30, which rust-bitcoin encoded as a single byte and so that messed up the template matching which assumes fixed length 07:40 <+JoinMarketRelay> [hackint/mojo_] I am not sure but i think OP_CSV also has to compare the `type bit` with the nSequence field in the validation process? and then fetches the time lock value from LE 16bit residue. I have to go through the BIP again. 07:43 <+JoinMarketRelay> [hackint/mojo_] And why locktime is an i64? We could use u16 instead right? 07:50 <+JoinMarketRelay> [hackint/mojo_] Also I think we need to set the sequence field in contract transaction input. I have made some initial test cases I am posting right now. Maybe we can continue the discussion in github over the PR. I have modified the read_locktime() function currently to read an 8 byte integer value from the script. Which might not be ideal depending upon how 07:50 <+JoinMarketRelay> OP_CSV reads the stack. 10:16 < belcher> yes could be re nSequence field and last 16 bits 10:16 < belcher> i think its i64 because thats the type that rust-bitcoin chose 10:16 < belcher> i believe the sequence field is already set in the transaction 17:01 -!- belcher_ [~belcher@unaffiliated/belcher] has joined ##coinswap 17:04 -!- belcher [~belcher@unaffiliated/belcher] has quit [Ping timeout: 240 seconds] 17:05 -!- belcher_ is now known as belcher --- Log closed Thu Apr 22 00:00:33 2021