Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.39 KB | None | 0 0
  1. Let me bring back an idea that we briefly discussed in our private conversations with Chuck and Matt, but then kind of left behind. So, why do we need a chain of blocks, and not a DAG? I mean a "one-ended" DAG, of course, so that there are sometimes parallel branches, but they eventually merge:
  2.  
  3.  
  4. That's an easy question: it is because if the "parallel" branches are allowed, they may contain "conflicting" information, leading e.g. to double-spends. OK, for now.
  5.  
  6. But let me ask another question: why are we obliged to have only one blockchain, which is used for virtually everything?
  7.  
  8. Suppose that we need a place for storing some sort of information, such that no conflict between "parallel" chains may arise. For example, the accounts may "declare" or "register" something (e.g., "I've just forged a block", "I've just made an instant transaction"), wanting to later have a proof they did it (i.e., this can be particularly useful for timestamping). Then there is no problem if different "declarations" are made on different branches: this just proves that the account has declared two different things (those declarations are signed, of course). So, why not use a DAG? It can be probably built faster (the network latency is not so much a problem), and, if a restricted set of nodes is allowed to build this DAG, it can be really fast, IMHO.
  9.  
  10. So, what do you think? In my opinion, if this is viable, it can be quite useful for TF.
  11.  
  12. EDIT1: It seems I didn't express myself in a sufficiently clear way. Of course, for money transactions, there should be one and only one chain. But if we want to store some other information for which there is no possibility of conflicts similar to double-spending, we may well use another chain for that, or even a DAG.
  13.  
  14. EDIT2: I think there is a very important advantage of DAGs over chains: it is much easier to attack a chain than to attack a DAG! As you know, there are many attack scenarios that go like this: a bad guy is doing something to create an alternative subchain, and then feeds this subchain to good guys. If the alternative subchain is "better", then the Dark Side wins. However, this kind of attack would be useless if a DAG is used instead of chain: the nodes would just store the two subchains, and that's all.
  15. « Last Edit: June 27, 2014, 10:25:41 pm by mthcl » Ignore Report to moderator
  16. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  17. ChuckOne
  18. NRS Project Manager
  19. Hero Member
  20. *****
  21. Offline Offline
  22. Posts: 3438
  23. [Tip Me]
  24.  
  25. ☕ NXT-4BTE-8Y4K-CDS2-6TB82
  26. View Profile Personal Message (Offline)
  27. Karma: +291/-17
  28. applaud / spank
  29.  
  30. Re: DAG, a generalized blockchain
  31. June 27, 2014, 01:25:52 pm
  32. #1
  33. Nice, that you brought that up again. The git idea has been floating around in my mind for a long time now. :)
  34. Ignore Report to moderator
  35. THE CHARITY HUB: NXT-8N9W-TN4F-YA2S-H5B7R
  36. Come-from-Beyond
  37. Hero Member
  38. *****
  39. Offline Offline
  40. Posts: 4014
  41.  
  42. View Profile Email Personal Message (Offline)
  43. Karma: +792/-670
  44. applaud / spank
  45.  
  46. Re: DAG, a generalized blockchain
  47. June 27, 2014, 07:41:12 pm
  48. #2
  49. We r not obliged to have only 1 chain. BCNext planned to use parallel chains coz they can be forged without a lot of resources. Later he found a flaw in his design of PCs. If u invent a good scheme - great.
  50. Ignore Report to moderator
  51. mthcl
  52. Hero Member
  53. *****
  54. Online Online
  55. Posts: 556
  56. [Tip Me]
  57. View Profile Email Personal Message (Online)
  58. Karma: +88/-8
  59. applaud / spank
  60.  
  61. Re: DAG, a generalized blockchain
  62. June 27, 2014, 08:10:23 pm
  63. #3
  64. Quote from: Come-from-Beyond on June 27, 2014, 07:41:12 pm
  65. We r not obliged to have only 1 chain. BCNext planned to use parallel chains coz they can be forged without a lot of resources. Later he found a flaw in his design of PCs. If u invent a good scheme - great.
  66. My point (and not only my) is that a "chain" does not need necessarily be really a chain, it can be something as shown on the above picture.
  67.  
  68. Can you give a link to BCNext's desing of parallel chains?
  69. Ignore Report to moderator
  70. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  71. benjyz
  72. Hero Member
  73. *****
  74. Offline Offline
  75. Posts: 508
  76. View Profile Personal Message (Offline)
  77. Karma: +70/-4
  78. applaud / spank
  79.  
  80. Re: DAG, a generalized blockchain
  81. June 27, 2014, 08:28:06 pm
  82. #4
  83. The very idea of a blockchain is that you have one global clock. That clock is not accurate as possible, but fair. It is a global indestructible timestamp mechanism creating a partial order of events, see [1].
  84.  
  85. Splitting up the chain for Nxt would destroy the network. A split of the network is almost the definition of destruction - which chain is real and which is fake? chains have to be unique, like names. Otherwise: how would one node decide that the chain he is seeing is not fabricated by a malicious actor? So the answer is: no, blockchains need to be unique. I think these properties of Bitcoin and its descendants have not been discussed yet. I would be very cautious fiddling with some of the properties, as they might open up major unknown attack vectors, having to do with how traffic flows through the global network.
  86.  
  87. [1] http://en.wikipedia.org/wiki/Lamport_timestamps
  88. Ignore Report to moderator
  89. Come-from-Beyond
  90. Hero Member
  91. *****
  92. Offline Offline
  93. Posts: 4014
  94.  
  95. View Profile Email Personal Message (Offline)
  96. Karma: +792/-670
  97. applaud / spank
  98.  
  99. Re: DAG, a generalized blockchain
  100. June 27, 2014, 08:45:04 pm
  101. #5
  102. Quote from: mthcl on June 27, 2014, 08:10:23 pm
  103. Quote from: Come-from-Beyond on June 27, 2014, 07:41:12 pm
  104. We r not obliged to have only 1 chain. BCNext planned to use parallel chains coz they can be forged without a lot of resources. Later he found a flaw in his design of PCs. If u invent a good scheme - great.
  105. My point (and not only my) is that a "chain" does not need necessarily be really a chain, it can be something as shown on the above picture.
  106.  
  107. Can you give a link to BCNext's desing of parallel chains?
  108.  
  109. Sorry, I can't. It's buried somewhere on the internet.
  110. Ignore Report to moderator
  111. mthcl
  112. Hero Member
  113. *****
  114. Online Online
  115. Posts: 556
  116. [Tip Me]
  117. View Profile Email Personal Message (Online)
  118. Karma: +88/-8
  119. applaud / spank
  120.  
  121. Re: DAG, a generalized blockchain
  122. June 27, 2014, 08:53:14 pm
  123. #6
  124. Quote from: benjyz on June 27, 2014, 08:28:06 pm
  125. The very idea of a blockchain is that you have one global clock. That clock is not accurate as possible, but fair. It is a global indestructible timestamp mechanism creating a partial order of events, see [1].
  126.  
  127. Splitting up the chain for Nxt would destroy the network. A split of the network is almost the definition of destruction - which chain is real and which is fake? chains have to be unique, like names. Otherwise: how would one node decide that the chain he is seeing is not fabricated by a malicious actor? So the answer is: no, blockchains need to be unique. I think these properties of Bitcoin and its descendants have not been discussed yet. I would be very cautious fiddling with some of the properties, as they might open up major unknown attack vectors, having to do with how traffic flows through the global network.
  128.  
  129. [1] http://en.wikipedia.org/wiki/Lamport_timestamps
  130. 1. A chain creates a total (linear) ordering of events, not only partial.
  131.  
  132. 2. OK, if we allow the Nxt chain to split, this won't be good. Clearly, allowing two "similar" chains to coexist would create problems as well: effectively, it would be more difficult for nodes to decide which one is real and which one is not. But I don't see why having two quite a different "chains" (of which one is a DAG) would create any problems. Please, if you have more concrete arguments, do present them.
  133. Ignore Report to moderator
  134. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  135. Daedelus
  136. Hero Member
  137. *****
  138. Offline Offline
  139. Posts: 3282
  140.  
  141. View Profile Personal Message (Offline)
  142. Karma: +230/-12
  143. applaud / spank
  144.  
  145. Re: DAG, a generalized blockchain
  146. June 27, 2014, 08:55:00 pm
  147. #7
  148. Quote from: Come-from-Beyond on June 27, 2014, 08:45:04 pm
  149. Quote from: mthcl on June 27, 2014, 08:10:23 pm
  150. Quote from: Come-from-Beyond on June 27, 2014, 07:41:12 pm
  151. We r not obliged to have only 1 chain. BCNext planned to use parallel chains coz they can be forged without a lot of resources. Later he found a flaw in his design of PCs. If u invent a good scheme - great.
  152. My point (and not only my) is that a "chain" does not need necessarily be really a chain, it can be something as shown on the above picture.
  153.  
  154. Can you give a link to BCNext's desing of parallel chains?
  155.  
  156. Sorry, I can't. It's buried somewhere on the internet.
  157.  
  158. You can't or you just don't have the time to find it?
  159.  
  160. I could look if it is somewhere in the megathread, for example
  161. Ignore Report to moderator
  162. NXT: NXT-4CS7-S4N5-PTH5-A8R2Q
  163. benjyz
  164. Hero Member
  165. *****
  166. Offline Offline
  167. Posts: 508
  168. View Profile Personal Message (Offline)
  169. Karma: +70/-4
  170. applaud / spank
  171.  
  172. Re: DAG, a generalized blockchain
  173. June 27, 2014, 08:56:21 pm
  174. #8
  175. Quote from: mthcl on June 27, 2014, 08:10:23 pm
  176. My point (and not only my) is that a "chain" does not need necessarily be really a chain, it can be something as shown on the above picture.
  177.  
  178. I think you're making an error here, which I've seen before when I read about the GHOST proposal. Chains exist as replicated data across nodes. There is no "chain" which exists in a Platonic realm. There are computers in a network which assume that the chain exists, because they communicate with each other in a coordinated fashion. TF is similar to GHOST in that there is the idea that nodes can operate for themselves and somehow it is assumed that other nodes know about this. This is not how it works. The Byzantine Generals Problem and Lamport's partial order are related (Lamport invented the BGP). One can also think about this is in terms of a global vs local view problem.
  179.  
  180. Quote
  181. The proof-of-work chain is how all the synchronisation, distributed database and global view problems you've asked about are solved.
  182.  
  183. http://satoshi.nakamotoinstitute.org/emails/cryptography/11/
  184. Ignore Report to moderator
  185. gs02xzz
  186. Hero Member
  187. *****
  188. Offline Offline
  189. Posts: 1101
  190. View Profile Personal Message (Offline)
  191. Karma: +55/-12
  192. applaud / spank
  193.  
  194. Re: DAG, a generalized blockchain
  195. June 27, 2014, 09:00:27 pm
  196. #9
  197. These guys are working on custom block-chains - https://bitcointalk.org/index.php?topic=654463
  198. Ignore Report to moderator
  199. Nxt Mission is to commercialize the crypto technology and build new commerce and society.
  200. mthcl
  201. Hero Member
  202. *****
  203. Online Online
  204. Posts: 556
  205. [Tip Me]
  206. View Profile Email Personal Message (Online)
  207. Karma: +88/-8
  208. applaud / spank
  209.  
  210. Re: DAG, a generalized blockchain
  211. June 27, 2014, 09:06:07 pm
  212. #10
  213. Quote from: benjyz on June 27, 2014, 08:56:21 pm
  214. Chains exist as replicated data across nodes. There is no "chain" which exists in a Platonic realm.
  215. This I understand. Of course, the object on the picture is stored in the database; also, topologically it's almost equivalent to a chain. You may think about it as a usual blockchain, but the orphaned nodes don't fall to limbo, they are still stored in the database.
  216.  
  217. Now, could you please explain why maintaining two different chains with different characteristics would destroy Nxt?
  218. Ignore Report to moderator
  219. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  220. benjyz
  221. Hero Member
  222. *****
  223. Offline Offline
  224. Posts: 508
  225. View Profile Personal Message (Offline)
  226. Karma: +70/-4
  227. applaud / spank
  228.  
  229. Re: DAG, a generalized blockchain
  230. June 27, 2014, 09:31:13 pm
  231. #11
  232. Quote from: mthcl on June 27, 2014, 09:06:07 pm
  233. Now, could you please explain why maintaining two different chains with different characteristics would destroy Nxt?
  234.  
  235. All nodes have to process all transactions, or at least have to be able to (if I request information full nodes have to give me the full history).
  236.  
  237. If I operate a Nxt node and the Nxt node I operate communicates with 300 peers - how should I know which chains are valid? Say there are two valid chains A and B. If only some nodes know about chain A and not about B, then which nodes are they? It would be a split in the network which can't be sorted. Every node would have to keep track of what other nodes know (a list of "A-nodes" and "B-nodes"). On the other hand if all nodes know about chain A and B, it makes no difference. The chains are really the same: there would be a class BlockchainA and BlockchainB, and the code would be identical. It might very well make sense to have one chain for different transaction types (moneyChain, aliasChain, ...), but I think this is not what you mean.
  238. Ignore Report to moderator
  239. mthcl
  240. Hero Member
  241. *****
  242. Online Online
  243. Posts: 556
  244. [Tip Me]
  245. View Profile Email Personal Message (Online)
  246. Karma: +88/-8
  247. applaud / spank
  248.  
  249. Re: DAG, a generalized blockchain
  250. June 27, 2014, 09:33:26 pm
  251. #12
  252. So, are there any advantages of DAGs over chains, apart from being able to generate more blocks per unit of time?
  253.  
  254. I think there is a very important one: it is much easier to attack a chain than to attack a DAG! As you know, there are many attack scenarios that go like this: a bad guy is doing something to create an alternative subchain, and then feeds this subchain to good guys. If the alternative subchain is "better", then the Dark Side wins. However, this kind of attack would be useless if a DAG is used instead of chain: the nodes would just store the two subchains, and that's all.
  255. « Last Edit: June 27, 2014, 09:38:20 pm by mthcl » Ignore Report to moderator
  256. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  257. mthcl
  258. Hero Member
  259. *****
  260. Online Online
  261. Posts: 556
  262. [Tip Me]
  263. View Profile Email Personal Message (Online)
  264. Karma: +88/-8
  265. applaud / spank
  266.  
  267. Re: DAG, a generalized blockchain
  268. June 27, 2014, 09:37:23 pm
  269. #13
  270. Quote from: benjyz on June 27, 2014, 09:31:13 pm
  271. It might very well make sense to have one chain for different transaction types (moneyChain, aliasChain, ...), but I think this is not what you mean.
  272. In fact, I mean more-or-less this. For money transactions, of course, there should be one and only one chain. But if we want to store some other information for which there is no possibility of conflicts similar to double-spending, we may well use another chain for that, or even a DAG. Just modified the 1st post to explain this.
  273. « Last Edit: June 27, 2014, 09:52:51 pm by mthcl » Ignore Report to moderator
  274. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  275. mthcl
  276. Hero Member
  277. *****
  278. Online Online
  279. Posts: 556
  280. [Tip Me]
  281. View Profile Email Personal Message (Online)
  282. Karma: +88/-8
  283. applaud / spank
  284.  
  285. Re: DAG, a generalized blockchain
  286. June 27, 2014, 09:47:55 pm
  287. #14
  288. Here are some links on Parallel Chains, provided by Jimmy2011:
  289.  
  290. Jan 17th, 2014
  291. https://bitcointalk.org/index.php?topic=345619.msg4558565#msg4558565
  292. https://bitcointalk.org/index.php?topic=345619.msg4559456#msg4559456
  293.  
  294. Feb 3rd, 2014
  295. https://bitcointalk.org/index.php?topic=345619.msg4916018#msg4916018
  296.  
  297. Mar 8th, 2014
  298. https://bitcointalk.org/index.php?topic=345619.msg5584903#msg5584903
  299.  
  300. Apr 16th, 2014
  301. https://nxtforum.org/parallel-blockchains/what-the-status-of-parallel-blockchain-for-nxt/msg9450/#msg9450
  302.  
  303. Apr 18th, 2014
  304. https://nxtforum.org/parallel-blockchains/what-the-status-of-parallel-blockchain-for-nxt/msg9977/#msg9977
  305. Ignore Report to moderator
  306. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  307. Come-from-Beyond
  308. Hero Member
  309. *****
  310. Offline Offline
  311. Posts: 4014
  312.  
  313. View Profile Email Personal Message (Offline)
  314. Karma: +792/-670
  315. applaud / spank
  316.  
  317. Re: DAG, a generalized blockchain
  318. June 27, 2014, 10:26:29 pm
  319. #15
  320. Quote from: Daedelus on June 27, 2014, 08:55:00 pm
  321. I could look if it is somewhere in the megathread, for example
  322.  
  323. I have to dig thru a huge chat log to find the description.
  324.  
  325. It would be great if u found it. I didn't get the idea of PC completely so I didn't memorize it. There were such words as "master" and "slave".
  326.  
  327. Edit: mthcl already found it :) - https://bitcointalk.org/index.php?topic=345619.msg5584903#msg5584903
  328. Ignore Report to moderator
  329. mthcl
  330. Hero Member
  331. *****
  332. Online Online
  333. Posts: 556
  334. [Tip Me]
  335. View Profile Email Personal Message (Online)
  336. Karma: +88/-8
  337. applaud / spank
  338.  
  339. Re: DAG, a generalized blockchain
  340. June 27, 2014, 10:41:32 pm
  341. #16
  342. Quote from: Come-from-Beyond on June 27, 2014, 10:26:29 pm
  343. Edit: mthcl already found it :) - https://bitcointalk.org/index.php?topic=345619.msg5584903#msg5584903
  344. It was Jimmy2011.
  345. Ignore Report to moderator
  346. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  347. ChuckOne
  348. NRS Project Manager
  349. Hero Member
  350. *****
  351. Offline Offline
  352. Posts: 3438
  353. [Tip Me]
  354.  
  355. ☕ NXT-4BTE-8Y4K-CDS2-6TB82
  356. View Profile Personal Message (Offline)
  357. Karma: +291/-17
  358. applaud / spank
  359.  
  360. Re: DAG, a generalized blockchain
  361. June 27, 2014, 11:13:02 pm
  362. #17
  363. The most important issue, I had in mind, when comparing Nxt to the git DAG was that we would need to think of the "merge commit" aka the block that joins several chains together.
  364.  
  365. Think of commits as blocks and vice versa. Each block/commit represents a certain state but is an emergent property. Blocks/commits only contain the delta to the previous state.
  366.  
  367. Like in git, there will be merge conflicts aka double spends. But resolving that conflict, we will result in a state that carries the set of changes from both branches (like in git).
  368.  
  369. That was basically the idea.
  370. Ignore Report to moderator
  371. THE CHARITY HUB: NXT-8N9W-TN4F-YA2S-H5B7R
  372. Come-from-Beyond
  373. Hero Member
  374. *****
  375. Offline Offline
  376. Posts: 4014
  377.  
  378. View Profile Email Personal Message (Offline)
  379. Karma: +792/-670
  380. applaud / spank
  381.  
  382. Re: DAG, a generalized blockchain
  383. June 27, 2014, 11:20:45 pm
  384. #18
  385. Quote from: ChuckOne on June 27, 2014, 11:13:02 pm
  386. The most important issue, I had in mind, when comparing Nxt to the git DAG was that we would need to think of the "merge commit" aka the block that joins several chains together.
  387.  
  388. Think of commits as blocks and vice versa. Each block/commit represents a certain state but is an emergent property. Blocks/commits only contain the delta to the previous state.
  389.  
  390. Like in git, there will be merge conflicts aka double spends. But resolving that conflict, we will result in a state that carries the set of changes from both branches (like in git).
  391.  
  392. That was basically the idea.
  393.  
  394. The 1st obvious attack - someone forges a chain that is not compatible with the other chains. Every block. How r u going to counteract this attack?
  395. Ignore Report to moderator
  396. mthcl
  397. Hero Member
  398. *****
  399. Online Online
  400. Posts: 556
  401. [Tip Me]
  402. View Profile Email Personal Message (Online)
  403. Karma: +88/-8
  404. applaud / spank
  405.  
  406. Re: DAG, a generalized blockchain
  407. June 27, 2014, 11:23:56 pm
  408. #19
  409. Quote from: ChuckOne on June 27, 2014, 11:13:02 pm
  410. The most important issue, I had in mind, when comparing Nxt to the git DAG was that we would need to think of the "merge commit" aka the block that joins several chains together.
  411.  
  412. Think of commits as blocks and vice versa. Each block/commit represents a certain state but is an emergent property. Blocks/commits only contain the delta to the previous state.
  413.  
  414. Like in git, there will be merge conflicts aka double spends. But resolving that conflict, we will result in a state that carries the set of changes from both branches (like in git).
  415.  
  416. That was basically the idea.
  417. What are "merge conflicts"?
  418.  
  419.  
  420. Re: DAG, a generalized blockchain
  421. June 27, 2014, 11:28:03 pm
  422. #20
  423. Quote from: Come-from-Beyond on June 27, 2014, 11:20:45 pm
  424. The 1st obvious attack - someone forges a chain that is not compatible with the other chains. Every block. How r u going to counteract this attack?
  425. The idea was to use the DAG for the storage of something, for which the "compatibility" problems don't arise. For example, an account publishes "I love Mary", so that that later he's able to prove he was in love with Mary at a certain time. If on a parallel chain the same account published "I love Alice", well, this means he was in love with Mary and Alice at the same time, there is no contradiction :)
  426. Ignore Report to moderator
  427. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  428. ChuckOne
  429. NRS Project Manager
  430. Hero Member
  431. *****
  432. Offline Offline
  433. Posts: 3438
  434. [Tip Me]
  435.  
  436. ☕ NXT-4BTE-8Y4K-CDS2-6TB82
  437. View Profile Personal Message (Offline)
  438. Karma: +291/-17
  439. applaud / spank
  440.  
  441. Re: DAG, a generalized blockchain
  442. June 27, 2014, 11:30:36 pm
  443. #21
  444. Quote from: Come-from-Beyond on June 27, 2014, 11:20:45 pm
  445. Quote from: ChuckOne on June 27, 2014, 11:13:02 pm
  446. The most important issue, I had in mind, when comparing Nxt to the git DAG was that we would need to think of the "merge commit" aka the block that joins several chains together.
  447.  
  448. Think of commits as blocks and vice versa. Each block/commit represents a certain state but is an emergent property. Blocks/commits only contain the delta to the previous state.
  449.  
  450. Like in git, there will be merge conflicts aka double spends. But resolving that conflict, we will result in a state that carries the set of changes from both branches (like in git).
  451.  
  452. That was basically the idea.
  453.  
  454. The 1st obvious attack - someone forges a chain that is not compatible with the other chains. Every block. How r u going to counteract this attack?
  455.  
  456.  
  457. What do you do in case of a merge conflict?
  458. Ignore Report to moderator
  459. THE CHARITY HUB: NXT-8N9W-TN4F-YA2S-H5B7R
  460. ChuckOne
  461. NRS Project Manager
  462. Hero Member
  463. *****
  464. Offline Offline
  465. Posts: 3438
  466. [Tip Me]
  467.  
  468. ☕ NXT-4BTE-8Y4K-CDS2-6TB82
  469. View Profile Personal Message (Offline)
  470. Karma: +291/-17
  471. applaud / spank
  472.  
  473. Re: DAG, a generalized blockchain
  474. June 27, 2014, 11:32:50 pm
  475. #22
  476. Quote from: mthcl on June 27, 2014, 11:23:56 pm
  477. Quote from: ChuckOne on June 27, 2014, 11:13:02 pm
  478. The most important issue, I had in mind, when comparing Nxt to the git DAG was that we would need to think of the "merge commit" aka the block that joins several chains together.
  479.  
  480. Think of commits as blocks and vice versa. Each block/commit represents a certain state but is an emergent property. Blocks/commits only contain the delta to the previous state.
  481.  
  482. Like in git, there will be merge conflicts aka double spends. But resolving that conflict, we will result in a state that carries the set of changes from both branches (like in git).
  483.  
  484. That was basically the idea.
  485. What are "merge conflicts"?
  486.  
  487. Basically, if you edited a file in the same line as I did, we both committed our changes and now, we need to merge. Somehow, we would need to resolve that conflict because you wanted to have "a=4" and I wanted "a=5" in that line. Who knows what the resolution would be here?
  488. Ignore Report to moderator
  489. THE CHARITY HUB: NXT-8N9W-TN4F-YA2S-H5B7R
  490. mthcl
  491. Hero Member
  492. *****
  493. Online Online
  494. Posts: 556
  495. [Tip Me]
  496. View Profile Email Personal Message (Online)
  497. Karma: +88/-8
  498. applaud / spank
  499.  
  500. Re: DAG, a generalized blockchain
  501. June 27, 2014, 11:36:18 pm
  502. #23
  503. Quote from: ChuckOne on June 27, 2014, 11:32:50 pm
  504. Quote from: mthcl on June 27, 2014, 11:23:56 pm
  505. Quote from: ChuckOne on June 27, 2014, 11:13:02 pm
  506. The most important issue, I had in mind, when comparing Nxt to the git DAG was that we would need to think of the "merge commit" aka the block that joins several chains together.
  507.  
  508. Think of commits as blocks and vice versa. Each block/commit represents a certain state but is an emergent property. Blocks/commits only contain the delta to the previous state.
  509.  
  510. Like in git, there will be merge conflicts aka double spends. But resolving that conflict, we will result in a state that carries the set of changes from both branches (like in git).
  511.  
  512. That was basically the idea.
  513. What are "merge conflicts"?
  514.  
  515. Basically, if you edited a file in the same line as I did, we both committed our changes and now, we need to merge. Somehow, we would need to resolve that conflict because you wanted to have "a=4" and I wanted "a=5" in that line. Who knows what the resolution would be here?
  516. The idea is that "a" could be 4 or 5 at the same time. See my previous message :)
  517. Ignore Report to moderator
  518. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  519. ChuckOne
  520. NRS Project Manager
  521. Hero Member
  522. *****
  523. Offline Offline
  524. Posts: 3438
  525. [Tip Me]
  526.  
  527. ☕ NXT-4BTE-8Y4K-CDS2-6TB82
  528. View Profile Personal Message (Offline)
  529. Karma: +291/-17
  530. applaud / spank
  531.  
  532. Re: DAG, a generalized blockchain
  533. June 27, 2014, 11:40:35 pm
  534. #24
  535. Quote from: mthcl on June 27, 2014, 11:36:18 pm
  536. The idea is that "a" could be 4 or 5 at the same time. See my previous message :)
  537.  
  538. Then, we misunderstood each other the other day. ;) I meant, I wanted something like a merge block to a reasonable extend.
  539.  
  540. But anyhow, utilizing a DAG for both seems possible as we are talking about emergent states. :)
  541. Ignore Report to moderator
  542. THE CHARITY HUB: NXT-8N9W-TN4F-YA2S-H5B7R
  543. benjyz
  544. Hero Member
  545. *****
  546. Offline Offline
  547. Posts: 508
  548. View Profile Personal Message (Offline)
  549. Karma: +70/-4
  550. applaud / spank
  551.  
  552. Re: DAG, a generalized blockchain
  553. June 27, 2014, 11:57:22 pm
  554. #25
  555. This is basically the same as the side-chain idea. The question is: why should such chains be supported in the first place? Nxt has a marketcap of 60M$ and when I register an alias or buy Nxt I'm building on the economic interest. If alternative chains exist, why should they be supported? The market value provides a reliable indicator. Without the value of the money there is no interest in the data that is stored. And if there is a separate maintainer it is a different currency. A currency issuer does not need permission of Bitcoin or Nxt to start his blockchain (if he can demonstrate the system is viable).
  556. Ignore Report to moderator
  557. ChuckOne
  558. NRS Project Manager
  559. Hero Member
  560. *****
  561. Offline Offline
  562. Posts: 3438
  563. [Tip Me]
  564.  
  565. ☕ NXT-4BTE-8Y4K-CDS2-6TB82
  566. View Profile Personal Message (Offline)
  567. Karma: +291/-17
  568. applaud / spank
  569.  
  570. Re: DAG, a generalized blockchain
  571. June 28, 2014, 12:04:50 am
  572. #26
  573. Currently, the point is not why (although, we already had many proposals of what could be achieved by this) but how. :)
  574. Ignore Report to moderator
  575. THE CHARITY HUB: NXT-8N9W-TN4F-YA2S-H5B7R
  576. Come-from-Beyond
  577. Hero Member
  578. *****
  579. Offline Offline
  580. Posts: 4014
  581.  
  582. View Profile Email Personal Message (Offline)
  583. Karma: +792/-670
  584. applaud / spank
  585.  
  586. Re: DAG, a generalized blockchain
  587. June 28, 2014, 12:18:32 am
  588. #27
  589. Quote from: ChuckOne on June 27, 2014, 11:30:36 pm
  590. What do you do in case of a merge conflict?
  591.  
  592. I do manual work.
  593. Ignore Report to moderator
  594. ChuckOne
  595. NRS Project Manager
  596. Hero Member
  597. *****
  598. Offline Offline
  599. Posts: 3438
  600. [Tip Me]
  601.  
  602. ☕ NXT-4BTE-8Y4K-CDS2-6TB82
  603. View Profile Personal Message (Offline)
  604. Karma: +291/-17
  605. applaud / spank
  606.  
  607. Re: DAG, a generalized blockchain
  608. June 28, 2014, 12:41:42 am
  609. #28
  610. Quote from: Come-from-Beyond on June 28, 2014, 12:18:32 am
  611. Quote from: ChuckOne on June 27, 2014, 11:30:36 pm
  612. What do you do in case of a merge conflict?
  613.  
  614. I do manual work.
  615.  
  616. Right. Manual work seems impossible for currencies at least for now. Maybe, somebody has a better idea.
  617.  
  618. So, reducing the manual work to a minimum can be a key here to save economic value i.e. the loss of transactions.
  619. « Last Edit: June 28, 2014, 12:51:37 am by ChuckOne » Ignore Report to moderator
  620. THE CHARITY HUB: NXT-8N9W-TN4F-YA2S-H5B7R
  621. benjyz
  622. Hero Member
  623. *****
  624. Offline Offline
  625. Posts: 508
  626. View Profile Personal Message (Offline)
  627. Karma: +70/-4
  628. applaud / spank
  629.  
  630. Re: DAG, a generalized blockchain
  631. June 28, 2014, 03:36:56 pm
  632. #29
  633. Quote from: mthcl on June 27, 2014, 08:53:14 pm
  634. 1. A chain creates a total (linear) ordering of events, not only partial.
  635.  
  636. The blocks are totally ordered, and the chain ensures that the history is complete. The events in the blocks are not totally ordered.
  637.  
  638. A blockchain is by definition a partial order (within a total order). Say you have these two transactions (case A):
  639.  
  640. tx_1: Alice sends Nxt to Bob at 00:00:00 UTC
  641. tx_2: Charlie sends Nxt to David 00:00:11 UTC
  642.  
  643. Which one gets processed first? If Alice has a high latency connection, then tx_2 might come first. A total order would mean that all tx get processed according to their timestamps. Which is impossible because the timestamps of nodes are not known to be accurate, and the latencies between nodes are not known and not reliable etc. What matters is the relationship of latency to the blocktime (perhaps this can be modeled, but assumptions are crucial).
  644.  
  645. This is closely to connected to the double spend. Double spend has to do with tracking events in a distributed system. It's a special case of case A (case double spend):
  646.  
  647. Alice has a balance of 10 Nxt.
  648.  
  649. tx_1: Alice sends 10 Nxt to Bob at 00:00:00 UTC
  650. tx_2: Alice sends 10 Nxt to David 00:00:11 UTC
  651.  
  652. Turns out that the solution to the double spend problem is introducing a kind of logical time. It does not matter what the latency of the 4 participants are as long as they are orders of magnitude lower than the blocktime. This principle one can call logical broadcast. It has been almost never discussed in Bitcoin development, because of the focus on malicious actors and BGP. I think this has to do with biases in the field of cryptography which does not deal with time and distributed systems. Most of the knowledge of Bitcoin development seems to be connected to the PoW mechanism, and the complicated interactions and calculations. There were many ideas of pruning chains, loading only partial history etc. I think full nodes (in lack of a better term) should always be able to access the full history.
  653.  
  654. Lamport described the principles of partial orders first in 1978 [1] . The importance of latencies in networks is what highfrequency traders are very aware of. It's not intuitive - the recent book by Michael Lewis has described this quite clearly [2] in connection to the US stock market. Large exchanges have to have a total order (discussion beyond scope of this post).
  655.  
  656. [1] http://web.stanford.edu/class/cs240/readings/lamport.pdf
  657. [2] http://www.theguardian.com/business/2014/apr/16/michael-lewis-flash-boys-wall-street-insane
  658.  
  659. Edit: clarify partial order.
  660. « Last Edit: June 28, 2014, 04:09:54 pm by benjyz » Ignore Report to moderator
  661. mthcl
  662. Hero Member
  663. *****
  664. Online Online
  665. Posts: 556
  666. [Tip Me]
  667. View Profile Email Personal Message (Online)
  668. Karma: +88/-8
  669. applaud / spank
  670.  
  671. Re: DAG, a generalized blockchain
  672. June 28, 2014, 09:13:03 pm
  673. #30
  674. Within each block you can easily order the events by e.g. their ID's, so it's not difficult at all to introduce a total ordering of them as well, if needed. But my point was that on DAGs, although there is no "natural" total order, still this may not be a problem for some applications (like timestamping).
  675. Ignore Report to moderator
  676. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  677. benjyz
  678. Hero Member
  679. *****
  680. Offline Offline
  681. Posts: 508
  682. View Profile Personal Message (Offline)
  683. Karma: +70/-4
  684. applaud / spank
  685.  
  686. Re: DAG, a generalized blockchain
  687. June 28, 2014, 10:10:14 pm
  688. #31
  689. that's what I demonstrated above to be false - total order is impossible in a P2P network, because information travels at maximum of speed of light. These are nodes communicating, and there is no central actor doing ordering. the node forging the block does not know for sure when the tx was sent to him. every node can lie about his local time. the only thing a node knows is what his time is and at what time messages arrive. because if a node could lie about his time, he could re-write history and make himself rich (like the guy in back to the future).
  690. Ignore Report to moderator
  691. mthcl
  692. Hero Member
  693. *****
  694. Online Online
  695. Posts: 556
  696. [Tip Me]
  697. View Profile Email Personal Message (Online)
  698. Karma: +88/-8
  699. applaud / spank
  700.  
  701. Re: DAG, a generalized blockchain
  702. June 28, 2014, 10:20:48 pm
  703. #32
  704. I didn't claim you can introduce the total ordering of the events which agrees with their issue times (where did you read it?!). I only claimed that you can introduce a total ordering on which you have the consensus.
  705. Ignore Report to moderator
  706. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  707. mthcl
  708. Hero Member
  709. *****
  710. Online Online
  711. Posts: 556
  712. [Tip Me]
  713. View Profile Email Personal Message (Online)
  714. Karma: +88/-8
  715. applaud / spank
  716.  
  717. Re: DAG, a generalized blockchain
  718. June 28, 2014, 10:21:06 pm
  719. #33
  720. .
  721. Ignore Report to moderator
  722. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  723. Come-from-Beyond
  724. Hero Member
  725. *****
  726. Offline Offline
  727. Posts: 4014
  728.  
  729. View Profile Email Personal Message (Offline)
  730. Karma: +792/-670
  731. applaud / spank
  732.  
  733. Re: DAG, a generalized blockchain
  734. June 28, 2014, 10:24:00 pm
  735. #34
  736. Quote from: mthcl on June 28, 2014, 10:21:06 pm
  737. .
  738.  
  739. Completely agree.
  740. Ignore Report to moderator
  741. benjyz
  742. Hero Member
  743. *****
  744. Offline Offline
  745. Posts: 508
  746. View Profile Personal Message (Offline)
  747. Karma: +70/-4
  748. applaud / spank
  749.  
  750. Re: DAG, a generalized blockchain
  751. June 28, 2014, 10:33:19 pm
  752. #35
  753. Quote from: mthcl on June 28, 2014, 10:20:48 pm
  754. I didn't claim you can introduce the total ordering of the events which agrees with their issue times (where did you read it?!). I only claimed that you can introduce a total ordering on which you have the consensus.
  755.  
  756. The current time is ca. 15:25:00 UTC. If I issue a transaction at 15:30:00 UTC, nobody will know whether that was true. So even if the node that forges the next block would know that timestamp he will not know. So the consensus consists in agreeing about the blocks. We need block times to agree on something. And because we (the P2P nodes) don't know the various latencies we use one discrete time interval - the block. If all nodes would be a graph, say of some well formed shape and all the latencies perfectly known, the problem would be very different. We could trust the local timestamps. Perhaps such a system could exist, but the Internet is not build for it.
  757. Ignore Report to moderator
  758. mthcl
  759. Hero Member
  760. *****
  761. Online Online
  762. Posts: 556
  763. [Tip Me]
  764. View Profile Email Personal Message (Online)
  765. Karma: +88/-8
  766. applaud / spank
  767.  
  768. Re: DAG, a generalized blockchain
  769. June 28, 2014, 10:38:06 pm
  770. #36
  771. Quote from: benjyz on June 28, 2014, 10:33:19 pm
  772. Quote from: mthcl on June 28, 2014, 10:20:48 pm
  773. I didn't claim you can introduce the total ordering of the events which agrees with their issue times (where did you read it?!). I only claimed that you can introduce a total ordering on which you have the consensus.
  774.  
  775. The current time is ca. 15:25:00 UTC. If I issue a transaction at 15:30:00 UTC, nobody will know whether that was true. So even if the node that forges the next block would know that timestamp he will not know. So the consensus consists in agreeing about the blocks. We need block times to agree on something. And because we (the P2P nodes) don't know the various latencies we use one discrete time interval - the block. If all nodes would be a graph, say of some well formed shape and all the latencies perfectly known, the problem would be very different. We could trust the local timestamps. Perhaps such a system could exist, but the Internet is not build for it.
  776. Yes, sure. Did I argue with that?..
  777.  
  778. Can you formulate precisely, what was my claim with which you don't agree?
  779. Ignore Report to moderator
  780. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  781. benjyz
  782. Hero Member
  783. *****
  784. Offline Offline
  785. Posts: 508
  786. View Profile Personal Message (Offline)
  787. Karma: +70/-4
  788. applaud / spank
  789.  
  790. Re: DAG, a generalized blockchain
  791. June 28, 2014, 10:45:58 pm
  792. #37
  793. I think we have different definitions of total order. I mean by total order that all transactions can be ordered by the time they were issued (a node stamps his tx before sending it with the local time). This is impossible for reasons given above. The blockchain order is total, but not perfectly accurate. It's accurate enough. The reason why I'm arguing this point is that for certain class of transactions a total order is needed: highly scalable exchange markets. Because the price one counterparty gets depends on the total order of transactions (arbitrage argument basically). It's the reason why I think Nxt will/would run into some issue with the AE if orders will be processed through the blockchain at scale (I haven't studied the plans in detail, just referring to the current codebase). In such an exchange blockchain the best matching price will occur at the end of a block, so it does not make sense to issue orders at the beginning of the block. This creates various "problems", at least at scale.
  794.  
  795. Edit: so for more generalized versions of blockchains which can have a total order something else is needed. I haven't seen any proposals for it yet, which I believe can work.
  796. « Last Edit: June 28, 2014, 10:54:27 pm by benjyz » Ignore Report to moderator
  797. mthcl
  798. Hero Member
  799. *****
  800. Online Online
  801. Posts: 556
  802. [Tip Me]
  803. View Profile Email Personal Message (Online)
  804. Karma: +88/-8
  805. applaud / spank
  806.  
  807. Re: DAG, a generalized blockchain
  808. June 28, 2014, 10:55:05 pm
  809. #38
  810. Yes, I meant the "abstract" total order, in the sense of this definition. Then there is nothing to argue: of course, you cannot recover the "real" order of events w.r.t. time, but you can achieve a consensus on another total ordering, which approximates the "ideal" one reasonably well (or maybe not).
  811.  
  812. Now, let me take take a break from the forum: Brazil is gonna play! :)
  813. Ignore Report to moderator
  814. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  815. Come-from-Beyond
  816. Hero Member
  817. *****
  818. Offline Offline
  819. Posts: 4014
  820.  
  821. View Profile Email Personal Message (Offline)
  822. Karma: +792/-670
  823. applaud / spank
  824.  
  825. Re: DAG, a generalized blockchain
  826. July 03, 2014, 11:25:11 pm
  827. #39
  828. May be worth reading:
  829.  
  830. GHOST - https://eprint.iacr.org/2013/881.pdf
  831. DECOR - http://bitslog.wordpress.com/2014/05/02/decor/
  832.  
  833.  
  834. Re: DAG, a generalized blockchain
  835. July 04, 2014, 10:16:54 pm
  836. #40
  837. Quote from: Come-from-Beyond on July 03, 2014, 11:25:11 pm
  838. May be worth reading:
  839.  
  840. GHOST - https://eprint.iacr.org/2013/881.pdf
  841. DECOR - http://bitslog.wordpress.com/2014/05/02/decor/
  842. Seems that these articles are more about PoW. And PoW/PoS = randomness/pseudorandomness. I would be surprised if these methods turn out to be directly applicable to PoS.
  843. Ignore Report to moderator
  844. messages and donations: NXT-N8U7-TU6Z-HU3S-759Y7
  845. mczarnek
  846. Hero Member
  847. *****
  848. Offline Offline
  849. Posts: 898
  850. View Profile Nxt Place - Craigslist for Nxt Personal Message (Offline)
  851. Karma: +68/-4
  852. applaud / spank
  853.  
  854. Re: DAG, a generalized blockchain
  855. July 13, 2014, 05:23:54 am
  856. #41
  857. Seems to me like if sidechains are possible then parallel chains should be too.. They are largely the same idea, right? You can move your Nxt off of the main chain, process them separately, then move them back onto the main chain later to switch between chains. Every country has it's own chain or something along those lines. 1 Nxt on any chain = 1 Nxt on any other chain.
  858.  
  859. I would say it'd be worth looking into how Bitcoin plans to implement sidechains.
  860. Ignore Report to moderator
  861. NXT Organization: Tech
  862. Donations greatly appreciated: NXT-DWVJ-G89C-RHNL-6QW6Q
  863. benjyz
  864. Hero Member
  865. *****
  866. Offline Offline
  867. Posts: 508
  868. View Profile Personal Message (Offline)
  869. Karma: +70/-4
  870. applaud / spank
  871.  
  872. Re: DAG, a generalized blockchain
  873. July 24, 2014, 03:48:56 pm
  874. #42
  875. Quote from: mthcl on July 04, 2014, 10:16:54 pm
  876. Quote from: Come-from-Beyond on July 03, 2014, 11:25:11 pm
  877. May be worth reading:
  878.  
  879. GHOST - https://eprint.iacr.org/2013/881.pdf
  880. DECOR - http://bitslog.wordpress.com/2014/05/02/decor/
  881. Seems that these articles are more about PoW. And PoW/PoS = randomness/pseudorandomness. I would be surprised if these methods turn out to be directly applicable to PoS.
  882.  
  883. GHOST is a bad idea, which really highlights what I've said above. All nodes have to have the same information at the same time. Imagine that there is a graph of say 10 nodes, and 5 of them are in close proximity and 5 are further away. The 5 nodes in close proximity can collude at the expense of the other 5 outside nodes. This is exactly the problem in financial markets, and what is known as highfrequency trading (a better term is predatory trading).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement