Bitcoin Forum
June 22, 2024, 09:56:31 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 [175] 176 177 178 179 180 181 182 183 184 185 186 »
3481  Bitcoin / Development & Technical Discussion / Re: What Guarantees Are There That The Supply of Bitcoin Will Be Limited on: September 24, 2011, 02:43:28 AM
Why would anyone do that ? But it's a good question.

To be clear, not anyone could do it.  It would have to be the core developers who make the decision to do that, as they are the only ones that, in general can release/approve any code updates without forking the blockchain.  The problem is, this change would be so dramatic and controversial, it's likely to fork the blockchain anyway, and throw the entire project into chaos.  X% of people would whole-heartedly disagree, and fork the project with the original code and original philosophy.  100%-X% would just follow the core developers and go with it.  I believe that this would cause all sorts of controversy, and frustration, and loss of morale among BTC supporters.  It would probably start a downward spiral of BTC.  I assume X > 10.

Only with an extraordinary level of "consensus," whatever that means, could the developers make such a drastic change and keep the unanimous support of the current user base.  The problem is, there's not really a way to get a consensus.  Even if the software design was truly a democratic process, there's no way to know what users would agree to do.  I think the only way for Bitcoin to continue is with the core philosophical elements intact.  

Other people have decided they don't like the way BTC works, and have made their own forks (one of them, I forget which, uses constant inflation rate).  But to date, none of them have attracted any significant portion of BTC users, and thus, the devs have no reason to believe this is a desirable change (plus, they'd have to believe in it themselves, first).
3482  Bitcoin / Development & Technical Discussion / Re: Accessing the network through a "lite" node on: September 24, 2011, 12:09:28 AM
Quote
Not having NODE_NETWORK set indicates that you're a lightweight client. Exactly what this means is not yet well-defined.

By "not set" I assume you mean setting NODE_NETWORK to zero.  It sounded like the reference client doesn't really take this into account yet, but that's not a reason to ignore it...

Quote
You should definitely be downloading full blocks if you have it set, though.

Does this mean that I should be relaying full blocks if this value is set (i.e. other nodes expect me to respond to getdata requests)?  Or they won't give me full blocks unless this is set (i.e. they assume I'm a headers-only kind of node)?
3483  Bitcoin / Development & Technical Discussion / Re: Cryptographic reasoning for double-hash? on: September 23, 2011, 11:30:12 PM
My theory on this is simple:  if SHA256 is "broken," it will very likely not "break" double-SHA256.  If someone were to discover a way to find collisions in 2^50 calculations, then it is still prohibitive (at least, annoying) to find collisions in single SHA256.  However, it's very likely that this vulnerability would reduce double-SHA256 to somwhere between 2^75 and 2^100 calculations.  This is still completely infeasible right now.  I believe the entire BTC network has computed about 2^70 hashes over its entire two years in service.
3484  Bitcoin / Development & Technical Discussion / Re: Accessing the network through a "lite" node on: September 23, 2011, 11:26:56 PM
As I linked in my first post, there is a "services" bitfield in the specification described as "bitfield of features to be enabled for this connection".  I assumed this was the place to identify yourself and your capabilities.  I'm not convinced that the network can really operate with a diverse field of node types without understanding his own peers.  If none of your peers are willing to identify their capabilities, and you aren't receiving any block/tx updates, how do you know that you aren't being attacked, or just connected to bunch of lightweight nodes? 

The fact that such a field exists in the specification page leads me to believe there was intent for nodes to advertise this information.  And it makes sense that the network (and users) would want nodes to specify this information.

And my search-fu sucks.  I don't know why I've always failed at this.  I've tried "lite node" and "lightweight".  I found a page labeled "RFC for lightweight nodes" but it didn't contain this information.  I'm not so concerned with how to manage it, though.  I was more interested with the network protocol around "services" identification. 

3485  Bitcoin / Development & Technical Discussion / Re: Bitcoin Enhancement Proposals (BEPS) on: September 23, 2011, 10:53:59 PM
This isn't a space-shuttle, but I'd argue it's actually similar in many respects...

Let's not flatter ourselves Smiley I already saw some people starting to behave like it's a rocket science. It isn't.


If you've ever tried implementing the actual Bitcoin protocols, you'd realize that it is extremely complicated with countless nuances and pitfalls that have the potential to break the entire system.  And it's amusing you used the rocket science phrase with me, as I actually do rocket science at my full-time job.  It's complex programming, math, algorithm/computational optimization, and most importantly--collaboration between lots of developers with a lot of risk of catastrophic failure if you do it wrong.  I consider what I do at my job to share a lot of characteristics with developing for Bitcoin.  I feel very challenged by both.  

