1 2016-06-05 07:00:44 0|GitHub21|[13bitcoin] 15kazcw opened pull request #8147: separate mutex for Misbehavior() (06master...06cs_misbehavior) 02https://github.com/bitcoin/bitcoin/pull/8147
2 2016-06-05 17:08:05 0|Chris_Stewart_5|Does bitcoin use a specific numbering system? It seems that it doesn't follow one's complement or twos complement from what i can tell..
3 2016-06-05 17:17:07 0|arubi|Chris_Stewart_5, are you looking at compact size..?
4 2016-06-05 17:18:00 0|Chris_Stewart_5|arubi: I'm just talking about numbering in genral, for instance "81" is -1
5 2016-06-05 17:18:46 0|Chris_Stewart_5|0x81*
6 2016-06-05 17:19:13 0|arubi|ah, that's different. it's just signed int really.. that's the way I see it anyway
7 2016-06-05 17:20:01 0|Chris_Stewart_5|Maybe I am thinking about it too much - i was looking over the two popular signed number representations and neither seem to map to bitcoins numbers
8 2016-06-05 17:20:02 0|Chris_Stewart_5|https://en.wikipedia.org/wiki/Signed_number_representations
9 2016-06-05 17:20:42 0|arubi|I think it means.. [0x00,0x7f] is positive, [0x80,0xff] is negative
10 2016-06-05 17:20:58 0|arubi|with 0x80 being "negative zero"
11 2016-06-05 17:21:48 0|Chris_Stewart_5|... or I am missing something obvious
12 2016-06-05 17:23:18 0|sipa_|Chris_Stewart_5: you're talking about how integers are encoded inside script
13 2016-06-05 17:23:29 0|sipa_|not "how bitcoin uses numbering system"
14 2016-06-05 17:24:10 0|Chris_Stewart_5|sipa_: Is this one of those things "Satoshi implemented it that way" or is there a purpose behind our encoding?
15 2016-06-05 17:25:12 0|sipa_|no, satoshi did it that way, and it does not matter
16 2016-06-05 17:25:28 0|arubi|I really can't think of a different way to represent a negative range of numbers..
17 2016-06-05 17:25:33 0|sipa_|i'd have done it differently, but it hardly matters :)
18 2016-06-05 17:26:09 0|Chris_Stewart_5|Gotcha, I was refactoring a library I am writing and I came across this weird encoding again and I was trying to figure out what it exactly was for documentation purposes
19 2016-06-05 17:26:33 0|Chris_Stewart_5|Thanks arubi sipa_
20 2016-06-05 17:26:52 0|arubi|oh don't thank me, I'm not even sure I'm right
21 2016-06-05 17:27:25 0|Chris_Stewart_5|arubi: You would probably want to use twos complement to remove the weird corner case of -0 since that is kind of ugly
22 2016-06-05 17:27:57 0|sipa_|yes, two's complement is most common
23 2016-06-05 17:27:58 0|arubi|I'd want to know if I got to 0x80 or 0x00 when I subtracted two numbers if I signed it..
24 2016-06-05 17:28:12 0|sipa_|?
25 2016-06-05 17:28:55 0|sipa_|the result of a subtraction will never be 0x80
26 2016-06-05 17:29:13 0|sipa_|because it's just a non-canonical encoding of 0
27 2016-06-05 17:30:03 0|sipa_|the canonical encoding of 0 is {}
28 2016-06-05 17:30:43 0|Chris_Stewart_5|Interesting math perspective from group theory (?) https://math.stackexchange.com/questions/667577/does-negative-zero-exists
29 2016-06-05 17:31:04 0|Chris_Stewart_5|getting a little off topic tho
30 2016-06-05 17:31:38 0|arubi|hm.. I see. thanks sipa_. I was thinking about (0x81 - 0x01), would that be 0x00 then?
31 2016-06-05 17:31:46 0|sipa_|no, it would be {}
32 2016-06-05 17:31:52 0|arubi|even better. cool
33 2016-06-05 17:33:00 0|sipa_|the arithmetic operators always first convert their inputs to integers (the mathematical concept, not their byte representation), then do the relevant operation, and then convert back to the shortest byte encoding for the resulting number
34 2016-06-05 17:33:35 0|sipa_|that means that there is no way to even observe the difference between {} {0x80} {0x00} ...
35 2016-06-05 17:33:53 0|sipa_|except by comparing them byte-wise to known constants
36 2016-06-05 17:36:55 0|arubi|oh I think I see. sipa_ , is that CScriptNum ?
37 2016-06-05 17:38:31 0|arubi|seems like that's the place to look.
38 2016-06-05 17:55:23 0|sipa_|yes
39 2016-06-05 19:12:31 0|hello_|Could someone tell me what 'mempool' is in bitcoin core? I guess it is some ds where the transactions are stored , correct??
40 2016-06-05 19:16:37 0|sipa_|hello_: every node in the network maintains a set of unconfirmed transactions
41 2016-06-05 19:16:54 0|sipa_|hello_: miners use this to build new blocks
42 2016-06-05 19:26:21 0|hello_|sipa_: Hi recently there was some discussion about some remove() cancel() function on the mempool? Could you explain it in a line...
43 2016-06-05 19:54:22 0|GitHub47|[13bitcoin] 15jmcorgan opened pull request #8148: Backport leveldb build integration to 0.12 (060.12...060.12) 02https://github.com/bitcoin/bitcoin/pull/8148