Why Bitcoin core creates time locked transactions by default?

I’ve noticed recently that Bitcoin Core is producing transactions with non-zero lock-time and sequence numbers of inputs being 0xFFFFFFFE, even though I didn’t instruct it to do so. The lock-time appears to be current block number.

  • What is the reason for this behavior?
  • What is the algorithm for setting sequence number?

(I know that at least one input must have sequence number less than 0xFFFFFFFF. Does the Core set just first input or all inputs? I couldn’t check this because I have no transaction with more than one input.)

Thank you for your answers!

Recent Questions – Bitcoin Stack Exchange

VISA to Test Blockchain Payments among Banks; a SWIFT Rival?

VISA and blockchain-technology partner BTL will invite a select group of European banks to participate in a blockchain project that will see inter-bank payments made via transfers over the ledger. Hot on the heels of the likes of R3, Visa will experiment its own blockchain-based payments platform with a select group of banks who will […]

The post VISA to Test Blockchain Payments among Banks; a SWIFT Rival? appeared first on CCN: Financial Bitcoin & Cryptocurrency News.

News – CCN: Financial Bitcoin & Cryptocurrency News

How to run –zapwalletxes command?

I am having problems running the --zapwalletxes command from the cmd prompt. I type C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe --zapwalletxes=1. After entering this the CMD prompt states that C:\Program Files is not recognized as an internal or external command, operable program or batch file. If anyone could help troubleshoot that would be great. Thanks.

Recent Questions – Bitcoin Stack Exchange

Can difficulty target by exploited by miner with proprietary computer?

Assume a hypothetical situation where a researcher was able to develop a computer capable of 2,000 PH/s (the current network hashrate). During his first 2 weeks of mining, he would strike it rich as he would win 50% of block generations with 5 minutes per block.

After 2 weeks, the difficulty target would readjust, and this miner would no longer have an advantage.

However, for this next 2 week period, the miner sits out, waits 2 more weeks, and allows the network to re-adjust back to a higher target, at which point he re-enters and sweeps the rewards once more.

He repeats this cycle in perpetuity.

A solo miner with 2,000 PH/s seems infeasible, but what if a powerful mining pool were to pull this stunt — withdraw from mining for 2 weeks, allow for the difficulty target to re-adjust, and re-enter with a much easier difficulty?

Recent Questions – Bitcoin Stack Exchange

P2SH address decoding

What is the process of decoding the P2SH address?
We have this information so far.

Let’s run through an example tx bea1e7ae7ecdc502215717f30d62a12085bb2866d8db730dfb626b60c337534c

The hex script (for the first output) is: 514104398184a2cef0d7b73ed7a3a1d4ad16296c3c6986bed0bd72775060aae9891979eaea1efb28d7eb1da3304ec38a98b42086e3be2ceba82b0e932128ec422a6fc2210250504b2d4245544120506565722d506565722d6e6574776f726b2062657461212102553432353135362e31323234202020202020202020202020202020202020202053ae

script decode gives:

{     "asm" : "1 04398184a2cef0d7b73ed7a3a1d4ad16296c3c6986bed0bd72775060aae9891979eaea1efb28d7eb1da3304ec38a98b42086e3be2ceba82b0e932128ec422a6fc2 0250504b2d4245544120506565722d506565722d6e6574776f726b206265746121 02553432353135362e313232342020202020202020202020202020202020202020 3 OP_CHECKMULTISIG",     "reqSigs" : 1,     "type" : "multisig",     "addresses" : [         "1TestLVFK8DsRYFQkDDwvfsPHqUqWPBe7",         "1H16KgZg3wHgApvHvZkSocxN6ibzNT9Cc7",         "1N31mRc4tiGumXdRmb1Bzk9BoG4Bc7Ctbi"     ],     "p2sh" : "3KQYMMqMBTv8254UqwmaLzW5NDT879KzK8" } 

Can we break this script down?

Recent Questions – Bitcoin Stack Exchange

Transaction validity clause: output must exist

I’m reading through the Mastering Bitcoin book and the section talking about what nodes check for to ensure a transaction is valid before accepting it refers to this:

Each node verifies every transaction against a long checklist of criteria:

For each input, the referenced output must exist and cannot already be spent.

However, I’m not sure exactly what it means for “an output to exist”. How can an output exist if I am creating it now with this transaction?

Recent Questions – Bitcoin Stack Exchange