As a bunch of part-time hobbyists, I understand the inclination to keep things less formal.  Most open-source projects can get away with this.  But Bitcoin has the goal of wide acceptance outside of the small clique of nerds that currently use it.  A couple months ago I became interested in developing for Bitcoin and was very disappointed to see a lack of documentation and structure.  It feels like someone's pet project (hell, it actually is).  The learning curve is steep, and browsing/participating in forums seems to be the only way to get the information you need to contribute.  This is not a good recipe for wide acceptance.  

This is part of the reason few people, if any, have succeeded in making a usable, alternative BTC client.
3486  Bitcoin / Development & Technical Discussion / Re: Accessing the network through a "lite" node on: September 23, 2011, 10:43:56 PM
Quote
I don't understand what you are trying to do here.  There are a couple of levels of "lightweight" nodes that have been detailed on this forum that are compatible with the Bitcoin network.  Which are you shooting for?  What is the use case that you are aiming to satisfy?

Perhaps I should search bitcointalk.org through google, I bet that would get me better results.  Regardless,  this probably should've been in the alternative clients subforum, so sorry about that...

I should've stuck to the specific question which is: how should the node identify itself on the network?  It needs to let other nodes know it's not a full node.  But I don't see anywhere on the specification page how this is actually achieved.  I see a 64-bit "services" bitfield in the version message, but I see nothing about how to identify that my node has the capabilities listed there.  Perhaps that specification is just not up to date.


I'm not a programmer, so I can't help on the specifics, but there generally isn't any reason to identify the node.  My understanding is that nodes operate on an announce then pull-request kind of model.  Your client simply would never announce transactions or blocks being available via it, and would only request data that concerns itself.



This does not seem optimal.  The problem is that if a lot of people are using lightweight nodes that don't identify themselves as such, there's a risk for major network bottlenecks.  You try to propagate information on the network, but none of your peers will actually help you because you accidentally connected to too many lite nodes.  I see a necessity for nodes to be able to query the capabilities of their peers, to make sure that they are connected to a sufficient number of full-nodes that will help propagate important information.



The use-case here is like any other lite-client:   reduced resource utilization, and design focused on the human interface without having to reimplement the entire BTC protocol and risk forking the blockchain when I do it wrong.  Multi-sig transactions will be useless if no one can use them.  Wallet security could greatly benefit from a variety of features that aren't necessarily appropriate for the reference client, and will have questionable success without testing them on the network with real users. 


What I'm asking is are you trying to make a light client with a full blockchain that doesn't participate, a headers only blockchain, or no blockchain that keeps only blocks that concern itself?  The three models operate entirely differently.


At the moment, I'm working on the first option (full blockchain but no participation), with the intention to fork a branch of the second type (headers only, keeping only block data that is relevant to my wallet).  I currently envision having client software on your computer with the full blockchain and a phone app that only keeps headers.  In the future when the blockchain is big, both pieces would be headers-only, but perhaps with more information stored on the computer.
3487  Bitcoin / Development & Technical Discussion / Re: Accessing the network through a "lite" node on: September 23, 2011, 10:17:28 PM
Quote
I don't understand what you are trying to do here.  There are a couple of levels of "lightweight" nodes that have been detailed on this forum that are compatible with the Bitcoin network.  Which are you shooting for?  What is the use case that you are aiming to satisfy?

Perhaps I should search bitcointalk.org through google, I bet that would get me better results.  Regardless,  this probably should've been in the alternative clients subforum, so sorry about that...

I should've stuck to the specific question which is: how should the node identify itself on the network?  It needs to let other nodes know it's not a full node.  But I don't see anywhere on the specification page how this is actually achieved.  I see a 64-bit "services" bitfield in the version message, but I see nothing about how to identify that my node has the capabilities listed there.  Perhaps that specification is just not up to date.

The use-case here is like any other lite-client:   reduced resource utilization, and design focused on the human interface without having to reimplement the entire BTC protocol and risk forking the blockchain when I do it wrong.  Multi-sig transactions will be useless if no one can use them.  Wallet security could greatly benefit from a variety of features that aren't necessarily appropriate for the reference client, and will have questionable success without testing them on the network with real users. 
3488  Bitcoin / Development & Technical Discussion / Re: Bitcoin Enhancement Proposals (BEPS) on: September 23, 2011, 10:02:16 PM
I am afraid, you're making it so overly formal that only few people gonna use it.

