SQL Server – Truncate database transaction log files

I'm running SQL Server Developer (64-bit)
Version: 14.0.2027.2

I have set up maintenance plans to do:

  1. A full weekly backup
  2. Daily incremental backups.
  3. Backups of log files every hour.

The recovery model is set to Full.

I understand that the transaction log will be truncated automatically after the transaction log backup is performed. source
I just want to make sure that's what's going on.

Multi Signature – How to Sign a Raw Multisig Transaction from an External Private Key

I create a multisig wallet 2 of 3, where the 2 shortcut keys are external HSM devices.
I use Bcoin to create my transactions.
Once the transactions are created, I will send the raw transaction to an external application to make the signature.

My question is, which part must be signed exactly by the private key?

For example, here is my transaction:

{
    "hash": "e82c7bdfc864ab4d0592045dd86b81a438eeee77f8415c0a84e1aa0ea8e17786",
    "witnessHash": "e82c7bdfc864ab4d0592045dd86b81a438eeee77f8415c0a84e1aa0ea8e17786",
    "fee": 1000000,
    "rate": 4424778,
    "mtime": 1568880046,
    "version": 1,
    "inputs": [
        {
            "prevout": {
                "hash": "3b1dd17cc82e2ac43ba62bf8f1c6a0fe805df43911653d22c902571eb3a212ce",
                "index": 0
            },
            "script": "000000004c6952210209ad6cf408e41362fa175d5869e4561f1890c0d8d74353c86095fdecde34459721024a92aa3f883cc4438b75205555e517a4f7cc10ffd42517297a17821ae6f0bb8821037d2a259a52f62fee96fea072844139224fbd9027116ac7582025dd446fc73e3e53ae",
            "witness": "00",
            "sequence": 4294967295,
            "coin": {
                "version": 1,
                "height": -1,
                "value": 10000000000,
                "script": "a9144de6d3580732a7c7c2b1eb043cb1b89350c265fa87",
                "address": "38nvUMbXFdXDp4PTWvbohCbnPJuLUVwzXr",
                "coinbase": false
            }
        }
    ],
    "outputs": [
        {
            "value": 5000000000,
            "script": "a91481be67198d33319415d09b03f2dc2cfa4cdb42aa87",
            "address": "3DX3BhmdRGf5vYbtzHKzazGmZ7WgUkhFRk"
        },
        {
            "value": 4999000000,
            "script": "a9144de6d3580732a7c7c2b1eb043cb1b89350c265fa87",
            "address": "38nvUMbXFdXDp4PTWvbohCbnPJuLUVwzXr"
        }
    ],
    "locktime": 0,
    "hex": "0100000001ce12a2b31e5702c9223d651139f45d80fea0c6f1f82ba63bc42a2ec87cd11d3b000000006f000000004c6952210209ad6cf408e41362fa175d5869e4561f1890c0d8d74353c86095fdecde34459721024a92aa3f883cc4438b75205555e517a4f7cc10ffd42517297a17821ae6f0bb8821037d2a259a52f62fee96fea072844139224fbd9027116ac7582025dd446fc73e3e53aeffffffff0200f2052a0100000017a91481be67198d33319415d09b03f2dc2cfa4cdb42aa87c0aff6290100000017a9144de6d3580732a7c7c2b1eb043cb1b89350c265fa8700000000"
}

If you decode the script in the inputs c & # 39; is:

OP_0 OP_0 OP_0 OP_0 52210209ad6cf408e41362fa175d5869e4561f1890c0d8d74353c86095fdecde34459721024a92aa3f883cc4438b75205555e517a4f7cc10ffd42517297a17821ae6f0bb8821037d2a259a52f62fee96fea072844139224fbd9027116ac7582025dd446fc73e3e53ae

As you can see, there are 4 OP_0 placeholders to grab the signatures.
Now my question is which part of the transaction the external signature application should sign. Is it right 000000004c6952210209ad6cf408e41362fa175d5869e4561f1890c0d8d74353c86095fdecde34459721024a92aa3f883cc4438b75205555e517a4f7cc10ffd42517297a17821ae6f0bb8821037d2a259a52f62fee96fea072844139224fbd9027116ac7582025dd446fc73e3e53ae
part?

Any reference is very appreciated.
I've read https://en.bitcoin.it/wiki/Transaction and https://en.bitcoin.it/wiki/OP_CHECKSIG but I can not understand for sure.
Thank you.

Is there a way to allow the use of unconfirmed RBF outputs in transaction building?

Bitcoin Core does not seem to consider unconfirmed outputs marked as replaceable in the input selection. Is there a way around this protection and allow it to be used anyway? The transaction is created with the help of bitcoin-cli.

