Hello again John!
Firstbits.com had always differentiated by order of appearance in the raw block data, and given the first appearance the shorter firstbits. I'm not sure who stated otherwise, but for firstbits.com, that's always been the case.
Perhaps I read it here:
I am not sure what standard blockchain.info follows on that front, but I assumed it followed the same. We should find out. Regardless, giving enough firstbits to distinguish both addresses in the same block is certainly cleaner.
Cleaner, I suppose, although I, too, originally based it on order within the block. If it is possible (is it?) for an earlier tx to spend the output of a later tx in the same block, we would have to be careful about whether the earlier one's input script triggers "appearance" of the address in case a competing address appears in a third transaction between those two. The rule about "all addresses appearing in the same block" avoids that issue, while unfortunately making some address prefixes ineligible ever to become firstbits.
I didn't want to change it for fear it could screw up someone relying on the original implementation. The likelihood of someone using one of those addresses is slim, but the possibility still exists. Now would be a good time to change it, if we are also nailing down other portions of the specification.
Thanks for the willingness to clean up. I think in this case, the change would never result in a firstbits becoming the firstbits of another address. Rather, some (rare) firstbits would become non-firstbits, ineligible due to appearing first in two or more addresses within a block.
Yes, let's indeed finish the standard. I suppose I dropped out of that original discussion because I am not familiar enough with the different OP functions of Bitcoin and what they mean/do. Is there some reading I can do somewhere that explains more about these?
The wiki describes the original two standard transactions:
https://en.bitcoin.it/wiki/Script#Scripts. P2SH is in BIP 16:
https://en.bitcoin.it/wiki/BIP_0016. The authoritative reference is the
IsStandard and
Solver functions in src/script.cpp.
I suppose I would say that as long as a transaction is valid and included in the blockchain, there is no reason it shouldn't also be included in firstbits. Will the average person know what a transaction with OP_NOP means, or how to know if a transaction has it or not?
For example, transaction 5492a05f1edfbd29c525a3dbf45f654d0fc45a805ccd620d0a4dff47de63f90b has an OP_NOP appended to one of the addresses. Blockexplorer decodes the address correctly, but blockchain.info doesn't seem to have a handle on it:
http://blockexplorer.com/tx/5492a05f1edfbd29c525a3dbf45f654d0fc45a805ccd620d0a4dff47de63f90bhttps://blockchain.info/tx/5492a05f1edfbd29c525a3dbf45f654d0fc45a805ccd620d0a4dff47de63f90bSo you are arguing that these OP_NOP transactions should be discluded, despite the fact that they are included in the blockchain?
I am not disagreeing with you, I just want to understand more about what the disclusions are and how easy it will be for the average person to understand why a particular address doesn't have firstbits.
Yes. In fact, here is a case where Abe does the other thing, and the standard that I propose will require a change.
I assume that the reference client does not generate these OP_NOP transactions, nor does any client designed with interoperability in mind. The last time I checked, there were only a handful of them. I can only speculate why someone went to the trouble of making them. I remember first seeing them in Abe, checking BlockExplorer, and adding a tiny change to make Abe handle them compatibly. The problem is, if we allow OP_NOP at the end, where do we draw the line? Do we allow multiple OP_NOPs or other operations? I guess we could just as easily define the script types by how scripts
start, and if firstbits.com has always done this, that might convince me. I consider a full, exact match cleaner. In practice, I think anything after the standard portion gets ignored, unless it would make the script or block too big. I haven't checked whether IsStandard allows trailing junk, but I have the impression that developers mostly frown on it.
Thanks for your comments.