Don't know if that's the idea, but if it's intended for 5-10 people, you probably don't need that level of formalism either.

You sound like you're organizing a committee to design a space-shuttle...


I whole-heartedly disagree.  Right now Bitcoin -- specification, protocol, documentation, standards - is seriously lacking formalism, and to the detriment of BTC as a whole.  I don't know why people are so afraid of having things well-structured.  This isn't a space-shuttle, but I'd argue it's actually similar in many respects: it's a damned-complicated system with millions of dollars at stake, with the goal to be used by millions of people and businesses, and easy to break with poorly planning/development (look at the endless scenarios that could cause blockchain forks).  I believe a big part of Bitcoin's success will be not just the core developers improving bitcoin, but the capability of other parties to get involved.

If the community is too afraid to add formalism to Bitcoin, it will forever continue to look like an experiment that never got out of the garage, and won't be taken seriously but such parties that would otherwise be interested and enable Bitcoin to grow.  If they can't figure out how to use, implement, and improve Bitcoin, it doesn't have a chance to succeed.

In fact, I think I'll make a BIP, specifically to better improve documentation and protocol specification.  That is a solid BIP.
3489  Bitcoin / Development & Technical Discussion / Accessing the network through a "lite" node on: September 23, 2011, 09:51:04 PM
I've been looking at the BTC Protocol Specification to understand what I would need to do differently (network-wise) if I were to put a "lite" node on the network.  So far, all I see is a "services" bitfield, but it only has one bit defined:  whether the node will relay headers-only, or all block information.  Wouldn't this be the place where you would specify that you are a lite-node?  Is there another way to do this? 

Here's my understanding of how a lite-node will operate:

  • Will not verify any information - assumes that headers and tx's it receives (especially those in the blockchain) are valid
  • Will not relay/broadcast any information to other nodes because it cannot verify it (is it okay to relay headers if they have the right number of leading 0 bits?)
  • Will connect to peers in the way a full node does, but with information identifying its limited capabilities
  • Can request information from the nodes, such as headers and block data, but will not forward any of it
  • Will receive broadcasted tx and headers without requesting them.
  • Can construct and broadcast new tx packets to connected nodes (with tx-fee info exchange)
  • Will provide the user payment verification

I guess my question is more generally about what capabilities/behaviors are appropriate for a lite-node and is it inappropriate to be leeching from the network like this without providing the support of a full node.  I can see how peers that are connected to you have less "influence" since your lite-node is filling the slot of a "connected peer" but won't be broadcasting important information, such a new blocks and tx data.  However, we all know that in the far future, all average users will be using lite-nodes, since the blockchain will be too big to store on an average HDD computer... so this isn't unreasonable at all...

3490  Bitcoin / Development & Technical Discussion / Re: Some nLockTime and transaction hash calculation questions on: September 21, 2011, 04:34:25 PM
That's perfect, thanks!  I'm realizing that, while I don't have the C++ skills to understand much of the client architecture, I can decipher snippets like this (if I know where to find  them).

Quote
You aren't allowed to have a transaction that depends on a non-final transaction (see the IsFinal() check). So you can't use them in contracts.

Not all contracts are executed directly through the blockchain.  Some of them may involve handing another party a partially signed transaction, and letting them sign and broadcast it under whatever conditions are called for.  If the transaction hash can keep changing unpredictably, then it seems then this isn't feasible at all, regardless of whether the network would allow it (loosely speaking).

3491  Bitcoin / Development & Technical Discussion / Re: B-Etiquette on: September 21, 2011, 04:12:36 PM
You're right, I mixed two concepts here.  The client software is designed right now with a lot of flood-defense features, because it is known that the network is not hosting the volume of transactions you're talking about.  ATM, it is assumed that if there is that much traffic, it is someone trying to spam/flood the network, not legitimate users.  However, if volume legitimately increases, then surely the devs will loosen up a bit on those defenses...

I'm not entirely up to date on leading theories for dealing with massive transaction volume (i.e. if BTC were trying to replace all CC transactions), but much of it has to do with converting the standard user to lite nodes (not storing the entire blockchain, only scanning and keeping what is relevant), and only the miners/pools need to store the whole chain. 