Signature – Signature of a gross transaction with multiple entries

So I create a simple P2PKH transaction and after doing some research on it, I found some useful messages and answers here; I was able to successfully pass a single P2PKH UTXO but it gets really complicated when I try to pass a transaction with multiple entries. I spent a day entirely on it.

All transactions are on Bitcoin Testnet.

Outings that I buy:

  1. Tx Hash: 9742ed783bfec215ec6484d82dae20fba582229e54c49e06d662a91ead3f6a54
    Hint: 0
    scriptPubKey: OP_DUP OP_HASH160 81f52d4061313b6f63549efc03f3df6cb6f0149e OP_EQUALVERIFY OP_CHECKSIG

  2. Tx Hash: 40dbd3c25073cb7222becead1eb9bb2195cf309cf5b24af559f3391168ec6318
    Hint: 0
    scriptPubKey: OP_DUP OP_HASH160 81f52d4061313b6f63549efc03f3df6cb6f0149e OP_EQUALVERIFY OP_CHECKSIG

Now, I read an answer here that suggests that if you use multiple entries, you must replace scriptSig for the rest of the entries (those that are not signed) to be dumped; And I've tried these variations so far:

1. Replacement of scriptSig for entries by "00"

Thus, only the entry (UTXO) being signed will have its scriptPubKey, and the other entries should have "00" in place.

Serialized # 1 entry when signed:
01000000
02
546a3fad1ea962d6069ec4549e2282a5fb20ae2dd88464ec15c2fe3b78ed4297
00000000
19
76a91481F52D4061313B6F63549EFC03F3DF6CB6F0149E88ac
ffffffff
1863ec681139f359f54ab2f59c30cf9521bbb91eadcebe2272cb7350c2d3db40
00000000
00
ffffffff
01
c0fb390000000000
19
76a914DD02C23FF4C3FFC6DA1C74B7EA5BCB0891B0E98288ac
00000000
01000000

and…

Serialized entry # 2 when signed:
01000000
02
546a3fad1ea962d6069ec4549e2282a5fb20ae2dd88464ec15c2fe3b78ed4297
00000000
00
ffffffff
1863ec681139f359f54ab2f59c30cf9521bbb91eadcebe2272cb7350c2d3db40
00000000
19
76a914A17C43FE0E1F8E660B044C9538E2CEF4ABFDCED288ac
ffffffff
01
c0fb390000000000
19
76a914DD02C23FF4C3FFC6DA1C74B7EA5BCB0891B0E98288ac
00000000
01000000

main transaction with the two signed entries: (the signatures without the hash code type suffix 01 and the public keys are in bold)

01000000
02
546a3fad1ea962d6069ec4549e2282a5fb20ae2dd88464ec15c2fe3b78ed4297
00000000
6a
4730440220E4A366646391B3CFB06C0C4B0343E678B560BE8A2D20418233DEE863986105E502207245C5BA3DB516E59B95764C1716F5B39850E20429F08B91389C4780CE0121025F69830D2BA35D04CA9EFB3EA46AA2645BBBDCB592A189A539480657C9696137
ffffffff
1863ec681139f359f54ab2f59c30cf9521bbb91eadcebe2272cb7350c2d3db40
00000000
6a
4730440220C41C498D0CA55E38FE85DD158FDE82BB451068124E2B3AA2391D861BA9281EDD0220165712ADF71B19DF525583D8F48B82DFF06B2E556C17A583F4D5C54E99412C0121039F9AF4A84A8D5C35DD7A5628F8C2DC1894C2B4BDD4815DAFFDCBC9102FE2BA26
ffffffff
01
c0fb390000000000
19
76a914DD02C23FF4C3FFC6DA1C74B7EA5BCB0891B0E98288ac
00000000

now decoding the raw transactions works but trying to spread them, bitcoind gives these errors:

Failed Script verification script required (signature must be null for failure
CHECK (MULTI) SIG operation) (code 16)

or

non-mandatory script verification flag (non-canonical DER signature) (code
64)

I have tried different variants:

  1. Replace scriptPubKey with entries that are not signed with only "00"
  2. Replace scriptPubKey with entries that are not signed with just ""
  3. Delete the sequence number of the "ffffff" entries

but nothing seems to work. What am I doing wrong? Your help will be appreciated 🙂

Security – Is it possible to spoof a recipient in an SMTP transaction? If not, how does SMTP prevent this?

This is even possible without an unauthorized SMTP server. Alice does not have access to SMTP communication, so she can not know to which email addresses you have sent.

The only thing that Alice has access to is the email headers.

The SMTP envelope is the only thing that interests the SMTP server.

