arubi
  • Member for 4 years, 2 months
  • Last seen more than 2 years ago
Key derivation in HD wallets using the extended private key vs hardened derivation
29 votes

There's a lot of confusion here, mostly bits and pieces of the whole scheme that is Hierarchical Deterministic derivation, and finally two questions that seem to indicate missing some point about it. ...

View answer
Merkle Root and Merkle Proofs
10 votes

Say a block consisting of these 10 transactions, noted by their txids at indexes 0 to 9: E1AF205960AE338A37174B407EE71067C3CD7F04D48A5CEC7E13F6ECCB61DCBC ...

View answer
Do UTXO's ever get consolidated to avoid complexitity?
8 votes

When you pay someone using a number of utxo's to fund your payment, the output being created is a new single utxo with the total amount of all those input (minus change and fees). Effectively, you ...

View answer
Operation not valid with the current stack size
Accepted answer
6 votes

Your transaction only has 0x51 (just OP_1) in its scriptsig, the OP_IF consumes the 1, and OP_SHA256 then operates on an empty stack, causing this error.

View answer
Spendable Wallet
5 votes

Yes, it's a scam, and a well known one. You will lose all money that you deposit to that wallet, even if only you have the password and 2FA for the wallet. Your "friend" already copied the recovery ...

View answer
How are compressed PubKeys generated?
Accepted answer
5 votes

There is no algorithm for generating compressed pubkeys from private keys keys specifically. In fact, all internal calculations involving points are done using the both the x and y coordinates of the ...

View answer
generate a P2SH-P2WSH address and spend output sent to it
Accepted answer
5 votes

bitcoin-cli's signrawtransaction expects a few arguments. You got most of them right, but forgot to add the details for redeeming the actual p2wsh part. Specifically for p2sh(p2wsh), you'd need to ...

View answer
P2SH secure spending. How?
Accepted answer
4 votes

You're correct that anybody could just replace the outputs and take the funds for themselves. This script has no authorization needed on the spender's part, so once the redeemscript is known, it's ...

View answer
Security implications of removing CHECKSIG in a test
Accepted answer
3 votes

The security implication of removing a checksig operation from the encumbrance script is that the coins can be stolen while in flight by anybody, and especially by miners. Obviously, on testnet, only ...

View answer
Passing a wallet to rpcwallet in bitcoind JSON RPC
Accepted answer
3 votes

To query a specific wallet, set the URL to be http://127.0.0.1:8332/wallet/<wallet_name>

View answer
Step by step example to redeem a P2SH output required
Accepted answer
3 votes

The issue is, scriptsig contains the actual redeemScript instead of the serialized script as a push. The second error, the redeemscript contains an extraneous 0x00 value that should not be there as ...

View answer
how to spend an utxo when the corresponding scriptsig is longer than 256 bytes?
Accepted answer
3 votes