Two ways that I'm familiar with are not particularly easy:  the blockchain could be converted into distributed storage, so that very few nodes will have to maintain the entire thing.  Alternatively, the way transactions are executed, allows for pruning of old transactions.  Individual nodes could do this without problem.  But if tx volume really gets big, even expensive nodes might not be able to handle it, and it might be necessary to reach some kind of global agreement to forget the distant past, and "lock in" the current state of the network at a given time.  This would be a major coordinated effort/problem, but if it is "solved" this could allow the network to reset the storage requirements every couple of years...

I'm sure there's other options and theories, but I haven't been following it too closely.  You might consider starting here, where you can see a well-known security researcher asking the same question.  I'm sure there's a lot of discussion on this in the forums.
3492  Bitcoin / Development & Technical Discussion / Re: DoS countermeasures may facilitate network fragmentation attacks on: September 21, 2011, 03:51:56 AM
Btw, you get a very similar vulnerability through timejacking (aka "forcing clock drift").  It's in the highest class of vulnerability according to the Bitcoin weaknesses page.  It does almost exactly what you propose, by forcing the node's clock to be more then 2 hours out of sync, it will reject a perfectly valid block while the rest of the network continues normally.  Since the rest of the network is building off that block, the victim node will not see any new blocks except for "poisoned blocks" sent by the attacker (who needs a bit of computing power to produce them, but nowhere near 50%).

I agree, nodes should "respect" block headers with the correct proof-of-work regardless of who sent them.  Although, this wouldn't benefit a victim of timejacking, I can't think of why it would be bad to accept them.

As for your last point, how does a node actually determine network speed?  Is it averaged over a certain number of previous block timestamps?  If it can measure this reliably and without too much latency, then this could be a very reliable indicator of something abnormal occurring.  In addition to targeted attacks like you suggest, if someone tried to DoS the main mining pools in an effort to boost their own computing power past 50%, there would be a similar drop in global computation speed and the client would go into some sort of safe-mode.
3493  Bitcoin / Development & Technical Discussion / Re: Bit-error in Block 108009, Tx 23 ? on: September 21, 2011, 03:11:39 AM
It would take a little bit longer, but it seems it could be checked very reliably through a simple header+merkle root scan.  The blk0001.dat file has the following form:

Code:
MagicBytes(4) |  NumBytesInBlock(4) | Header (80) | NumTx(var_int) | Tx1 | Tx2 | ... | TxN |
MagicBytes(4) |  NumBytesInBlock(4) | Header (80) | NumTx(var_int) | Tx1 | Tx2 | ... | TxN |
...