Nowhere is it written that the two must match.

You can simply do this:

HELO mx01.treyresearch.net
MAIL FROM: 
RCPT TO: 
RCPT TO: 
DATA
From: Charlie 
To: Alice , Bob 
Subject: Information for Bob
Date: Fr, 06 Dec 2019 15:53:56 +0100
Message-ID: 

Hello Alice, 

this is the information you wanted me to share with Bob.

Greetings, 
    Charlie
.

As you can see, we put Bob in the To: message header, but we simply did not ask the server to send the message. Conversely, we asked the server to send the message to a secret listener, but it does not appear anywhere in the message.

Transaction fees – Calculation of the cost of sending bitcoin?

This is a follow-up post to this question.

I use Electrum to send Bitcoin. From what I can understand, it does not seem that there is a way to know your "contributions" at the outset. The entries are the different addresses from which the different pieces of bitcoin come from … I think? So, if I understand correctly, the inputs will depend on the source.

I'm trying to find the best way to calculate the fees that I can bill the customer for the transaction. So my questions are:

  1. Is there a way to assume an entry for my calculations? Or do you find another way to get a more accurate calculation of fees?
  2. I can not have a fixed fee, for example, 0.0005, because it will probably work well for small quantities, but if someone sends a high amount, the fees could easily be greater than that. Is there a way to know what would be the worst cost for sending 0.01 BTC versus 20,000 BTC?
  3. Is there a maximum formula or "worst case" that I could use to determine the highest cost amount for a specific scenario?

Why is the same exit address not valid in a Bitcoin Core transaction?

This is not invalid.

The code you are looking for is not related to the validation and relaying of real transactions. You are viewing the code for RPCs, which are just items for users. The RPC prohibits sending multiple times to an address as this is not effective and is usually an error on the part of the user.

But this only concerns the creation of a raw transaction using the Bitcoin Core RPC. A transaction received on the network or in a block with duplicate addresses in the outputs would not be rejected or invalidated in any way.

How to check a BlockChiain transaction using python?

Find all the details of the link:

https://www.blockchain.com/btc/tx/94ec7186e39fd9a2fda11d67fde158ba956dea421b23bb3cdefb2cc008ad1440

enter the description of the image here

Entering a transaction – Bitcoin Stack Exchange

Probably not.

Bitcoin transactions work by consuming transaction outputs and creating new transaction outputs. Your wallet will look at the outflows it has to spend (ie the coins you have received) and choose enough cash out to cover the amount you want to send, plus transaction fees. If you have already sent Bitcoin, all the exits you have received will not be eligible because some of them have already been spent. Your portfolio will also choose a sufficient number of exits, not all, unless all are necessary.

As a general rule, your transaction does not contain a list of all your previous transactions. The only case where this could happen would be that your wallet decides that it needs all the available transaction outflows to cover the amount you are sending. And even then, if you have already sent Bitcoin, some will not be in the list of entries because they would already be spent.

Verify Bitcoin Transaction – Bitcoin Battery Exchange

As a result of the correct message (step-by-step detailed example for exchanging a raw transaction, I proposed the code below, but the verification failed.

// pubkeyBytes, len: 65
// 042daa93315eebbe2cb9b5c3505df4c6fb6caca8b756786098567550d4820c09db988fe9997d049d687292f815ccd6e7fb5c1b1a91137999818d17c73d0f80aef9

// data, len: 32
// 30f10a6468b7d98257af63fb40dfcf2cefe991346fd37c67cf7b51ff8d4404d3

// signatureBytes, len: 71
// 30450220587ce0cf0252e2db3a7c3c91b355aa8f3385e128227cd8727c5f7777877ad772022100edc508b7c14891ed15ab38c687019d7ebaf5c12908cf21a83e8ae57e8c47e95c

    ECPublicKey publicKey = (ECPublicKey)KeyBuilder.buildKey(KeyBuilder.TYPE_EC_FP_PUBLIC, KeyBuilder.LENGTH_EC_FP_256, false);;
    Secp256k1.setCommonCurveParameters(publicKey);
    publicKey.setW(pubkeyBytes, (short) 0, (short) pubkeyBytes.length);

    Signature eccSign = Signature.getInstance(Signature.ALG_ECDSA_SHA_256, false);
    eccSign.init(publicKey, Signature.MODE_VERIFY);
    boolean verified = eccSign.verify(data, (short)0, (short) data.length,
                signatureBytes, (short)0, (short)signatureBytes.length
            );
    Assert.assertTrue(verified);

The assertion failed in the end.

Have been stuck for hours. I can not understand it. Any help is greatly appreciated. Thank you.