The size is encoded as Compact size. These can be up to 9 bytes long and encode a size of anything between zero to 18446744073709551615 bytes. The rules are (according to serialize.h) : /** * ...

View answer
can one verify with certainity that pool is not cheating?
Accepted answer
2 votes

I believe that in the simplest, "spherical cow" setup that you could indeed know if you're being defrauded. In my answer, I'm assuming no variance, no blockchain reorgs, really I'm not considering any ...

View answer
How is subscript computed for OP_CHECKMULTISIG?
Accepted answer
2 votes

The main confusion here comes from this : First, generate the script by concatenating [sigScript][OP_CODESEPARATOR][pubkeyScript] Then you add : I understand that script execution has evolved ...

View answer
Detect received transactions of thousands of Bitcoin addresses
Accepted answer
2 votes

This doesn't sound correct to me. You're relying on a centralized service to fetch blocks. What if their system has an error and sends you incorrect data? What if their service is unreachable? It ...

View answer
Representation of coordinates in signature. OpenSSL
Accepted answer
2 votes

The value r is just a number and doesn't explicitly store or encode any point coordinates. In a signature, r is set to the X coordinate of the point R, which is really k*G, where k is the secret ...

View answer
error code: -26 error message: 16: mandatory-script-verify-flag-failed (Signature is found in scriptCode)
2 votes

Even though this question is a bit old by now, it might be useful to add a couple of things for future readers who might encounter the same Signature is found in scriptCode error. First, the error ...

View answer
How to import p2wsh-in-p2sh multisig as watch-only?
2 votes

The issue here is that you've provided the p2wsh redeemscript as the script for the p2sh level of the nesting. The redeemscript for the p2sh address is ...

View answer
How do non-deterministic wallets violate the principle of address reuse?
2 votes

The text indeed doesn't make it's case clear, but the idea is that random key generation makes for inconvenient backups. The more keys you generate, the more frequently you will have to back up the ...

View answer
Would it be possible to create a soft-fork for reducing miner reward?
2 votes

The way block reward is computed today is : CAmount blockReward = nFees + GetBlockSubsidy(pindex->nHeight, chainparams.GetConsensus()); Which means that the block reward is the total fees in the ...

View answer
In theory could a pubkeyhash script be solved without the public key in the scriptSig?
2 votes

It's possible, but: It's much slower Pubkey recovery for this kind of application is arguably patented For a "signature only" scriptpubkey, we already have p2pk. Hopefully in the future, segwit ...

View answer
SegWit Version - is there a proposal for new versions?
2 votes

BIP-114 which was published a while ago comes to mind : https://github.com/bitcoin/bips/blob/master/bip-0114.mediawiki

View answer
Why is 20 the maximum public keys in a multisig transaction?
Accepted answer
2 votes

The number 20 seems to originate from this commit : 8c9479c6bbbc38b897dc97de9d04e4d5a5a36730, also tagged as v0.3.12, which introduced the term 'SigOps". Sadly, I don't see any mention of this change ...

View answer
Why doesn't Multisig provide better security for hot wallets?
Accepted answer
2 votes

Multisig scriptpubkeys do increase the overall size of the transaction. This is because when redeeming the output sent to the multisig script, a number (typically larger than one) of signatures have ...

View answer
createrawtransaction and fundrawtransaction
Accepted answer
2 votes

There are many more parameters than number of confirmations for input selection. It mainly depends on the amounts used in the outputs because eventually enough inputs have to be used to cover the ...

View answer
What is the absolute smallest size of the data (bytes) that a blockchain transaction could possibly be?
2 votes

Depends on the number of inputs, the types of scripts the inputs are redeeming, the number of outputs, and the type of scripts that the ouputs are paying to. The absolute minimum for a transaction ...

View answer
the real purpose of mod inverse in bitcoin for creating public key
2 votes

Basically, when creating a public key from a private key, what you're actually doing is multiplying some number by a point on the curve. In most cases, you will be multiplying some very large number ...

View answer
regtest: ERROR: ProcessNewBlock: AcceptBlock FAILED: unexpected witness data found (code 16) on v0.14.3
Accepted answer
1 votes

As the two nodes do not agree on segwit's activation scheme on regtest, the solution is to set a common version bits parameter to both of them. For example, adding vbparams=segwit:0:99999999999 in the ...

View answer
Is P2SH-wrapped P2PKH possible?
Accepted answer
1 votes

It's definitely possible and you've done the nesting correctly. Also, aside from being "useless and meaningless", it's more expensive since the scriptSig for redeeming outputs sent to this address ...

View answer
Developer example for p2sh-multisig sees sendrawtransaction consistently return the "non-mandatory-script-verify-flag" error [Solved]
Accepted answer
1 votes

It looks like in the signrawtransactionwithkey stage that your are setting the amount to be signed to be : "amount": '$AMOUNT2' If I followed your flow correctly, that is the amount that you want to ...

View answer