Why is OP_CHECKLOCKTIMEVERIFY disabled by maximum sequence number?

In the code for OP_CHECKLOCKTIMEVERIFY i noticed that if the txin sequence number is maxxed out then the script will fail to validate. I’m wondering what the point of this is? Why would anybody ever submit a transaction that will fail to verify to the network?

Here is the relevant section of code:

// Finally the nLockTime feature can be disabled and thus
// CHECKLOCKTIMEVERIFY bypassed if every txin has been
// finalized by setting nSequence to maxint. The
// transaction would be allowed into the blockchain, making
// the opcode ineffective.
//
// Testing if this vin is not final is sufficient to
// prevent this condition. Alternatively we could test all
// inputs, but testing just this input minimizes the data
// required to prove correct CHECKLOCKTIMEVERIFY execution.
if (txTo->vin[nIn].IsFinal())
    return false;

I’m also confused about the comments in the code for this. They say that every sequence number has to be maxxed out to get the script to fail to validate, but it looks to me like this is not true – it looks like only one sequence number needs to be maxxed out and then the whole transaction (all txins) will fail. And I assume this would mean that the transaction will therefore not be included in the blockchain? But that runs counter to the code comments. It would make sense if there were a ! on the if condition.

CHECKMULTISIG a worked out example

I was wondering if somebody could point me to or give me a worked out example of how OP_CHECKMULTISIG works behind the curtains?

I expect that CHECKMULTISIG will call the CHECKSIG function and manipulate the stack to run CHECKSIG in a loop until it terminates and either has its M-out-of-N valid sigs or not?

But how exactly does it work? E.g. for 2-of-3 multisig. If we have OP_0 (sig1) (sig2) in the scriptSig, then the stack will look like:

  • (sig2)
  • (sig1)
  • 0

Now from the general way of writing CHECKMULTISIG in the scriptPubKey: 2 (pubKey1) (pubKey2) (pubKey3) 3 OP_CHECKMULTISIG, when pushing all the data onto the stack, the stack for the scriptPubKey will look like:

  • 3
  • (pubKey3)
  • (pubKey2)
  • (pubKey1)
  • 2

What exactly will the first step be of CHECKMULTISIG?

Will it pop the “3” from the stack and then maybe check if there are three pubKeys on the stack?

Or will it just pop the “3” and then immediately run CHECKSIG on (sig2) and (pubKey3), which will not be valid, hence CHECKSIG will push a “0” on the stack?

Will then CHECKMULTISIG remove the “0” that CHECKSIG introduced on the stack and try again with (sig2) and (pubKey2)? Since this is valid CHECKSIG will push a “1” on the stack, but where does CHECKMULTISIG store this “1”?

And will CHECKMULTISIG at the end count how many “1”‘s CHECKSIG made and this number must correspond to the last value on the stack, in this case “2”, but in general “M”?

I would really like to find a low-level description of CHECKMULTISIG, similarly to the one I could find for CHECKSIG:
https://en.bitcoin.it/wiki/OP_CHECKSIG

Any help would be very appreciated!

How to restore Multibit HD keys using cloud .zip.aes files

weird thing happened to me. I kept backup in cloud under Dropbox/bitcoinz. I can see many mbhd-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.zip.aes files, I also have wallet words but when I try to restore old wallet after fresh install on new pc, I enter the words and select coud backup filder, it says that no backup files were found.

But they are there, present.

So I clicked on ok, window disappeared and new wallet opened. I entered my password (the one I used with old backuped wallet), it got accepted and bitcoin started to sync.

But when it finished, it showed 0 BTC. And moreover, I found nowhere again the option, to restore from cloud backup .zip.aes files.

What happened here? How to restore bitcoins using wallet words and online backup?

Thanks

Blockchain.info receive payments API, bitcoins lost?

I use the Blockchain.info receive payments API. It’s all working nice and good, but now I have a payment that doesn’t reach my adress. It is unconfirmed for almost 24 hours.

Also, the payment doesn’t show in Bitcoin-QT (also not as unconfirmed)

You can see here: https://blockchain.info/address/1J2SpT8wBUsVhP6MBtc5sqJkUMgdfHPSZ4

Normally Blockchain.info pays the miner fee, so I should receive them very quickly.

Are my bitcoins lost in the abyss?

Run bitcoin-qt at startup of Windows server

I am running bitcoin-qt on my server. I use .Net library to query it through windows services.
It all works when I start bitcoin-qt manually.
But if the server is restarted, I see that it is running in task manager (bitcoin-qt.exe), but it is not available for services.
I also tried to run it as administrator using the scheduler, but this did not help.

Bread wallet iOS app

I am new to bit coin and the bread wallet app, so please excuse me if this is a really obvious question.

I have read a lot of information saying that it is vital to use a new address every time I receive a payment. (https://en.bitcoin.it/wiki/Address_reuse)
The bread app presents me with a qr code with my address below it to receive money, but no apparent way to create a new address.

Am I missing something really obvious, or is it ok to use this same qr/address over and over?