Strange BTC rate behavior when buying bitcoins

I have decided to buy some bitcoins using the Bitcoin.com wallet app and I have just received the invoice for my transaction of 1000 EUR to BTC.

The rate of the BTC for the last days is always around 5850 EUR. But in my receipe I see that they have used a rate of 6032 EUR.

I do not understand that gap… Would it be a magic trick in order to get more money on customers ?

Thank you for your help.

Generate P2SH-P2WSH

I want to generate P2SH-P2WSH with script P2PKH.

My public key is    027712968e8f2f9dfa79abe10940a3d915a0c95a0b97750881e6201acf2b66da97

SHA256 and RIPEMD160 of Public key

 ---------- Witness Script --------- 
#OP_DUP OP_HASH160 <PubKHash> OP_EQUALVERIFY OP_CHECKSIG
76a914651554088a30217e6d0261cce1634e9d90b03f7088AC

 ---------- scripthash --------- 
#SHA 256 of Witness script    
1eb6c6c3ad4e395e66e3521c23486863fe363939db88c38a3c6461cb66f80254

  ---------- Redeeem script ---------     
#add OP_0 (0x0020{32-byte scripthash})
00201eb6c6c3ad4e395e66e3521c23486863fe363939db88c38a3c6461cb66f80254

  ---------- SCRIPTPUBKEY --------- 
#RIPEMD160(redeem script)
#OP_HASH160 hash160(redeemScript) OP_EQUAL
A9149fbb6d60a6d26f67b9673334c3863cdec224169787

ADDRESS:
#C4A9149fbb6d60a6d26f67b9673334c3863cdec224169787 base58 cecksum
2N7ooxTaU8FRgfTrhYn3FjwUcFqeNRvRU5k

Now I want to try to spend form this address.

bitcoin-cli signrawtransactionwithkey $TX_DATA '["'$PK'"]' '[{"txid":"'$TXID'","vout":'$VOUT',"redeemScript":"'$REDEEMSCRIPT'","scriptPubKey":"'$SCRIPTPUBKEY'","witnessScript":"'$WITNESSCRIPT'","amount":"'$TOTAL_UTXO_AMOUNT'"}]'

I receive this error

redeemScript does not correspond to witnessScript

Will bitcoind import private keys for multi-sig descriptor with watch-only flag set to true?

I am importing a “warm” multi-sig quorum into bitcoind using importmulti like so:

{"jsonrpc":"1.0","id":"curltest","method":"importmulti","params":[[{ "desc": "sh(multi(2,[eb2d2f9e/44'/1'/0']tprv8g5heqz5AnCKdYQHsHyYvyDvWFdp5RN8Z5uhvb1FrzgPmeuYseQNsknt1KFf1b1Y9dtNaNMbxkaNdkP7FLbhP9a4UosbV5rWLAMFPhUcMVT/0/*,[e19b3701/44'/1'/0']tpubDCkUBfVNYjzdX37ARqSFWNAA5WvQRGy3Y5PA13ve1dSVtBLr7tEf6c7C2sYtnRazFfsfAdCfuv9JG62BnUVvofvvvs9iyDreQhTRJJ6Mp8u/0/*,[65b2e5d3/44'/1'/0']tpubDCFM6STEuVkkh6qCCooJw4TXHRzyq6R6tBeigSQSgf4xY6ZwAeoSQH2ZTTfcsZTrJ7wJF2bixpn38XcKj3KihxH5LzMraCLwsbt3bnkAHrU/0/*))#2pztwc0s", "timestamp": "now", "range": [2500,5000], "watchonly": false, "label": "StandUp", "keypool": false, "internal": false }], {"rescan": false}]}

And occasionally getting the following response (sometimes it works without returning an error and sometimes not):

response = {
    error = "<null>";
    id = curltest;
    result =     (
                {
            error =             {
                code = "-4";
                message = "Error adding key to wallet";
            };
            success = 0;
            warnings =             (
                "Some private keys are missing, outputs will be considered watchonly. If this is intentional, specify the watchonly flag."
            );
        }
    );
}

I do not want to specify the watch-only flag to true as I am importing private keys into the node and want the node to be able to sign. It is very odd that this seems to happen randomly. It feels like a bug.

If I set watch-only to true will it still import the descriptors private keys?

Just to prove my point here is the exact same command attempted a second time which returns success as true:

{"jsonrpc":"1.0","id":"curltest","method":"importmulti","params":[[{ "desc": "sh(multi(2,[eb2d2f9e/44'/1'/0']tprv8g5heqz5AnCKdYQHsHyYvyDvWFdp5RN8Z5uhvb1FrzgPmeuYseQNsknt1KFf1b1Y9dtNaNMbxkaNdkP7FLbhP9a4UosbV5rWLAMFPhUcMVT/0/*,[e19b3701/44'/1'/0']tpubDCkUBfVNYjzdX37ARqSFWNAA5WvQRGy3Y5PA13ve1dSVtBLr7tEf6c7C2sYtnRazFfsfAdCfuv9JG62BnUVvofvvvs9iyDreQhTRJJ6Mp8u/0/*,[65b2e5d3/44'/1'/0']tpubDCFM6STEuVkkh6qCCooJw4TXHRzyq6R6tBeigSQSgf4xY6ZwAeoSQH2ZTTfcsZTrJ7wJF2bixpn38XcKj3KihxH5LzMraCLwsbt3bnkAHrU/0/*))#2pztwc0s", "timestamp": "now", "range": [2500,5000], "watchonly": false, "label": "StandUp", "keypool": false, "internal": false }], {"rescan": false}]}
response = {
    error = "<null>";
    id = curltest;
    result =     (
                {
            success = 1;
            warnings =             (
                "Some private keys are missing, outputs will be considered watchonly. If this is intentional, specify the watchonly flag."
            );
        }
    );
}

How to find Reused R values

I use software from https://github.com/ca333/rng-scanner , I try to find r that is reused. from the software I found results

Bitcoin Address : 1GQdrgqAbkeEPUef1UpiTc4X1mUHMcyuGW
In Input NR : 141 ~ 220020a271a0897f1b7a7f0db9acb517ae2b6d53dda3833808d02c6a1cc21dc1a68680
Resued R-Value : a0897f1b7a7f0db9acb517ae2b6d53dda3833808d02c6a1cc21dc1a68680

How do I find the s and z of the reused r value?

Fail to sign the Segwit Transaction’s input in bitcoinj

I want to spend from a segwit address and it has a P2WPH script, I created this transaction just like creating a normal P2PKH transaction, but just changed the address of the input to the segwit address, I don’t know if this is correct, and signing this transaction in the following method, but it says script was NOT verified successfully…

Transaction signedtx = signInput(rawtx.getHashAsString(),privkey,rawtx);

    public static Transaction signInput(String hash, String prvKey,Transaction spendTx) {
        ECKey ecKey = ECKey.fromPrivate(Utils.HEX.decode(prvKey));
        ECKey.ECDSASignature signature = ecKey.sign(Sha256Hash.wrap(hash));
        TransactionSignature transactionSignature = new TransactionSignature(signature,Transaction.SigHash.ALL,true);
        TransactionWitness witness = TransactionWitness.redeemP2WPKH(transactionSignature,ecKey);
        TransactionInput input = spendTx.getInput(0);
        input.setWitness(witness);
        return spendTx;
    }

I am not very familiar with bitcoinj, and currently there is very little technical guidance related to segwit, I hope someone can help me!