If there's a bit error in a header, it won't have the leading zeros.  If there's a bit error in a transaction, the merkle root won't match up.  We know the magic bytes in advance, and if the numBytes or numTx values are off, our parser will crash.  With an efficient algorithm for scanning the blockchain, the entire check could be done in less than a minute.
3494  Bitcoin / Development & Technical Discussion / Re: Bit-error in Block 108009, Tx 23 ? on: September 21, 2011, 02:50:12 AM
Someone who downloads the blockchain from scratch will get a blk0001.dat file that contains only blocks on the main chain.  However, after the initial download, if you leave your client running, you will invariably pick up the occasional invalid block which will get stored in the blk0001.dat file (because you don't know it's going to be invalid until it's already been added to your file).  This means that your calculated hash will only match between two people if they both just downloaded the blockchain.

3495  Bitcoin / Development & Technical Discussion / Re: B-Etiquette on: September 21, 2011, 02:44:00 AM
That's a topic of great debate these days.  You just described what credit card companies process perpetually, and there's no way the BTC network as it's currently implemented could handle such transaction volume.  But there's lots of options for dealing with it, and sufficient time to figure it out before it's necessary.

Until then, there's a plethora of protocol protections against this.  Most of it falls under the category of "flood defense."  Peers that transmit too much data get disconnected, transaction fees would make this very expensive, and the the tx prioritizaiton scheme does a good job of making sure legitimate transactions can get through first.
3496  Bitcoin / Development & Technical Discussion / Re: Bit-error in Block 108009, Tx 23 ? on: September 21, 2011, 02:39:38 AM

If this were a hardware error, even a 1-in-a-trillion one, I would expect his machine to be unstable, locking up constantly, his file system growing errors on its own and constantly needing to be fsck'd/repaired/etc.  Software errors can be responsible of errors that occur with literally any magnitude of frequency, from one in a zillion all the way to constantly.


Error correction technology is a slam dunk solution for these types of problems, but it has not yet been applied to all the systems that need it.

Luckily, in the context of bitcoin, this isn't so critical.  There's redundancy everywhere, since there are hashes for everything, and a million other nodes checking your solution before it's accepted.  The only real risk is getting your client dorked up, submitting what you think is a valid transaction and being confused when it's not accepted by the network.  I don't think millions of dollars will be lost in Bitcoins due to this, but certainly, a client that can't recover from a bit error in the blockchain file could cause all sorts of problems for a high-volume user/company that would lose money from downtime.

I have never appreciated the value of ECC RAM, because I've done computation on computers for 10 years without ever noticing an explicit error.  Although, I can see how certain applications need the guarantees against it.  Regular RAM errors are measured in errors/day, whereas ECC RAM errors are measured in errors/century.  
3497  Bitcoin / Development & Technical Discussion / Re: base58 offline transaction generator on: September 20, 2011, 09:16:21 PM
I think we're in agreement.  My own use cases don't require that level of paranoia, but someone with millions of dollars would probably prefer to spend the extra effort to avoid the remaining attack vectors. 

One thing you could do is keep the wallet on a laptop, and when you want to move the money, it will display a QR code on-screen containing the signed transaction (or print it).  Just hold it up to your online computer's camera and it will detect and broadcast automatically.  Perhaps it's more effort than it's worth, but it would probably be easier and less cumbersome for the rich guy that doesn't want to do a lot of work to maintain an offline wallet.

3498  Bitcoin / Development & Technical Discussion / Re: Bit-error in Block 108009, Tx 23 ? on: September 20, 2011, 09:11:22 PM
If you're this thorough about everything in life, I'm surprised you haven't encountered such an error before. Random one-bit errors do happen--I work with big data on consumer hardware and encounter this sort of thing about once a year or so. (That's why ECC memory and RAID exists.) With networks the situation is even worse, because there are some combinations of hardware routers and firmware versions that cause checksum fields to be overwritten rather than verified--and the chances of a transmission error over a network is much larger.

Well, when it comes to Bitcoin, hashing, cryptography, and millions of dollars, I don't have much of a choice but to be extremely thorough.  There is no "partial credit,"   and the cost of mishandling large transactions is not worth the time saved by taking shortcuts.  I want to get this stuff right from the start.

This problem is the kind of thing that happens so rarely, it may not be handled elegantly in the current client.  I'm actually more concerned with the fact that I've made an assumption about blk0001.dat that, if it doesn't hold, will botch my tx scanning code.  If it's an extreme boundary condition, then perhaps I can just work on detecting it and redownload/rescan the chain when it does.  It's annoying, but happens infrequently enough to not cause major problems.

3499  Bitcoin / Development & Technical Discussion / blk0001.dat errors on: September 20, 2011, 07:27:06 PM
So if the error occurred in a block with less than 2500 confirmations, the client would find it and correct it in-place?  What if the new block ends up being a different size than the original block on disk? 

Last week, I was trying to decide if I could make the assumption that I will always be able to read the blocks in the file order of blk0001.dat and know that all TxIns read will reference a TxOut that I've seen before.  If the block data is corrected by appending to the end of the file, this assumption fails.  But it also seems like it would be "difficult" to correct the block in place if it's a different size than the original, erroneous block data.

Until spending four hours looking for this bit-flip, I had actually ruled out any possibility of the blocks being out of order.  If I can't make this assumption, tx scanning gets more complicated, since TxIns don't always identify the redeeming address.  You have to look at its TxOut to know for sure.   If the correct TxOut is after the TxIn,  then you have no way to tell if it's yours.  Perhaps requiring two scans of the block chain to find all your transactions...

3500  Bitcoin / Development & Technical Discussion / Re: Some nLockTime and transaction hash calculation questions on: September 20, 2011, 05:23:00 PM
It looks like this question was never answered, and I still want to know how this works.  If a tx uses nLockTime, it allows the tx to be replaced with higher sequence numbers up until the locktime.  But won't these replacement transactions have different hashes than the original?  If so, how can the client/network know which transaction is being replaced other than trying to match up TxOuts being spent?  Presumably the TxOuts could change, which makes this even more unreliable.  And of course, some of the more complex contracts might actually have future transactions based on a previous transaction with a locktime, which would have a changing hash...

Pages: « 1 ... 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 [175] 176 177 178 179 180 181 182 183 184 185 186 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!